How to MP/HP potion count for autobuy
Posted: Fri Aug 28, 2009 11:56 am
if you want rebuy potion go here :
http://www.solarstrike.net/phpBB3/viewt ... ties#p5915
Step 1 :
go in you pawn.lua and open it (..\micromacro\scripts\rom\classes\pawn.lua)
and choose a
this is the counter for your hp potion. (you can add free_counter for that copy/past the code ligne and change the free counter number exp:
my pawn.lua:
do same for MP potion
quit and save
Step 2 :
open player.lua (same folder)
go to near Ligne:323 and after
add
(don't forget to change the number of the free_counter)
now go to near ligne: 340 and after
add
quit and save.
Step 3
open your porfile.xml
and add this on the leavecombat state
Quit and save
Step 4
open your waypoint file and edit your waypoint.
for change your path :
you can change thefree_counter number (player.free_counter1 = player.free_counter1)
and the counter value : (player.free_counter1 == 10)
the name of the path to load : load_paths("buypotion.xml");
or the action : load_paths("buypotion.xml");
exp :
for sleep the bot
for logout
for load a porfile
you can download my file.
sry for the english
http://www.solarstrike.net/phpBB3/viewt ... ties#p5915
Step 1 :
go in you pawn.lua and open it (..\micromacro\scripts\rom\classes\pawn.lua)
and choose a
Code: Select all
self.free_counter1 = 0;
Code: Select all
self.free_counter5 = 0;
Code: Select all
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_counter4 = 0; -- HP POTION counter
self.free_counter5 = 0; -- MP POTION counter
quit and save
Step 2 :
open player.lua (same folder)
go to near Ligne:323 and after
Code: Select all
keyboardPress(settings.profile.hotkeys.HP_POTION.key);
Code: Select all
self.free_counter4 = self.free_counter4 + 1;
(don't forget to change the number of the free_counter)
now go to near ligne: 340 and after
Code: Select all
keyboardPress(settings.profile.hotkeys.MP_POTION.key);
Code: Select all
self.free_counter5 = self.free_counter5 + 1;
Step 3
open your porfile.xml
and add this on the leavecombat state
Code: Select all
<onLeaveCombat>
printf( "|-----------------> HP potion use: %d\n", player.free_counter4);
printf( "|-----------------> MP potion use: %d\n", player.free_counter5);
</onLeaveCombat>
Step 4
open your waypoint file and edit your waypoint.
for change your path :
Code: Select all
player.free_counter1 = player.free_counter1 + 1;
if(player.free_counter1 == 10) then
load_paths("buypotion.xml");
end;
and the counter value : (player.free_counter1 == 10)
the name of the path to load : load_paths("buypotion.xml");
or the action : load_paths("buypotion.xml");
exp :
Code: Select all
player.free_counter1 = player.free_counter1 + 1;
if(player.free_counter1 == 10) then
player:sleep();
end;
Code: Select all
player.free_counter1 = player.free_counter1 + 1;
if(player.free_counter1 == 10) then
player:logout();
end;
Code: Select all
player.free_counter1 = player.free_counter1 + 1;
if(player.free_counter1 == 10) then
settings.loadProfile("playerName");
end;
you can download my file.
sry for the english
