Offsets

For any other game that doesn't have its own section.
Message
Author
shakey
Posts: 56
Joined: Sun Nov 16, 2008 4:02 am

Offsets

#1 Post by shakey » Tue Jul 28, 2009 3:46 am

Anyone have the new offsets and pointers? I just reformatted my comp so I lost all of what I had going.

vvayinsane
Posts: 148
Joined: Fri Mar 21, 2008 9:10 pm

Re: Offsets

#2 Post by vvayinsane » Tue Jul 28, 2009 6:09 am

playerptr_addr = 0x848274;
All offsets are still the same

sitcheck_addr = 0x708300;

Happy Botting

shakey
Posts: 56
Joined: Sun Nov 16, 2008 4:02 am

Re: Offsets

#3 Post by shakey » Tue Jul 28, 2009 3:29 pm

Any idea about the target ID? Right now it attacks 1 then stops.

vvayinsane
Posts: 148
Joined: Fri Mar 21, 2008 9:10 pm

Re: Offsets

#4 Post by vvayinsane » Tue Jul 28, 2009 4:49 pm

The bot is working just find for me. The target Id i have is 0x6F3BE0. Ill look into it but the bot is targeting and attacking for me just fine.

shakey
Posts: 56
Joined: Sun Nov 16, 2008 4:02 am

Re: Offsets

#5 Post by shakey » Tue Jul 28, 2009 4:58 pm

K,that's what I'm using. But it's still not working. Think you could put up your .lua?

vvayinsane
Posts: 148
Joined: Fri Mar 21, 2008 9:10 pm

Re: Offsets

#6 Post by vvayinsane » Wed Jul 29, 2009 2:13 pm

playerptr_addr = 0x848274;
targetid_addr = 0x6F3BE0;
sitcheck_addr = 0x708300;
-- byte, 0 = standing, 7 = sitting, 1 = moving, 2 = animation, 3 = jumping, 5 = process of sitting, 6 = process of standing
swimcheck_addr = 0x006F6DA4; -- EP3 (this has not been fixed)

HP_offset = 0x130;
MaxHP_offset = 0x134;
MP_offset = 0x138;
MaxMP_offset = 0x13C;
SP_offset = 0x140;
MaxSP_offset = 0x144;

shakey
Posts: 56
Joined: Sun Nov 16, 2008 4:02 am

Re: Offsets

#7 Post by shakey » Thu Jul 30, 2009 1:41 am

K, it works. But it doesn't switch targets after a kill. It has to wait the 60 seconds (which I shortened to 30), before it will re-target. It just says Must Choose a target.

Joy. Any ideas?

nknwn666
Posts: 30
Joined: Fri Feb 20, 2009 3:45 pm

Re: Offsets

#8 Post by nknwn666 » Thu Jul 30, 2009 2:35 am

maybe the targets dont have the rite colors

vvayinsane
Posts: 148
Joined: Fri Mar 21, 2008 9:10 pm

Re: Offsets

#9 Post by vvayinsane » Thu Jul 30, 2009 1:31 pm

shakey
I thinki know your problem. The pickup key is y. with my version of fighter.lua the pickup key is number 2. So the waiting for next target is the bot trying to pick up something pressing the y key.

sebzeN
Posts: 4
Joined: Sat Aug 01, 2009 2:22 pm

Re: Offsets

#10 Post by sebzeN » Sat Aug 01, 2009 2:27 pm

I find this error :
Attachments
help me vvayinsane please ^^
help me vvayinsane please ^^

shakey
Posts: 56
Joined: Sun Nov 16, 2008 4:02 am

Re: Offsets

#11 Post by shakey » Sat Aug 01, 2009 9:00 pm

You need to be logged into shaiya and at your spot before you try running it.

sebzeN
Posts: 4
Joined: Sat Aug 01, 2009 2:22 pm

Re: Offsets

#12 Post by sebzeN » Mon Aug 03, 2009 3:01 am

I know.

When i use it, I'm into shaiya and i'm in my spot.

