Difference between revisions of "RoM Leveling"

From SolarStrike wiki
Jump to: navigation, search
m (Open Bags And Equipt Armor)
(Automatic Skill Leveling)
Line 18: Line 18:
  
 
= Automatic Skill Leveling =
 
= Automatic Skill Leveling =
Use the <onLeaveCombat> event in your profile to automatic level up your skills
+
Use the <onLevelup> event in your profile to automatic level up your skills
  
<source lang="lua"><onLeaveCombat>
+
== Automatic Level of Skills from 1 - 10 ==
if( player.Level > player.free_counter1 and
+
 
    player.Level == 2 ) then
+
<source lang="lua"><onLevelup>
send_macro("SetSpellPoint( 4, 2 );");
+
levelupSkills1To10();
yrest(1000);
+
</onLevelup></source>
send_macro("SetSpellPoint( 4, 2 );");
+
 
elseif( player.Level > player.free_counter1) then
+
That function will levelup a internal given selection of useful skills on your way from 1-10. The selection of the skills is hard coded within functions.lua. That function will also load the skill into your profile skill list and use that skill via the MACRO function. If you restart the bot and want also want to use that skills and don't want to enter them manual into the profile skill list, then just use that function with the parameter 'loadonly' within the onLoad event:
player.free_counter1 = player.Level;
+
 
 +
<source lang="lua"> <onLoad>
 +
-- Additional Lua code to execute after loading the profile
 +
-- and before the bot starts. e.g. You could overwrite profile settings here
 +
-- like: changeProfileOption("HP_REST", 60);
 +
 
 +
if(player.Level == 1) then
 +
openGiftbag(player.Level, 18);
 +
else
 +
levelupSkills1To10("loadonly");
 +
end;
 +
 
 +
</onLoad>
 +
</source>
 +
 
 +
 
 +
== Levelup a Single Skill by Name ==
 +
 
 +
<source lang="lua">
 +
levelupSkill(_skillname [, _times] )
 +
</source>
 +
For the skillname look into the file /database/skills.xml. You can use that function only for skill, which have maintent the skilltab and skillnum values within the skills.xml entry. If the don't have that values, please look yourself for them and use the manual way.
 +
 
 +
== Levelup a Single Skill by Skill Parameters ==
 +
For doing it that way, you have to determine the skill tab and skill number by yourself.
 +
<source lang="lua"><onLevelup>
 +
if( player.Level == 26 ) then
 
send_macro("SetSpellPoint( 4, 2 );");
 
send_macro("SetSpellPoint( 4, 2 );");
 
  end
 
  end
</onLeaveCombat></source>If you want to test the skill numbers you need, you can enter the following script into the ingame chat. It will print the skill name for the selected skill number into the chat.
+
</onLevelup></source>If you want to test the skill numbers you need, you can enter the following script into the ingame chat. It will print the skill name for the selected skill number into the chat.
  
 
<source lang="lua">/script _SkillName = GetSkillDetail(4,2); SendSystemChat(_SkillName);</source>
 
<source lang="lua">/script _SkillName = GetSkillDetail(4,2); SendSystemChat(_SkillName);</source>

Revision as of 17:03, 12 September 2009

Connecting waypoint files

For automatic leveling, you have to connect different waypoint files. Starting from one waypoint file, you change to the next, if you reach a given level.

You start at the spawn point in Pionier Village and walk to your first botting place:

<waypoints type="TRAVEL" >
   <!-- # 3 --><waypoint x="-3779" z="-8480"></waypoint>
   ...
   <!-- # 8 --><waypoint x="-3034" z="-9034">load_paths("l2-3.xml");</waypoint>
</waypoints>
If you reach your first botting place, you load the waypoint file for that place with the command
load_paths( [waypointfile] | [returnpath] );

You can do that also if you reach a given level, to go to the next botting place:

	<!-- #14 --><waypoint x="-1931" z="-9750">
	if( player.Level > 4) then
		load_paths("l5-6.xml");
  	end	
	</waypoint>

Automatic Skill Leveling

Use the <onLevelup> event in your profile to automatic level up your skills

Automatic Level of Skills from 1 - 10

<onLevelup>
	 levelupSkills1To10();
</onLevelup>

That function will levelup a internal given selection of useful skills on your way from 1-10. The selection of the skills is hard coded within functions.lua. That function will also load the skill into your profile skill list and use that skill via the MACRO function. If you restart the bot and want also want to use that skills and don't want to enter them manual into the profile skill list, then just use that function with the parameter 'loadonly' within the onLoad event:

	<onLoad>
		-- Additional Lua code to execute after loading the profile
		-- and before the bot starts. e.g. You could overwrite profile settings here
		-- like: changeProfileOption("HP_REST", 60);

		if(player.Level == 1) then
			openGiftbag(player.Level, 18);
		else
			levelupSkills1To10("loadonly");
		end;

	</onLoad>


Levelup a Single Skill by Name

levelupSkill(_skillname [, _times] )

For the skillname look into the file /database/skills.xml. You can use that function only for skill, which have maintent the skilltab and skillnum values within the skills.xml entry. If the don't have that values, please look yourself for them and use the manual way.

Levelup a Single Skill by Skill Parameters

For doing it that way, you have to determine the skill tab and skill number by yourself.

<onLevelup>
		if( player.Level == 26 ) then
			send_macro("SetSpellPoint( 4, 2 );");
	  	end	
</onLevelup>
If you want to test the skill numbers you need, you can enter the following script into the ingame chat. It will print the skill name for the selected skill number into the chat.
/script _SkillName = GetSkillDetail(4,2); SendSystemChat(_SkillName);

The first number means the tab from the skill book. Numer 4 addresses the third tab. :-) The second number is the number of the skill on that page.

Open Bags And Equipt Armor

You can automaticly open the present bags and equipt armor from the bags.

That's an example what you can do now. That funtionality will change within the bot in the next time.

<onLeaveCombat>
if( player.Level > player.free_counter1 and
    player.Level == 2 ) then yrest(2000);
    	yrest(1000);
	send_macro("UseBagItem( CheckForItem('Abenteurer-Geschenkbeutel') )"); 
	yrest(3000);
	send_macro("UseBagItem( CheckForItem('Stoffg\195\188rtel (Geschenk des Pionierdorfs)') )");
	player.free_counter1 = player.Level;
	send_macro("SetSpellPoint( 4, 2 );");
	yrest(1000);
	send_macro("SetSpellPoint( 4, 2 );");
elseif( player.Level > player.free_counter1 and
    player.Level == 3 ) then yrest(2000);
	send_macro("UseBagItem( CheckForItem('Pionier-Geschenkbeutel') )");
	yrest(2000);
	send_macro("UseBagItem( CheckForItem('Ohrringe (Geschenk des Pionierdorfs)') )");
	player.free_counter1 = player.Level;
	send_macro("SetSpellPoint( 4, 2 );");
end
</onLeaveCombat>

In that example we use a new ingame macro function CheckForItem for selecting an ingame item by name. You have to download that small lua file and install it within your addon folder.