Shaiya - ZS Shaiya Bot

You may request or share scripts for MicroMacro in this forum.
Message
Author
caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya - ZS Shaiya Bot

#61 Post by caccolone » Wed Jun 11, 2008 4:08 pm

naaa your good, its me hard to understand because Im not expert on LUA lenguage :)

so I need copy and paste on my LUA the strings you post here? or I just can use target.lua of ZS and say on my LUA the directory?

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya - ZS Shaiya Bot

#62 Post by caccolone » Wed Jun 11, 2008 5:22 pm

I've insert the strings you post, and put target.lua on script folder

I post here the error I got and the strings of my LUA so you can see what happen :)

error :

Code: Select all

Thu Jun 12 00:18:33 2008 : MicroMacro v0.97
Thu Jun 12 00:18:33 2008 : Processor Type: 586, OS: Windows XP Service Pack 2
Thu Jun 12 00:18:33 2008 : Lua initialized successfully.
Thu Jun 12 00:18:33 2008 : Lua libs opened successfully.
Thu Jun 12 00:18:33 2008 : Lua glues exported.
Thu Jun 12 00:18:33 2008 : Keyboard layout: US English
Thu Jun 12 00:18:33 2008 : Configurations run.
Thu Jun 12 00:18:38 2008 : Executing script "test.lua".
==================================================

Thu Jun 12 00:18:38 2008 : scripts/target.lua:110: attempt to call global 'class' (a nil value)
Thu Jun 12 00:18:38 2008 : Execution of test.lua complete.
Thu Jun 12 00:18:38 2008 : Execution error: Runtime error
Thu Jun 12 00:18:38 2008 : Collecting garbage...
Thu Jun 12 00:18:38 2008 : 21KB freed.
LUA :

Code: Select all

------------------------------------------------
-- MAIN
------------------------------------------------
function init_window()
  win = findWindow("Shaiya");
  if(win == nil) then
    printf(error_init);
    macro_running = false;
  end
end
function init_process()
  proc = openProcess( findProcessByExe("game.exe") );
  if(proc == 0) then
    printf("error opening process.\n");
    macro_running = false;
  end
end
function init_hdc()
  hdc = openDC(get_win());
  local wx, wy, ww, wh = windowRect(get_win());

end
function get_hdc()
  return hdc;
end
function get_win()
  return win;
end
function debug_message(msg)
  if (g_debug) then
    print(msg);
    logMessage(msg);
  end
end
window_mode = false;

g_debug = true;

dofile("scripts/target.lua");

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

  registerTimer("update_vars", 100, update_vars);

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya - ZS Shaiya Bot

#63 Post by caccolone » Wed Jun 11, 2008 5:55 pm

I ask you a big favor because im gona be crazy with it, and cant use bot for ks damnnnnn

can you change my lua and add the no ks feature? is a big help for me

my original lua :

Code: Select all

------------------------------------------------
-- HOTKEYS
------------------------------------------------
startKey = key.VK_F5;
stopKey = key.VK_F6;

key_switchtarget = key.VK_TILDE;

key_attack  = key.VK_1;
key_pickup  = key.VK_9;

key_skill1  = key.VK_2;
key_skill2  = key.VK_3;
key_skill3  = key.VK_4;

key_buff1   = key.VK_NUMPAD1;
key_buff2   = key.VK_NUMPAD2;
key_buff3   = key.VK_NUMPAD3;
key_buff4   = key.VK_NUMPAD4;

key_hp_potion = key.VK_NUMPAD8;
key_mp_potion = key.VK_NUMPAD9;
key_sp_potion = key.VK_NUMPAD0;

key_sit       = key.VK_C;


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


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

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


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


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

------------------------------------------------
-- Memory addresses
------------------------------------------------
playerptr_addr = 0x007835B4;

HP_offset = 296;
MaxHP_offset = 300;
MP_offset = 304;
MaxMP_offset = 308;
SP_offset = 312;
MaxSP_offset = 316;

targetid_addr = 0x0062FAD4; -- short, 65535 if none selected
-- REMOVED -- targettype_addr = 0x00619B1F; -- byte, 0 = player/NPC, 7 = monster

sitcheck_addr = 0x00643648; -- 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;

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

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

skill1_toggle = function () skill1_ready = true; end;
skill2_toggle = function () skill2_ready = true; end;
skill3_toggle = function () skill3_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_potion()
  keyboardPress(key_hp_potion);
  printf("Using HP potion\n");