The bot running, attack and change target (it's nice)

But, when HP is under "90 %" (It's my percent) it does'nt sit.

Anyone know my problem(s)?

Thanks shakey to help me !!

vvayinsane
Posts: 148
Joined: Fri Mar 21, 2008 9:10 pm

Re: Offsets

#13 Post by vvayinsane » Mon Aug 03, 2009 2:52 pm

im not sure what bot your talking about and did you make any changes to the bot? Post your bots .lua and ill take a look at it real quick

sebzeN
Posts: 4
Joined: Sat Aug 01, 2009 2:22 pm

Re: Offsets

#14 Post by sebzeN » Mon Aug 03, 2009 3:01 pm

Yes i have changed memory adresses !


-------------------------------------------------------------------
-------------------------------------------------------------------
-- Title: Shaiya Bot --
-- Author: Elverion --
-- Date: May 29, 2008 --
-- Requirements: MicroMacro v0.97 --
-- License: Public Domain --
-------------------------------------------------------------------
-------------------------------------------------------------------
-- This script is public domain. You may use it in any way you --
-- find appropriate without restriction. This includes, but is --
-- not limited to, modification and distribution, whether it be --
-- commercial or not. --
-------------------------------------------------------------------
-------------------------------------------------------------------




------------------------------------------------
-- HOTKEYS
------------------------------------------------
startKey = key.VK_INSERT;
stopKey = key.VK_DELETE;

key_switchtarget = key.VK_TILDE;

key_attack = key.VK_1;
key_pickup = key.VK_2;

key_skill1 = key.VK_3;
key_skill2 = key.VK_4;
key_skill3 = key.VK_5;
key_skill4 = key.VK_6;


key_buff1 = key.VK_7;
key_buff2 = key.VK_8;
key_buff3 = key.VK_9;
key_buff4 = key.VK_0;

key_hp_potion1 = key.VK_NUMPAD1;
key_hp_potion2 = key.VK_NUMPAD2;
key_hp_potion3 = key.VK_NUMPAD3;
key_hp_potion4 = key.VK_NUMPAD4;
key_hp_potion5 = key.VK_NUMPAD5;
key_hp_potion6 = key.VK_NUMPAD6;
key_mp_potion1 = key.VK_NUMPAD7;
key_mp_potion2 = key.VK_NUMPAD8;
key_sp_potion1 = key.VK_NUMPAD9;
key_sp_potion2 = key.VK_NUMPAD0;

key_sit = key.VK_C;


------------------------------------------------
-- SKILLS
------------------------------------------------
-- Set to 0 if you don't want to use a skill
skill1_time = secondsToTimer(5);
skill2_time = secondsToTimer(5);
skill3_time = secondsToTimer(5);
skill4_time = secondsToTimer(5);


------------------------------------------------
-- BUFFS
------------------------------------------------
-- Set a buff to 0 if you don't want to use it
buff1_time = minutesToTimer(10);
buff2_time = 0;
buff3_time = 0;
buff4_time = 0;

------------------------------------------------
-- POTIONS
------------------------------------------------
-- All potion use values are specified in %
-- Set the values to 0 to not use that potion
HP_potion_use = 20;
MP_potion_use = 20;
SP_potion_use = 20;


------------------------------------------------
-- 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 = 90;
MP_sit = 10;
SP_sit = 10;


--[[*********************************************************************
**************************************************************************
DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
**************************************************************************
************************************************************************]]

------------------------------------------------
-- Memory addresses
------------------------------------------------
playerptr_addr = 0x848E74;

HP_offset = 0x130;
MaxHP_offset = 0x134;
MP_offset = 0x138;
MaxMP_offset = 0x13C;
SP_offset = 0x140;
MaxSP_offset = 0x144;

targetid_addr = 0x6F3BE0; -- 4 bytes 0xFFFFFFFF if none selected

sitcheck_addr = 0x708300; -- byte, 0 = standing, 7 = sitting


------------------------------------------------
-- Variable setup
------------------------------------------------
HP = 10000;
MaxHP = HP;
MP = 10000;
MaxMP = MP;
SP = 10000;
MaxSP = SP;

skill1_ready = true;
skill2_ready = true;
skill3_ready = true;
skill4_ready = true;

buff1_ready = true;
buff2_ready = true;
buff3_ready = true;
buff4_ready = true;

sittingTempDisabled = false; -- don't change this. it's just temporary.

------------------------------------------------
-- Functions
------------------------------------------------

skill1_toggle = function () skill1_ready = true; end;
skill2_toggle = function () skill2_ready = true; end;
skill3_toggle = function () skill3_ready = true; end;
skill4_toggle = function () skill4_ready = true; end;

buff1_toggle = function () buff1_ready = true; end;
buff2_toggle = function () buff2_ready = true; end;
buff3_toggle = function () buff3_ready = true; end;
buff4_toggle = function () buff4_ready = true; end;


function use_hp_potion1()
keyboardPress(key_hp_potion1);
printf("Using HP potion 1\n");
end

function use_hp_potion2()
keyboardPress(key_hp_potion2);
printf("Using HP potion 2\n");
end

function use_hp_potion3()
keyboardPress(key_hp_potion3);
printf("Using HP potion 3\n");
end

function use_hp_potion4()
keyboardPress(key_hp_potion4);
printf("Using HP potion 4\n");
end

function use_hp_potion5()
keyboardPress(key_hp_potion5);
printf("Using HP potion 5\n");
end

function use_hp_potion6()
keyboardPress(key_hp_potion6);
printf("Using HP potion 6\n");
end

function use_mp_potion1()
keyboardPress(key_mp_potion1);
printf("Using MP potion 1\n");
end

function use_mp_potion2()
keyboardPress(key_mp_potion2);
printf("Using MP potion 2\n");
end

function use_sp_potion1()
keyboardPress(key_sp_potion1);
printf("Using SP potion 1\n");
end

function use_sp_potion2()
keyboardPress(key_sp_potion2);
printf("Using SP potion 2\n");
end

function tempDisableSitting()
sittingTempDisabled = true;

registerTimer("reenable_sitting", secondsToTimer(5),
function () sittingTempDisabled = false unregisterTimer("reenable_sitting") end );
end

function sit()
if( HP_sit == 0 ) then
return; end

printf("Sitting.\n");

local sitting = false;
while( sitting == false ) do
keyboardPress(key_sit);
yrest(1000);

sitting = memoryReadByte(proc, sitcheck_addr) ~= 0;
end

local lasthp = HP;

while( true ) do
if( HP == MaxHP and MP == MaxMP and SP == MaxSP ) then
switch_target();
break;
end

if( HP < (lasthp - 10) ) then
printf("Exiting rest...under attack\n");
tempDisableSitting(); -- so we don't end up sitting right away again
break;
else
lasthp = HP;
end

yrest(100);
end

sitting = true;
while( sitting ) do
keyboardPress(key_sit);
yrest(1000);

sitting = memoryReadByte(proc, sitcheck_addr) ~= 0;
end

printf("Standing... Resuming bot\n");
yrest(1000);
end


function pickup()
printf("Pickup!\n");
if( key_pickup == 0 ) then return; end

local i;
for i = 0, 5 do
keyboardPress(key_pickup);
yrest(500);
end

yrest(1000);
end


function update_vars()
HP = memoryReadIntPtr(proc, playerptr_addr, HP_offset);
MaxHP = memoryReadIntPtr(proc, playerptr_addr, MaxHP_offset);

MP = memoryReadIntPtr(proc, playerptr_addr, MP_offset);
MaxMP = memoryReadIntPtr(proc, playerptr_addr, MaxMP_offset);

SP = memoryReadIntPtr(proc, playerptr_addr, SP_offset);
MaxSP = memoryReadIntPtr(proc, playerptr_addr, MaxSP_offset);
end


function have_target()
local readid = memoryReadUInt(proc, targetid_addr);

return ( readid ~= 0xFFFFFFFF );
end

function find_target()
keyboardPress(key_attack);
end

function switch_target()
keyboardPress(key_switchtarget);
end


------------------------------------------------
-- FIGHT
------------------------------------------------
function fight()
local beginTime = os.time();
local attack_ready = true;

local attack_toggle = function () attack_ready = true; end;
registerTimer("attack_timer", secondsToTimer(3), attack_toggle);

local attack_count = 0;

local targetid = memoryReadUInt(proc, targetid_addr);
printf("TARGETID: 0x%X\n", targetid);

while( have_target() ) do
local curtarget = memoryReadUInt(proc, targetid_addr);
if( targetid ~= curtarget ) then break; end;

local currentTime = os.time();
if( os.difftime(currentTime, beginTime) > 5 ) then -- more than 1 minute has passed
keyboardPress(key_switchtarget);
break; -- exit combat
end

if( skill1_ready and skill1_time > 0 ) then
keyboardPress(key_skill1); skill1_ready = false; yrest(1000);
registerTimer("skill1_toggle", skill1_time, skill1_toggle);
end;

if( skill2_ready and skill2_time > 0) then
keyboardPress(key_skill2); skill2_ready = false; yrest(1000);
registerTimer("skill2_toggle", skill2_time, skill2_toggle);
end;

if( skill3_ready and skill3_time > 0) then
keyboardPress(key_skill3); skill3_ready = false; yrest(1000);
registerTimer("skill3_toggle", skill3_time, skill3_toggle);
end;

if( skill4_ready and skill4_time > 0) then
keyboardPress(key_skill4); skill4_ready = false; yrest(1000);
registerTimer("skill4_toggle", skill4_time, skill4_toggle);
end;

if( attack_ready and attack_count < 3 ) then
keyboardPress(key_attack); attack_ready = false; yrest(1000);
attack_count = attack_count + 1;
end;

if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion1(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion2(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion3(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion4(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion5(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion6(); end
if( (MP/MaxMP*100) < MP_potion_use and MP_potion_use > 0 ) then use_mp_potion1(); end
if( (MP/MaxMP*100) < MP_potion_use and MP_potion_use > 0 ) then use_mp_potion2(); end
if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 0 ) then use_sp_potion1(); end
if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 0 ) then use_sp_potion2(); end

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( buff3_ready and buff3_time > 0 ) then
keyboardPress(key_buff3); buff3_ready = false; yrest(2000); end;
if( buff4_ready and buff4_time > 0 ) then
keyboardPress(key_buff4); buff4_ready = false; yrest(2000); end;

yrest(100);
end

printf("Target lost.\n");

unregisterTimer("attack_timer");

pickup()
end


------------------------------------------------
-- MAIN
------------------------------------------------
function main()
proc = openProcess(findProcessByExe("game.exe"));
win = findWindow("Shaiya");
setPriority(PRIORITY_HIGH);

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( skill4_time ) then registerTimer("skill4_toggle", skill4_time, skill4_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;
if( buff3_time ) then registerTimer("buff3_toggle", buff3_time, buff3_toggle); end;
if( buff4_time ) then registerTimer("buff4_toggle", buff4_time, buff4_toggle); end;

while( true ) do
find_target();

yrest(200);

if( have_target() ) then
fight();
end

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( buff3_ready and buff3_time > 0 ) then
keyboardPress(key_buff3); buff1_ready = false; yrest(2000); end;
if( buff4_ready and buff4_time > 0 ) then
keyboardPress(key_buff4); buff2_ready = false; yrest(2000); end;

if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 50 ) then use_hp_potion1(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 50 ) then use_hp_potion2(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 50 ) then use_hp_potion3(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 50 ) then use_hp_potion4(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 50 ) then use_hp_potion5(); end
if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 50 ) then use_hp_potion6(); end
if( (MP/MaxMP*100) < MP_potion_use and MP_potion_use > 50 ) then use_mp_potion1(); end
if( (MP/MaxMP*100) < MP_potion_use and MP_potion_use > 50 ) then use_mp_potion2(); end
if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 50 ) then use_sp_potion1(); end
if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 50 ) then use_sp_potion2(); end

if( not sittingTempDisabled ) then
if( (HP/MaxHP*100) < HP_sit and (HP_sit > 0) ) then sit(); end
if( (MP/MaxMP*100) < MP_sit and (MP_sit > 0) ) then sit(); end
if( (SP/MaxSP*100) < SP_sit and (SP_sit > 0) ) then sit(); end
end

end
end

startMacro(main);

User avatar
Rishijin
Posts: 49
Joined: Sat Jul 04, 2009 4:25 pm
Location: Kauai

Re: Offsets

#15 Post by Rishijin » Mon Aug 03, 2009 5:24 pm

The player pointer is 848274, not 848E74.

sebzeN
Posts: 4
Joined: Sat Aug 01, 2009 2:22 pm

Re: Offsets

#16 Post by sebzeN » Tue Aug 04, 2009 3:32 am

Thanks i have changed pointer but i have this error now :
Attachments
pb.JPG

Lordus
Posts: 2
Joined: Thu Aug 06, 2009 8:28 am

Re: Offsets

#17 Post by Lordus » Thu Aug 06, 2009 8:36 am

After the yesterday patch,the playerptr_addr changed

How to find new playerptr_addr ?And how to search the Offsets?
Attachments
123.jpg

Yorkshire
Posts: 21
Joined: Wed Mar 18, 2009 5:16 pm

Re: Offsets

#18 Post by Yorkshire » Thu Aug 06, 2009 3:18 pm

Anyone can post new pointers plspls tnx

vvayinsane
Posts: 148
Joined: Fri Mar 21, 2008 9:10 pm

Re: Offsets

#19 Post by vvayinsane » Thu Aug 06, 2009 3:35 pm

playerptr_addr = 0x849274; -- EP4
targetid_addr = 0x7D4891; -- 0x002ABFF0; EP4 try 0x006d0bc4
sitcheck_addr = 0x709300; --EP4
-- byte, 0 = standing, 7 = sitting, 1 = moving, 2 = animation, 3 = jumping, 5 = process of

sitting, 6 = process of standing
swimcheck_addr = 0x006F6DA4; -- EP3

HP_offset = 0x130;
MaxHP_offset = 0x134;
MP_offset = 0x138;
MaxMP_offset = 0x13C;
SP_offset = 0x140;
MaxSP_offset = 0x144;

Lordus
Posts: 2
Joined: Thu Aug 06, 2009 8:28 am

Re: Offsets

#20 Post by Lordus » Fri Aug 07, 2009 3:48 am

Thx,the bot is working fine now!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests