Difference between revisions of "RoM Variables"
From SolarStrike wiki
(New page: == Player Variables == Thats only a small selection of some important variables. Please look at the coding if you want more. self.free_field1 = nil; -- free field for user use self....) |
|||
Line 1: | Line 1: | ||
− | + | = Player Variables = | |
+ | ==Player User Fields== | ||
Thats only a small selection of some important variables. Please look at the coding if you want more. | Thats only a small selection of some important variables. Please look at the coding if you want more. | ||
Line 14: | Line 15: | ||
− | <source lang="lua"> | + | ==General Player Fields== |
− | + | example:<source lang="lua"> | |
− | |||
if( player.Level > 9 ) then | if( player.Level > 9 ) then | ||
printf("do some other coding stuff"); | printf("do some other coding stuff"); | ||
Line 32: | Line 32: | ||
end;</source> | end;</source> | ||
− | + | ==Player Fight and Target Variables== | |
player.Fights | player.Fights | ||
Counter for the number of the fights. | Counter for the number of the fights. | ||
Line 48: | Line 48: | ||
printf("do some other coding stuff"); | printf("do some other coding stuff"); | ||
end</source> | end</source> | ||
+ | |||
+ | = Inventory Variables = | ||
+ | |||
+ | The most inventory fields are accessible by using the inventory functions. Fore more informations about that see the [http://www.solarstrike.net/wiki/index.php5?title=RoM_Functions#Inventory_and_Item_Functions inventory function]. |
Latest revision as of 09:27, 29 October 2009
Contents
Player Variables
Player User Fields
Thats only a small selection of some important variables. Please look at the coding if you want more.
self.free_field1 = nil; -- free field for user use self.free_field2 = nil; -- free field for user use self.free_field3 = nil; -- free field for user use self.free_counter1 = 0; -- free counter for user use self.free_counter2 = 0; -- free counter for user use self.free_counter3 = 0; -- free counter for user use self.free_flag1 = false; -- free flag for user use self.free_flag2 = false; -- free flag for user use self.free_flag3 = false; -- free flag for user use
General Player Fields
example:if( player.Level > 9 ) then
printf("do some other coding stuff");
end;
player.BotStartTime player.BotStartTime_nr
Bot start time. 'player.BotStartTime' will be reseted if you pause the bot by pressing 'END'. 'player.BotStartTime_nr' will not be reseted.
example:
if( os.difftime(os.time(), player.BotStartTime) > 3600 ) then
printf("do some other coding stuff");
end;
Player Fight and Target Variables
player.Fights
Counter for the number of the fights.
example:
if( player.Fights-player.free_counter1 > 300 ) then
player.free_counter1 = player.Fights;
loadPaths("l4-5.xml");
end
player.mobs[mobname]
Counter for the number of the fights per mob
example:
if( player.mobs["Fungus"] > 25 ) then
printf("do some other coding stuff");
end
Inventory Variables
The most inventory fields are accessible by using the inventory functions. Fore more informations about that see the inventory function.