end


function use_mp_potion()
  keyboardPress(key_mp_potion);
  printf("Using MP potion\n");
end


function use_sp_potion()
  keyboardPress(key_sp_potion);
  printf("Using SP potion\n");
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");
      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 = memoryReadShort(proc, targetid_addr);

  return ( readid ~= 0xFFFF );
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(45), attack_toggle); 

  local targetid = memoryReadByte(proc, targetid_addr);
  printf("TARGETID: %d\n", targetid);

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

    local currentTime = os.time();
    if( os.difftime(currentTime, beginTime) > 5 ) then -- more than 5 seconds has passed
      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( attack_ready ) then
      keyboardPress(key_attack); attack_ready = false; yrest(45000); end;

    if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion(); end
    if( (MP/MaxMP*100) < MP_potion_use and MP_potion_use > 0 ) then use_mp_potion(); end
    if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 0 ) then use_sp_potion(); 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");
  attach(win);
  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( 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); buff3_ready = false; yrest(2000); end;
    if( buff4_ready  and buff4_time > 0 ) then
      keyboardPress(key_buff4); buff4_ready = false; yrest(2000); end;

    if( (HP/MaxHP*100) < HP_potion_use and HP_potion_use > 0 ) then use_hp_potion(); end
    if( (MP/MaxMP*100) < MP_potion_use and MP_potion_use > 0 ) then use_mp_potion(); end
    if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 0 ) then use_sp_potion(); end

    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

startMacro(main);
thanks in advance I hope for you is not problem :)

deaznracer
Posts: 59
Joined: Tue May 20, 2008 5:45 am

Re: Shaiya - ZS Shaiya Bot

#64 Post by deaznracer » Wed Jun 11, 2008 6:01 pm

the target.lua needs to be adjusted too.

Some of the function in target.lua is calling functions from avatar.lua and avatar.lua is calling target.lua so that is why it is giving that nill error.

so 1st step is trace the function in target.lua that is calling avatar.lua. take that function from avatar.lua adjust it to be called properly or modify it however you wish.

here is the edited target.lua code that I did. I Took the code and put it in the same file as the main. I don't create seperate file unless it is a huge project and needs to be organized.

Code: Select all


-- Field Values.
TARGET_UNKNOWN  = 0;
TARGET_DAMAGED  = 1;
TARGET_FULL     = 2;

TARGET_BAR_COLOR = {
  r_min=150, r_max=180,
  g_min=10, g_max=40,
  b_min=50, b_max=80
};

TARGET_HEALTH_BAR_PIXEL_OFFSET_1 = {x=36, y=36};
TARGET_HEALTH_BAR_PIXEL_OFFSET_2 = {x=165, y=36};
TARGET_HEALTH_BAR_PIXEL_OFFSET_3 = {x=100, y=36};

cant = {x=0, y=0};


-- Target Name Color
TARGET_NAME_COLOR_SCAN_OFFSET_1 = {x=98, y=15};
TARGET_NAME_COLOR_SCAN_OFFSET_2 = {x=110, y=15};

target_name_color = {
  unknown=0,
  white=1,
  cyan=2,
  blue=3,
  green=4,
  yellow=5,
  orange=6,
  red=7,
  purple=8,
  grey=9,
}

--[[TARGET_NAME_COLOR_WHITE    = 1;
TARGET_NAME_COLOR_CYAN     = 2;
TARGET_NAME_COLOR_BLUE     = 3;
TARGET_NAME_COLOR_GREEN    = 4;
TARGET_NAME_COLOR_YELLOW   = 5;
TARGET_NAME_COLOR_ORANGE   = 6;
TARGET_NAME_COLOR_RED      = 7;
TARGET_NAME_COLOR_PURPLE   = 8;
TARGET_NAME_COLOR_GREY     = 9;]]


