I don't have a 64 bit pc. Right now it is returning a null trying to read a memory. Meaning the address its looking for don't exist. Do you know how to use CheatEngine? If you search the static address of the character and change the script a little it should work. The offset should be different too if it is a 64 bit.Dnic wrote:Hmmm have you tried it on a 64 bit version of Vista though? Like I said it works perfectly fine on XP, just not my Vista system. I'll do some more testing tomorrow and see if I can't get it to work and see what I else I can find.
Haha on a side note I was wondering why my guy would never pot at the certain % and I commented out the code for taking pots for MP and SP even though I set em to 0. Don't ask me why I did that.
Shaiya Fighter Bot
-
- Posts: 59
- Joined: Tue May 20, 2008 5:45 am
Re: Shaiya Fighter Bot
Re: Shaiya Fighter Bot
This is the shaiya script at teh top of this post I am trying to run and not sure what version of shaiya no GG i have but Ill keep looking for a new one.
normal windows not 64 btw
normal windows not 64 btw
-
- Posts: 59
- Joined: Tue May 20, 2008 5:45 am
Re: Shaiya Fighter Bot
post the script you are loading it shouldn't read the old address cause there is no such address in the script.drdelete wrote:This is the shaiya script at teh top of this post I am trying to run and not sure what version of shaiya no GG i have but Ill keep looking for a new one.
normal windows not 64 btw
You are running it as fighter2.lua right? because the error look like your typing in zs_shaiya/main.lua or other scripts.
Re: Shaiya Fighter Bot
This is a line 455: logMessage(sprintf("target_status=%d", target_status));deaznracer wrote:go to line 455 and delete it, tell me what happens.Kabanos93 wrote:hey guys, i have a problem with fighter.lua, i have warrior in shaiya and i can;t use this script, i have MicroMacro 0.97, i have error, help me all times i have problem with "sprintf " LOOK FOR THIS PICTURE :
That see all:
function cycle_target()
--printf("self.switched_targets: %d\n", self.switched_targets);
--printf("self.max_switch_targets: %d\n", self.max_switch_targets);
--debug_message("new_target");
target();
local target_status = status();
--printf("target_color: %d\n", target_color);
--printf("target_status=%d\n", target_status);
logMessage(sprintf("target_status=%d", target_status));
if (target_status == TARGET_FULL) then
local l_color = get_difficulty_color();
local l_color_min = target_difficulty_color_min;
local l_color_max = target_difficulty_color_max;
--printf("target_color_min: %s\n", l_color_min);
-- printf("target_color_max: %s\n", l_color_max);
printf("getting difficulty Color \n");
--printf("l_color: %s\n", l_color);
if (l_color >= l_color_min and l_color <= l_color_max) then
return true;
end
end
return false;
end
I dellete this and now still cheanges my sacrifice/monsters.
what's rong in this line ??
Re: Shaiya Fighter Bot
ok so I was running the old one.
When running the fighter.lua I get the Sprintf error so I hosed line 455. It runs but only spins the screen in circles and targets itself and then mobs then itself again and never moves.
When running the fighter.lua I get the Sprintf error so I hosed line 455. It runs but only spins the screen in circles and targets itself and then mobs then itself again and never moves.
-
- Posts: 59
- Joined: Tue May 20, 2008 5:45 am
Re: Shaiya Fighter Bot
1) are you targeting what color mob ? it has to match what you choose. If the setting allow you to only target white to blue mob and your hunting in an orange mob then go into the file and change it. I added comment linesdrdelete wrote:ok so I was running the old one.
When running the fighter.lua I get the Sprintf error so I hosed line 455. It runs but only spins the screen in circles and targets itself and then mobs then itself again and never moves.
2) Did you open your shaiya config.ini and set all
interface to
Code: Select all
STATUSINFOBAR_POS_X=0
STATUSINFOBAR_POS_Y=0
it is spinning around in circle cause again, its not detecting the right color for those reason i mention above.
pre-setup
1)open the file in notepad
2) look through the code and edit these only if you are not familiar with writing scripts
Code: Select all
--------------------------------------------------
-- Modify your Fighter's Setting
--------------------------------------------------
how_many_scanTarget = 4; --how many target you want to scan for Full HP mobs. Default is 4
how_many_seconds = 30; --how many seconds you want to keep targeting the mob before the hp is damaged. Default 15
how_many_pickup = 3; --how many pickups after mob dies. Default is 4
--------------------------------------------------
-- Modify what color Mob you want to kill
-- EX: min=4 max =4 kill green mob only
--------------------------------------------------
target_difficulty_color_min= 1;
target_difficulty_color_max= 6;
--white = 1
--cyan = 2
--blue = 3
--green = 4
--yellow = 5
--orange = 6
--red = 7
--purple = 8
--grey = 9
-------------------------------------------------
-- Modify the Fighter's Skills information
-- If you enter No, the skill will switch between
-- skill 1 and skill 2 for each mob
-- EX: mob 1 skill 1 next Mob will use skill 2
-------------------------------------------------
-- Enter no if you don't want to use Skill.
-- Skill 1 = hot key 3
-- Skill 2 = hot key 4
Use_both_skill = no; --put No or Yes to use both skills Hotkey 3 and 4
skill1_reuse_time = yes;
skill2_reuse_time = yes;
-------------------------------------------------
-- Enter the recharge Time and MP it needed to buff
-------------------------------------------------
-- Enter 0 if you don't want to buff.
-- Buff 1 = hot key 5
-- Buff 2 = hot key 6
-- buff 3 = hot key 7
-- Set MP = 1 if you are lazy to check(it wont be accurate)
buff1_reuse_time = 4; -- measured by minutes
buff1_MP = 1;
buff2_reuse_time = 4; -- measured by minutes
buff2_MP = 1;
buff3_reuse_time = 9; -- measured by minutes
buff3_MP = 55;
------------------------------------------------
-- How many seconds do you want your fighter to
-- Pause before searching the next target
------------------------------------------------
-- Enter 0 if you just want him to kill without
-- resting.
char_pausing = 0;
------------------------------------------------
-- POTIONS
------------------------------------------------
-- All potion use values are specified in %
-- Set the values to 0 to not use that potion
HP_potion_use = 50;
MP_potion_use = 50;
SP_potion_use = 25;
------------------------------------------------
-- SITTING
------------------------------------------------
-- All sitting values are specified in %
-- We will only sit while out of battle
-- Set the values to 0 to not use sitting
HP_sit = 50;
MP_sit = 0;
SP_sit = 0;
1) open shaiya game
2) alt + tab
3) open micromacro
4) type fighter.lua
5) press enter
6) go back in game
7) drag target mob information bar to left hand corner
(if you don't understand that then your on your own)
8) don't put anything else near that area
9) press insert to start the program
10) tell me if it works.
Re: Shaiya Fighter Bot
Hiya, when i start the bot i goes and attack and pick up after it dies, but after that it just spins around and he dont attack anymore. And i have a Swedish keyboard i think thats the problem so the key_switchtarget = key.VK_TILDE; don't work. Do you have any ideas? ^^
Re: Shaiya Fighter Bot
So here is what happens on my vista 64. It buffs to start, finds the NPC and sends attack order. Right after that micromacro shows this:
I went down to that line and not quite sure what to make of it as there is no value directly at that point.
Code: Select all
\micromacro\scripts\fighter3.lua:667: attempt to call global 'sprintf' (a nil value)
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya Fighter Bot
That was my mistake. Open your lib/lib.lua file in notepad, and press CTRL+F. Search for "--sprintf" (without quotes). On the line that it finds, remove the -- then save and restart MicroMacro.
Re: Shaiya Fighter Bot
Did it for all of em now I'm getting the same message except its for line 431.
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya Fighter Bot
Wait, what? Both of them? There should only be one instance of "--sprintf = string.format;" in micromacro/lib/lib.lua. That is the one you need to remove the "--" from.
Re: Shaiya Fighter Bot
All worked... but I don know why, something broked ;/ with this line:
if( buff1_ready and buff1_time > 0 ) then
Who tell my what's happend ?? Please help !!
------------------------------------------------
-- MAIN
------------------------------------------------
function main()
proc = openProcess(findProcessByExe("game.exe"));
win = findWindow("Shaiya");
attach(win);
setPriority(PRIORITY_HIGH);
init_window();
init_process();
init_hdc();
registerTimer("update_vars", 100, update_vars);
if( skill1_time ) then registerTimer("skill1_toggle", skill1_time, skill1_toggle); end
if( skill2_time ) then registerTimer("skill2_toggle", skill2_time, skill2_toggle); end
if( skill3_time ) then registerTimer("skill3_toggle", skill3_time, skill3_toggle); end
if( buff1_time ) then registerTimer("buff1_toggle", buff1_time, buff1_toggle); end;
if( buff2_time ) then registerTimer("buff2_toggle", buff2_time, buff2_toggle); end;
local reAttack = 0;
while( macro_running ) do
if( buff1_ready and buff1_time > 0 ) then
keyboardPress(key_buff1); buff1_ready = false; yrest(2000); end;
if( buff2_ready and buff2_time > 0 ) then
keyboardPress(key_buff2); buff2_ready = false; yrest(2000); end;
if(cycle_target()) then
fight2();
if(do_jump == 1) then
keyboardHold(key_move_down);
keyboardPress(key_jump);
yrest(1000);
keyboardPress(key_jump);
yrest(1000);
keyboardRelease(key_move_down);
keyboardHold(key_move_right);
yrest(2000);
keyboardRelease(key_move_right);
do_jump = 0;
end
reAttack = 0;
else
reAttack = 1 + reAttack;
end
--printf(reAttack);
if ( reAttack == how_many_scanTarget ) then
reAttack = 0;
keyboardPress(key_myself);
yrest(500);
keyboardHold(key_right);
yrest(500);
keyboardRelease(key_right);
if( buff1_ready and buff1_time > 0 ) then
Who tell my what's happend ?? Please help !!
------------------------------------------------
-- MAIN
------------------------------------------------
function main()
proc = openProcess(findProcessByExe("game.exe"));
win = findWindow("Shaiya");
attach(win);
setPriority(PRIORITY_HIGH);
init_window();
init_process();
init_hdc();
registerTimer("update_vars", 100, update_vars);
if( skill1_time ) then registerTimer("skill1_toggle", skill1_time, skill1_toggle); end
if( skill2_time ) then registerTimer("skill2_toggle", skill2_time, skill2_toggle); end
if( skill3_time ) then registerTimer("skill3_toggle", skill3_time, skill3_toggle); end
if( buff1_time ) then registerTimer("buff1_toggle", buff1_time, buff1_toggle); end;
if( buff2_time ) then registerTimer("buff2_toggle", buff2_time, buff2_toggle); end;
local reAttack = 0;
while( macro_running ) do
if( buff1_ready and buff1_time > 0 ) then
keyboardPress(key_buff1); buff1_ready = false; yrest(2000); end;
if( buff2_ready and buff2_time > 0 ) then
keyboardPress(key_buff2); buff2_ready = false; yrest(2000); end;
if(cycle_target()) then
fight2();
if(do_jump == 1) then
keyboardHold(key_move_down);
keyboardPress(key_jump);
yrest(1000);
keyboardPress(key_jump);
yrest(1000);
keyboardRelease(key_move_down);
keyboardHold(key_move_right);
yrest(2000);
keyboardRelease(key_move_right);
do_jump = 0;
end
reAttack = 0;
else
reAttack = 1 + reAttack;
end
--printf(reAttack);
if ( reAttack == how_many_scanTarget ) then
reAttack = 0;
keyboardPress(key_myself);
yrest(500);
keyboardHold(key_right);
yrest(500);
keyboardRelease(key_right);
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya Fighter Bot
You tell me. What's the error message?
Re: Shaiya Fighter Bot
Kabanos93 wrote:All worked... but I don know why, something broked ;/ with this line:
if( buff1_ready and buff1_time > 0 ) then
Who tell my what's happend ?? Please help !!
------------------------------------------------
-- MAIN
------------------------------------------------
function main()
proc = openProcess(findProcessByExe("game.exe"));
win = findWindow("Shaiya");
attach(win);
setPriority(PRIORITY_HIGH);
init_window();
init_process();
init_hdc();
registerTimer("update_vars", 100, update_vars);
if( skill1_time ) then registerTimer("skill1_toggle", skill1_time, skill1_toggle); end
if( skill2_time ) then registerTimer("skill2_toggle", skill2_time, skill2_toggle); end
if( skill3_time ) then registerTimer("skill3_toggle", skill3_time, skill3_toggle); end
if( buff1_time ) then registerTimer("buff1_toggle", buff1_time, buff1_toggle); end;
if( buff2_time ) then registerTimer("buff2_toggle", buff2_time, buff2_toggle); end;
local reAttack = 0;
while( macro_running ) do
if( buff1_ready and buff1_time > 0 ) then
keyboardPress(key_buff1); buff1_ready = false; yrest(2000); end;
if( buff2_ready and buff2_time > 0 ) then
keyboardPress(key_buff2); buff2_ready = false; yrest(2000); end;
if(cycle_target()) then
fight2();
if(do_jump == 1) then
keyboardHold(key_move_down);
keyboardPress(key_jump);
yrest(1000);
keyboardPress(key_jump);
yrest(1000);
keyboardRelease(key_move_down);
keyboardHold(key_move_right);
yrest(2000);
keyboardRelease(key_move_right);
do_jump = 0;
end
reAttack = 0;
else
reAttack = 1 + reAttack;
end
--printf(reAttack);
if ( reAttack == how_many_scanTarget ) then
reAttack = 0;
keyboardPress(key_myself);
yrest(500);
keyboardHold(key_right);
yrest(500);
keyboardRelease(key_right);
OK all worked now
char_pausing = 1; cheange to char_pausing = 0;
and is OK
Re: Shaiya Fighter Bot
elverion wrote:Wait, what? Both of them? There should only be one instance of "--sprintf = string.format;" in micromacro/lib/lib.lua. That is the one you need to remove the "--" from.
Ok, my bad I misread what you said. I changed it on what you said now. I also re-replaced fighter2.lua from the my working XP machine and it seems to be working, even though it seems to be a hit and miss when it does. Sometimes it will just stand there not buff, etc.
Also I'm a bit confused on using the skills section. I though if you put yes on Use_both_skill its supposed to use both of them per NPC? However it uses only 1 per NPC, I've tried yes/no combination's to play with it but still no success. I'm going to add it to use a 3rd skill once that works fine.
-
- Posts: 59
- Joined: Tue May 20, 2008 5:45 am
Re: Shaiya Fighter Bot
find thisDnic wrote:elverion wrote:Wait, what? Both of them? There should only be one instance of "--sprintf = string.format;" in micromacro/lib/lib.lua. That is the one you need to remove the "--" from.
Ok, my bad I misread what you said. I changed it on what you said now. I also re-replaced fighter2.lua from the my working XP machine and it seems to be working, even though it seems to be a hit and miss when it does. Sometimes it will just stand there not buff, etc.
Also I'm a bit confused on using the skills section. I though if you put yes on Use_both_skill its supposed to use both of them per NPC? However it uses only 1 per NPC, I've tried yes/no combination's to play with it but still no success. I'm going to add it to use a 3rd skill once that works fine.
Code: Select all
if(skill_switch == 1 or Use_both_skill == 1)then
skill3();
else
skill4();
end
Code: Select all
if(skill_switch == 1 or Use_both_skill == 1)then
skill3();
end
if(skill_swtich == 2 or use_both_skill == 1) then
skill4();
end
right now i am working on spamming skills.
Re: Shaiya Fighter Bot
is there something i can do to make the bot shutdown after it dies?
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya Fighter Bot
Code: Select all
if( HP <= 0 ) then -- if you're dead
keyboardHold(key.VK_LALT); -- hold ALT
keyboardPress(key.VK_F4); -- press F4
keyboardRelease(key.VK_LALT); -- release
end
Re: Shaiya Fighter Bot
hey is it possible to implement an auto-item switch...e.g. when durability is getting low on armors and weapon the bot runs a process which swaps them for spares set up in inventory?
or is that not possible?
or is that not possible?
-
- Posts: 59
- Joined: Tue May 20, 2008 5:45 am
Re: Shaiya Fighter Bot
it's possiblejim151222 wrote:hey is it possible to implement an auto-item switch...e.g. when durability is getting low on armors and weapon the bot runs a process which swaps them for spares set up in inventory?
or is that not possible?
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests