Shaiya bot
Re: Shaiya bot
The pick up is not working well. mm...
I started the script, after first attack , pick up is not working~ just find another monster to attack. (sometimes the pick up works again)
I started the script, after first attack , pick up is not working~ just find another monster to attack. (sometimes the pick up works again)
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
What class are you? If it's a ranged class, it might not work too well. I guess it could also be a bug, but it seemed to be working fine for me earlier.
-
- Posts: 4
- Joined: Wed Mar 12, 2008 10:12 am
Re: Shaiya bot
i ran the game and then the micromacro
i get continuous pages of this:
WARNING: Failure reading memory from 0x12458C0 at 0x2110ac8 in memoryReadIntPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)
also, after using the no GG version of game.exe, it says that the client version does not match
what should i do?
i get continuous pages of this:
WARNING: Failure reading memory from 0x12458C0 at 0x2110ac8 in memoryReadIntPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)
also, after using the no GG version of game.exe, it says that the client version does not match
what should i do?
Re: Shaiya bot
Im a warrior.
The pick up is kind of strange~ dont know why.
The pick up is kind of strange~ dont know why.
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
Run the updater to get the newer version of Shaiya, then reinstall the no-GG patch.
-
- Posts: 4
- Joined: Wed Mar 12, 2008 10:12 am
Re: Shaiya bot
thanks, that worked
but how do i edit shaiya.lua?
but how do i edit shaiya.lua?
Re: Shaiya bot
some things are a little buggy atm... don't know why but you guys should try and figure out why pickup does not work... observe your char, does it not pick up once in a while? any description would help the scrip maker to fix the bug... personally i was having those problems too... couple of things
- Pickup sometimes does NOT pickup
- Buffs sometimes are not executed
i did however got around all of these, by putting adding pickup on find_target () function, and switching some my skill key into my buff key that...
skills don't got a problem soo far... also i got a temporary solution to the stuck problem by making it switch target once every 500seconds, that way your char isn't stuck forever trying to get to a mob when there's an obstacle on the way...
as for the question above... open up Notepad and drag-drop the shaiya.lua file in there, or use open
- Pickup sometimes does NOT pickup
- Buffs sometimes are not executed
i did however got around all of these, by putting adding pickup on find_target () function, and switching some my skill key into my buff key that...
skills don't got a problem soo far... also i got a temporary solution to the stuck problem by making it switch target once every 500seconds, that way your char isn't stuck forever trying to get to a mob when there's an obstacle on the way...
as for the question above... open up Notepad and drag-drop the shaiya.lua file in there, or use open
-
- Posts: 4
- Joined: Wed Mar 12, 2008 10:12 am
Re: Shaiya bot
i still have quite a few problems
1: i dont want to use skills, and editing the script doesn't change anything
2: after the first kill, it does not seek out anymore targets
3: i cant pick up
i am an assassin
1: i dont want to use skills, and editing the script doesn't change anything
2: after the first kill, it does not seek out anymore targets
3: i cant pick up
i am an assassin
-
- Posts: 4
- Joined: Wed Mar 12, 2008 10:12 am
Re: Shaiya bot
Code: Select all
-------------------------------------------------
-- Variable declaration -- do not edit
-------------------------------------------------
CLASS_WARRIOR = 0;
CLASS_MAGE = 1;
HP = 10000;
HPmax = HP;
MP = 10000;
MPmax = MP;
SP = 10000;
SPmax = SP;
HP_ptr = "210A880";
HP_offset = 296;
HPmax_ptr = "210A880";
HPmax_offset = 300;
MP_ptr = "210A880";
MP_offset = 304;
MPmax_ptr = "210A880";
MPmax_offset = 308;
SP_ptr = "210A880";
SP_offset = 312;
SPmax_ptr = "210A880";
SPmax_offset = 316;
-------------------------------------------------
-------------------------------------------------
-- character configuration
-------------------------------------------------
class = CLASS_WARRIOR;
key_attack = key.VK_1;
key_pickup = key.VK_2;
key_sit = key.VK_C;
key_skill1 = key.VK_3;
key_skill2 = key.VK_4;
key_skill3 = key.VK_5;
key_hppotion = key.VK_8;
key_mppotion = key.VK_9;
key_sppotion = key.VK_9;
-- rest or use potions when low on HP/MP/SP
HP_usepotion = 50;
MP_usepotion = 0;
SP_usepotion = 0;
HP_sit = 100;
MP_sit = 0;
SP_sit = 20;
-- chance to cast
skill1_chance = 0;
skill2_chance = 0;
skill3_chance = 0;
-- MP cost
skill1_cost = 38;
skill2_cost = 20;
skill3_cost = 80;
casttime = 2000;
-------------------------------------------------
function use_hppotion()
keyboardPress(key_hppotion);
end
function use_mppotion()
keyboardPress(key_mppotion);
end
function use_sppotion()
keyboardPress(key_sppotion);
end
-- so we aren't spamming the attack key...
-- we will use a timer to press it once
-- every 3 seconds.
function attack_timer()
keyboardPress(key_attack);
end
function fight_warrior()
registerTimer("attack_timer", 3000, attack_timer);
while( have_target() ) do
if( HP < HP_usepotion ) then
use_hppotion(); end
if( MP < MP_usepotion ) then
use_mppotion(); end
if( SP < SP_usepotion ) then
use_sppotion(); end
yrest(100);
coroutine.yield();
end
unregisterTimer("attack_timer");
yrest(1000);
pickup();
end
function fight_mage()
while( have_target() ) do
if( HP < HP_usepotion ) then
use_hppotion(); end
if( MP < MP_usepotion ) then
use_mppotion(); end
if( SP < SP_usepotion ) then
use_sppotion(); end
local roll = math.random(100);
if( roll <= skill1_chance and MP >= skill1_cost ) then
-- cast skill 1
keyboardPress(key_skill1);
yrest(casttime);
else
keyboardPress(key_attack);
end
yrest(100);
coroutine.yield();
end
yrest(1000);
pickup();
end
-- heal until full HP & MP
function rest_heal()
local last_HP = HP;
keyboardPress(key_sit);
yrest(100);
while( HP < HPmax ) do
if( HP < last_HP ) then
print("Under attack! Exiting rest");
return;
else
last_HP = HP;
end
yrest(100);
coroutine.yield();
end
keyboardPress(key_sit);
yrest(1000);
end
-- pickup nearby items
function pickup()
for i = 1,5 do
keyboardPress(key_pickup);
yrest(500);
end
end
-- update client variables by reading from it's memory
function update_vars()
HP = memoryReadIntPtr(proc, HP_ptr, HP_offset);
HPmax = memoryReadIntPtr(proc, HPmax_ptr, HPmax_offset);
MP = memoryReadIntPtr(proc, MP_ptr, MP_offset);
MPmax = memoryReadIntPtr(proc, MPmax_ptr, MPmax_offset);
SP = memoryReadIntPtr(proc, SP_ptr, SP_offset);
SPmax = memoryReadIntPtr(proc, SPmax_ptr, SPmax_offset);
end
function have_target()
--1280*1024
-- X: 345, Y: 36
-- 16bit: 165, 24, 66
-- 32bit: 163, 25, 65
--1024*768
-- X: 258, Y: 36
-- 16bit: 165, 28, 66
-- 32bit: 165, 30, 68
local r,g,b;
-- use the window's rect to find the resolution
local wx,wy,ww,wh = windowRect(win);
if( ww == 1024 and wh == 768 ) then
r,g,b = getPixel(hdc, 258, 36);
elseif( ww == 1280 and wh == 1024 ) then
r,g,b = getPixel(win, 345, 36);
else
r,g,b = 0;
print("Unsupported resolution! Please use 1024*768 or 1280*1024.");
end
--printf("R: %d, G: %d, B: %d\n", r, g, b);
-- if there is still HP left in monster's HP bar...return true
if( r >= 160 and r <= 170 and g >= 20 and g <= 34 and b >= 63 and b <= 73) then
return true;
else
return false;
end
end
-------------------------------------------------
-- FUNCTION MAIN
-------------------------------------------------
function main()
proc = openProcess( findProcessByExe("Game.exe") );
win = findWindow("Shaiya");
hdc = openDC(win);
attach(win);
registerTimer("update_vars", 100, update_vars);
running = true;
while( running ) do
if( keyPressed(key.VK_F7) == 1 ) then
running = false; end
keyboardPress(key_attack);
if( have_target() ) then
if( class == CLASS_WARRIOR ) then
fight_warrior();
elseif( class == CLASS_MAGE ) then
fight_mage();
end
end
yrest(500);
if( HP < HP_sit or MP < MP_sit or SP < SP_sit ) then
rest_heal(); end
yrest(200);
end
closeProcess(proc);
detach();
end
startMacro(main);
-------------------------------------------------
can you make it so that i sit down at 100hp/0mp/0sp
also, i dont want to use any potions or skills
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
Use the new, fixed script. It is provided on the first page of this thread.
-
- Posts: 148
- Joined: Fri Mar 21, 2008 9:10 pm
Re: Shaiya bot
The bot works good. I made some of my own corrections like adding more spaces for buffs and skills. I found out in game you can make your self anouther quick toolbar that uses num keys. I dont know how i did it but its up. The only problem i have and i have yet to fix it on my own. Is that the HP, MP, SP does not work correctly. It will keep pressing and pressing and pressing and it will sit for a sec and get up. What could be the problem?
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
Use a memory editor to check if 01FCFEE4 is 0 when standing, and 7 for sitting. If it isn't, then there could be your problem. Otherwise, check the sit() function and try to modify it to get it to work correctly.
-
- Posts: 148
- Joined: Fri Mar 21, 2008 9:10 pm
Re: Shaiya bot
Shouldnt the script still work for me anyways. How come im haven trouble with it when most people have not.
Whats playerptr_addr?
Also whats
HP_offset =
MaxHP_offset =
I dont understand what they actually mean...
I have artmoney. I was able to find my HP,MP.SP but that isnt what i need for the script?
Whats playerptr_addr?
Also whats
HP_offset =
MaxHP_offset =
I dont understand what they actually mean...
I have artmoney. I was able to find my HP,MP.SP but that isnt what i need for the script?
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
It could be due to timing or latency, which are variable.Shouldnt the script still work for me anyways. How come im haven trouble with it when most people have not.
A pointer to the address of the player's pawn.Whats playerptr_addr?
The offset of HP/max HP from the player's pointer.HP_offset =
MaxHP_offset =
0x02110AC8 points to (for example) 0x12345678. 0x12345678 + 296 resolves to 0x123457A0, so 0x123457A0 contains the players HP. Large amounts of data in games today are stored in dynamic addresses, not static ones (though, the pointers are static), therefor a pointer is needed to access the same data.
-
- Posts: 148
- Joined: Fri Mar 21, 2008 9:10 pm
Re: Shaiya bot
Well with the script that said was updated everything on it works just fine execpt healing. heres what i think is causeing the problem for me anyways
-- Memory addresses
------------------------------------------------
playerptr_addr = ;
HP_offset = 296;
MaxHP_offset = 300;
MP_offset = 304;
MaxMP_offset = 308;
SP_offset = 312;
MaxSP_offset = 316;
targetid_addr = 0x00619B1C; -- short, 65535 if none selected
targettype_addr = 0x00619B1F; -- byte, 0 = player/NPC, 7 = monster
sitcheck_addr = 0x01FCFEE4; -- byte, 0 = standing, 7 = sitting
When i site and stand i get 2 different things pop up for 0 and 7 so wouldnt that cause my problem?
I dont know actually how to get the 0x0 numbers. I am able to get the other numbers.
I want to get the heal working so i dont die..lol
------------------------------------------------
-- Memory addresses
------------------------------------------------
playerptr_addr = ;
HP_offset = 296;
MaxHP_offset = 300;
MP_offset = 304;
MaxMP_offset = 308;
SP_offset = 312;
MaxSP_offset = 316;
targetid_addr = 0x00619B1C; -- short, 65535 if none selected
targettype_addr = 0x00619B1F; -- byte, 0 = player/NPC, 7 = monster
sitcheck_addr = 0x01FCFEE4; -- byte, 0 = standing, 7 = sitting
When i site and stand i get 2 different things pop up for 0 and 7 so wouldnt that cause my problem?
I dont know actually how to get the 0x0 numbers. I am able to get the other numbers.
I want to get the heal working so i dont die..lol
------------------------------------------------
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
You removed the playerptr_addr, therefor, the script cannot read your character's HP. If it does not know your HP, it cannot tell when to heal.
Can you repeat that? When you are moving between sitting and standing, it may be between 0 and 7. That is because this number is the keyframe your character is currently at. So while you are getting up, you may see a 5 flash by real quick.When i site and stand i get 2 different things pop up for 0 and 7 so wouldnt that cause my problem?
That's hexadecimal (base 16) notation. You can use decimal if you prefer. Just do not put a 0x in front of it.I dont know actually how to get the 0x0 numbers. I am able to get the other numbers.
-
- Posts: 148
- Joined: Fri Mar 21, 2008 9:10 pm
Re: Shaiya bot
well, the playerptr_addr was there. I wasnt working. so i thought i found the right playerptr_addr for myself but i relised i wasnt doing it right so i just left i blank. Second i used artmoney and this is what i found for 0 and 7 for sitting and standing. i come up with two address
Address 045DE520 value 7 integer 4 bytes
Address 045DE5E4 Value 7 integer 4
I filltered like 4 more times and i still get these two.
Also is there a way to change the script so it just use the hp, mp,sp, instead of what it is useing cause i dont know how to get that with artmoney if anyone knows how i would like to know and see if i get the same numbers
Address 045DE520 value 7 integer 4 bytes
Address 045DE5E4 Value 7 integer 4
I filltered like 4 more times and i still get these two.
Also is there a way to change the script so it just use the hp, mp,sp, instead of what it is useing cause i dont know how to get that with artmoney if anyone knows how i would like to know and see if i get the same numbers
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
If you can locate your HP/MP/SP in Artmoney, use this tutorial to find playerptr_addr: http://solarimpact.servegame.com/phpBB3 ... p?f=5&t=10
It's really just that simple. The resulting pointer will be the player's pointer + HP offset (for example). You can then update playerptr_addr and the offsets(though they probably will not have changed). If you get 300 for your HP offset (again, this is an example), then you can just put HP_offset = 300.
It's really just that simple. The resulting pointer will be the player's pointer + HP offset (for example). You can then update playerptr_addr and the offsets(though they probably will not have changed). If you get 300 for your HP offset (again, this is an example), then you can just put HP_offset = 300.
It's likely that these are both valid. Try putting either one of them into the sitcheck_addr (or whatever it is), and see if that works.Address 045DE520 value 7 integer 4 bytes
Address 045DE5E4 Value 7 integer 4
-
- Posts: 148
- Joined: Fri Mar 21, 2008 9:10 pm
Re: Shaiya bot
Some reason i get 2 of everything here is what i got for my hp
02110AC8 +269
00110A10 +136
Why am i the only one haven problems with the scripts..lol..whats different on my computer then everyone elses
02110AC8 +269
00110A10 +136
Why am i the only one haven problems with the scripts..lol..whats different on my computer then everyone elses
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Shaiya bot
That's normal. Sometimes, a game may have multiple pointers to the same information. In this case, I can tell you (from experience with Shaiya) that the first one is going to be the address you'll want to use. Change playerptr_addr to 0x02110AC8, and HP_offset to 269. But, I think you actually meant +296? This means that all of the addresses and offsets were correct.Some reason i get 2 of everything here is what i got for my hp
02110AC8 +269
00110A10 +136
I'm not really sure what originally was wrong. Did the bug only occur when trying to sit, and it would continue sitting and standing? If so, then correcting the sitcheck_addr should have fixed this.Why am i the only one haven problems with the scripts..lol..whats different on my computer then everyone elses
Who is online
Users browsing this forum: No registered users and 0 guests