-- In order of difficulty, from easiest to hardest.
target_name_color_rgb = {
  [target_name_color["white"]]   = {r_min=255, r_max=255,
                                    g_min=255, g_max=255,
                                    b_min=255, b_max=255},
  [target_name_color["cyan"]]    = {r_min=120, r_max=140,
                                    g_min=255, g_max=255,
                                    b_min=255, b_max=255},
  [target_name_color["blue"]]    = {r_min=0, r_max=0,
                                    g_min=0, g_max=0,
                                    b_min=255, b_max=255},
  [target_name_color["green"]]   = {r_min=0, r_max=0,
                                    g_min=255, g_max=255,
                                    b_min=0, b_max=0},
  [target_name_color["yellow"]]  = {r_min=255, r_max=255,
                                    g_min=255, g_max=255,
                                    b_min=0, b_max=0},
  [target_name_color["orange"]]  = {r_min=255, r_max=255,
                                    g_min=128, g_max=128,
                                    b_min=0, b_max=0},
  [target_name_color["red"]]     = {r_min=255, r_max=255,
                                    g_min=0, g_max=0,
                                    b_min=0, b_max=0},
  [target_name_color["purple"]]  = {r_min=255, r_max=255,
                                    g_min=0, g_max=0,
                                    b_min=255, b_max=255},
  --[target_name_color["grey"]]  = {r_min=255, r_max=255,
   --                               g_min=255, g_max=255,
   --                               b_min=255, b_max=255},
}


TARGET_TYPE_FRIENDLY  = 0;
TARGET_TYPE_NOTHING   = -1;

-- Delays.
MONSTER_DIE_DELAY = 500;

-- Status Info Bar, offset.
STATUSINFOBAR_POS = {x=0, y=0};

-- Target constructor.


-- Refreshes the variables of the target from memory.
-- @return nothing.


-- Looks at pixels in the status info bar in the h/w device context,
-- to determine the status of the monster.
-- note - this has known errors, changing the colour bit value, or restarting PC
--        seems to fix it.
-- @return TARGET_UNKNOWN does not have any detectable red bar.
--         TARGET_DAMAGED if some red bar exists.
--         TARGET_FULL full red bar.
function status()
  local pos_1 = {x=(STATUSINFOBAR_POS["x"] + TARGET_HEALTH_BAR_PIXEL_OFFSET_1["x"]),
			    y=(STATUSINFOBAR_POS["y"] + TARGET_HEALTH_BAR_PIXEL_OFFSET_1["y"])};
  local pos_2 = {x=(STATUSINFOBAR_POS["x"] + TARGET_HEALTH_BAR_PIXEL_OFFSET_2["x"]),
			    y=(STATUSINFOBAR_POS["y"] + TARGET_HEALTH_BAR_PIXEL_OFFSET_2["y"])};
  local pos_3 = {x=(STATUSINFOBAR_POS["x"] + TARGET_HEALTH_BAR_PIXEL_OFFSET_3["x"]),
			    y=(STATUSINFOBAR_POS["y"] + TARGET_HEALTH_BAR_PIXEL_OFFSET_3["y"])};

local pos_4 = {x=(STATUSINFOBAR_POS["x"] + cant["x"]),
			    y=(STATUSINFOBAR_POS["y"] + cant["y"])};

  --printf("x1:%d y1:%d x2:%d y2:%d\n", pos_1["x"], pos_1["y"], pos_2["x"], pos_2["y"]);

  local l_hdc = get_hdc();
-- s(RGB) begining E(RGB) end M(RGB) middle;
  local sr,sg,sb;
  local er,eg,eb;
local cr,cg,cb;

local mr,mg,mb;
  if (window_mode) then
    local wx, wy = windowRect(get_win());
    --debug_message(sprintf("win_x: %d, wim_y: %d\n", wx, wy));

    sr,sg,sb = getPixel(l_hdc, (wx + pos_1["x"]), (wy + pos_1["y"]));
    er,eg,eb = getPixel(l_hdc, (wx + pos_2["x"]), (wy + pos_2["y"]));
mr,mg,mb = getPixel(l_hdc, (wx + pos_3["x"]), (wy + pos_3["y"]));

cr,cg,cb = getPixel(l_hdc, (wx + pos_4["x"]), (wy + pos_4["y"]));

  else
    sr,sg,sb = getPixel(l_hdc, pos_1["x"], pos_1["y"]);
    er,eg,eb = getPixel(l_hdc, pos_2["x"], pos_2["y"]);
mr,mg,mb = getPixel(l_hdc, pos_3["x"], pos_3["y"]);
cr,cg,cb = getPixel(l_hdc, pos_4["x"], pos_4["y"]);
  end
  --closeDC(hdc);
  --debug_message(sprintf("sr: %d, sg: %d, sb: %d", sr, sg, sb));
  --debug_message(sprintf("er: %d, eg: %d, eb: %d", er, eg, eb));
--debug_message(sprintf("mr: %d, mg: %d, mb: %d", mr, mg, mb));
debug_message(sprintf("cr: %d, cg: %d, cb: %d", cr, cg, cb));
  if ((sr >= TARGET_BAR_COLOR["r_min"] and
        sr <= TARGET_BAR_COLOR["r_max"]) and
      (sg >= TARGET_BAR_COLOR["g_min"] and
        sg <= TARGET_BAR_COLOR["g_max"]) and
      (sb >= TARGET_BAR_COLOR["b_min"] and
        sb <= TARGET_BAR_COLOR["b_max"]))
  then
      if((er <= TARGET_BAR_COLOR["r_min"] and
          er <= TARGET_BAR_COLOR["r_max"]) and
        (eg <= TARGET_BAR_COLOR["g_min"] and
          eg <= TARGET_BAR_COLOR["g_max"]) and
        (eb <= TARGET_BAR_COLOR["b_min"] and
          eb <= TARGET_BAR_COLOR["b_max"])) 
      then
	if((mr <= TARGET_BAR_COLOR["r_min"] and
          mr <= TARGET_BAR_COLOR["r_max"]) and
          (mg <= TARGET_BAR_COLOR["g_min"] and
          mg <= TARGET_BAR_COLOR["g_max"]) and
          (mb <= TARGET_BAR_COLOR["b_min"] and
          mb <= TARGET_BAR_COLOR["b_max"])) 
      	then
	  emergencyHeal=1;
	end
        return TARGET_DAMAGED;     
      end
	return TARGET_FULL;
  end
  return TARGET_UNKNOWN;
end


so it would look like this for the setup.

Code: Select all

*the 1st code of functions I gave you *

*the paste the 2nd function that i just posted *

*elv's shaiya bot code.*

function main()
  proc = openProcess(findProcessByExe("game.exe"));
  win = findWindow("Shaiya");
  attach(win);
  setPriority(PRIORITY_HIGH);
init_window();
  init_process();
  init_hdc();

*IMPORTANT* do your code here  example: If target is dmg then don't attack*


startMacro(main);

deaznracer
Posts: 59
Joined: Tue May 20, 2008 5:45 am

Re: Shaiya - ZS Shaiya Bot

#65 Post by deaznracer » Wed Jun 11, 2008 6:42 pm

caccolone wrote:I ask you a big favor because im gona be crazy with it, and cant use bot for ks damnnnnn

can you change my lua and add the no ks feature? is a big help for me

my original lua :



thanks in advance I hope for you is not problem :)

I can do it but You don't learn anything and whats in it for me if i decide to do it.

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya - ZS Shaiya Bot

#66 Post by caccolone » Thu Jun 12, 2008 1:38 am

yea I know your point but for me is hard for leanguage too, if I can see my LUA changed by you I can learn better cuz I confront my LUA with my new LUA edited by you, and after that I following all steps you tell me here :) need learn a better english before may understand your good explain here :)

thanks alot man :)

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya - ZS Shaiya Bot

#67 Post by caccolone » Thu Jun 12, 2008 6:41 am

well I've copyed your target value, main value, but after I press F5 got an error

Code: Select all

Thu Jun 12 13:34:22 2008 : MicroMacro v0.97
Thu Jun 12 13:34:22 2008 : Processor Type: 586, OS: Windows XP Service Pack 2
Thu Jun 12 13:34:22 2008 : Lua initialized successfully.
Thu Jun 12 13:34:22 2008 : Lua libs opened successfully.
Thu Jun 12 13:34:22 2008 : Lua glues exported.
Thu Jun 12 13:34:22 2008 : Keyboard layout: US English
Thu Jun 12 13:34:22 2008 : Configurations run.
Thu Jun 12 13:34:27 2008 : Executing script "test.lua".
==================================================

Thu Jun 12 13:34:27 2008 : scripts/target.lua:110: attempt to call global 'class' (a nil value)
Thu Jun 12 13:34:27 2008 : Execution of test.lua complete.
Thu Jun 12 13:34:27 2008 : Execution error: Runtime error
Thu Jun 12 13:34:27 2008 : Collecting garbage...
Thu Jun 12 13:34:27 2008 : 27KB freed.
ok Im really tired to try out this program I have lose some days and still cant use it :( please you got my LUA change it for me, let me using the bot with no KS feature, please man

thanks

Dnic
Posts: 24
Joined: Sun Jun 01, 2008 4:03 pm

Re: Shaiya - ZS Shaiya Bot

#68 Post by Dnic » Sat Aug 23, 2008 11:46 am

Not sure if this script still works. Trying to use it for a pagan. When I try to start it in mirco I get:

Code: Select all

Sat Aug 23 09:46:07 2008 : Executing script "zs_shaiya/main.lua".
==================================================

Sat Aug 23 09:46:07 2008 : macro_init()
Sat Aug 23 09:46:07 2008 : win_width: 160, win_height: 120

Sat Aug 23 09:46:07 2008 : WARNING: Failure reading memory from 0x28AD300 at 0x2110ac8 in memoryReadIntPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Aug 23 09:46:07 2008 : Execution of zs_shaiya/main.lua complete.
Sat Aug 23 09:46:07 2008 : Execution success.
Sat Aug 23 09:46:07 2008 : Collecting garbage...
Sat Aug 23 09:46:07 2008 : 13KB freed.
Not sure if its due to the script not working or something I did wrong.

zer0
Posts: 213
Joined: Sat Feb 16, 2008 11:55 pm

Re: Shaiya - ZS Shaiya Bot

#69 Post by zer0 » Mon Sep 01, 2008 2:36 am

Script is not working.

duski
Posts: 1
Joined: Sat Sep 13, 2008 9:57 pm

Re: Shaiya - ZS Shaiya Bot

#70 Post by duski » Sat Sep 13, 2008 10:02 pm

well i have read alot of stuff in this particular topic, though im not an in depth gamer or programmer anymore due to now having a family, i most definately find this information very intriguing and i spent a good portion of time indulging my night into reading about this shaiya bot. sadly i dont have alot of time in order to help out in any concepts, due to work 12hrs a day then kids for 3+hrs a night before they go to bed, then soon shortly i have to get some sleep myself. i just basically wanted to write in this post for was for the reason of lettin yall know yall are makin a nice bot. ive yet to test or try much within it, though like i said what ive read is very intriguing =) good job

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya - ZS Shaiya Bot

#71 Post by Administrator » Sat Sep 13, 2008 10:33 pm

Thanks for the input. Users/testers are just as important as the developers here. You'd be surprised how much positive feedback actually does. Although none of the scripts posted here thus far are very complex, I hope to continue to add new features and tools to the MicroMacro core that allows us to eventually create very sophisticated bots with ease. I'm kind of experimenting with possible pathfinding...we'll see where this takes us, though.

zer0
Posts: 213
Joined: Sat Feb 16, 2008 11:55 pm

Re: Shaiya - ZS Shaiya Bot

#72 Post by zer0 » Sun Sep 14, 2008 3:31 am

Thanks for the positive feedback.

Yeah, you get to a point when u realise that a bot script can only do so much, unless it uses some pretty advanced AI techniques, and having advanced AI means it needs to look at client data which is tedious to find, and I avoid it since a client version change can also change the memory address offsets. ;)

holycow1
Posts: 9
Joined: Thu Oct 09, 2008 3:48 pm

Re: Shaiya - ZS Shaiya Bot

#73 Post by holycow1 » Thu Oct 09, 2008 8:04 pm

hey ive been reading this forum and also the forums on MPC. I have an earlier bot (shaiya.lua) running but cant seem to get this one to work. I followed the directions to the letter but the script isnt working with micromacro. I wanted the color code and the no KS functions, thats why im trying this script. Im not very skilled at programming but would appreciate any help. heres my log

Thu Oct 09 21:02:31 2008 : MicroMacro v0.98
Thu Oct 09 21:02:31 2008 : Processor Type: 2X 586, OS: Windows XP Service Pack 3
Thu Oct 09 21:02:31 2008 : Lua initialized successfully.
Thu Oct 09 21:02:31 2008 : Lua libs opened successfully.
Thu Oct 09 21:02:31 2008 : LuaCoco is available.
Thu Oct 09 21:02:31 2008 : Lua glues exported.
Thu Oct 09 21:02:31 2008 : Keyboard layout: US English
Thu Oct 09 21:02:31 2008 : Configurations run.
Thu Oct 09 21:02:31 2008 : Executing script "log.txt".
==================================================

Thu Oct 09 21:02:31 2008 : ...s and Settings\Owner\My Documents\Unzipped\micromacro\micromacro\log.txt:1: '=' expected near 'Oct'
Thu Oct 09 21:02:31 2008 : Execution of log.txt complete.
Thu Oct 09 21:02:31 2008 : Execution error: Syntax error
Thu Oct 09 21:02:31 2008 : Collecting garbage...
Thu Oct 09 21:02:31 2008 : 27KB freed.

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya - ZS Shaiya Bot

#74 Post by Administrator » Thu Oct 09, 2008 9:11 pm

Your log is an error log of your log. You do not want to run log.txt through MicroMacro. Run the script like normal until you get an error message or experience a problem, then copy/paste your log here.

Chances are you'll need to just update your addresses. Go to the other Shaiya thread (the one I started) and download my script. Take the addresses, pointers, and offsets from my script and transplant them into the ZS Shaiya bot.

holycow1
Posts: 9
Joined: Thu Oct 09, 2008 3:48 pm

Re: Shaiya - ZS Shaiya Bot

#75 Post by holycow1 » Fri Oct 10, 2008 1:10 pm

thanks for responding so quickly. My lua knowledge is still basic but ive been following a tutorial on wiki to change that. I reinstalled micromacro, and redownloaded both scripts for a fresh start. I plugged in the addresses from shaiya.lua into zs_shaiya, but his script has numerous .lua files and 7 different addresses while your original has only 3 updated addresses. On the original there is playerptr_addr, targetid_addr, and sitcheck_addr. I plugged these in for avatar_ptr, target_type_addr, and avatar_sit_check_address respectively. Under ZS's target.lua there is 3 more addresses (target_pos_x_address, pos_y, and pos_z), and under the avatar.lua there is avatar_name_address, which are the 4 remaining "old" addresses. Ive set my target info bar to the top left corner, set the hotkeys, made the char.lua file, and changed the known addresses but am still getting some error.

log
Fri Oct 10 13:54:31 2008 : MicroMacro v0.98
Fri Oct 10 13:54:31 2008 : Processor Type: 2X 586, OS: Windows XP Service Pack 3
Fri Oct 10 13:54:31 2008 : Lua initialized successfully.
Fri Oct 10 13:54:31 2008 : Lua libs opened successfully.
Fri Oct 10 13:54:31 2008 : LuaCoco is available.
Fri Oct 10 13:54:31 2008 : Lua glues exported.
Fri Oct 10 13:54:31 2008 : Keyboard layout: US English
Fri Oct 10 13:54:31 2008 : Configurations run.
Fri Oct 10 13:54:43 2008 : Executing script "main.lua".
==================================================

Fri Oct 10 13:54:43 2008 : macro_init()
Fri Oct 10 13:54:43 2008 : win_width: 1280, win_height: 1024

Fri Oct 10 13:54:43 2008 : Execution of main.lua complete.
Fri Oct 10 13:54:43 2008 : Execution success.
Fri Oct 10 13:54:43 2008 : Collecting garbage...
Fri Oct 10 13:54:43 2008 : 38KB freed.



Fri Oct 10 13:56:30 2008 : Executing script "main.lua".
==================================================

Fri Oct 10 13:56:30 2008 : macro_init()
Fri Oct 10 13:56:30 2008 : win_width: 1280, win_height: 1024

Fri Oct 10 13:56:30 2008 : Execution of main.lua complete.
Fri Oct 10 13:56:30 2008 : Execution success.
Fri Oct 10 13:56:30 2008 : Collecting garbage...
Fri Oct 10 13:56:30 2008 : GC closed device context handle 0xA9CD98.
Fri Oct 10 13:56:30 2008 : GC closed process handle 0x70.
Fri Oct 10 13:56:30 2008 : 116KB freed.



hope this is the log your looking for

thank you elverion

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya - ZS Shaiya Bot

#76 Post by Administrator » Fri Oct 10, 2008 4:31 pm

It looks like zerosignal is still working with Shaiya, so hopefully he'll be willing to share the new addresses/pointers/offsets. Or maybe his bot is a whole new rewrite.

holycow1
Posts: 9
Joined: Thu Oct 09, 2008 3:48 pm

Re: Shaiya - ZS Shaiya Bot

#77 Post by holycow1 » Fri Oct 10, 2008 7:07 pm

cool ive got your original shaiya.lua and deaznracer's fighter.lua running although i cant seem to get either to use more than just the first skill hotkey. if anyone needs a tester for thier scripts im willing to run it and give feedback on any issues i find.

zer0
Posts: 213
Joined: Sat Feb 16, 2008 11:55 pm

Re: Shaiya - ZS Shaiya Bot

#78 Post by zer0 » Tue Oct 28, 2008 8:56 am

This script is dead.

see the newer release:
http://solarimpact.servegame.com/phpBB3 ... ?f=3&t=145

Locked

Who is online

Users browsing this forum: No registered users and 9 guests