Page 7 of 12

Re: Shaiya Fighter Bot

Posted: Wed Sep 10, 2008 9:07 pm
by Jolt981
It's set to US English, it types the ` or ~ with shift, it just wont switch targets in game

Re: Shaiya Fighter Bot

Posted: Thu Sep 11, 2008 1:01 am
by Administrator
Do you have a US English keyboard? Which key do you manually press to switch targets?

Re: Shaiya Fighter Bot

Posted: Thu Sep 11, 2008 2:18 pm
by Jolt981
There isn't one, none of them work to do so, I have to use the mouse or the attack hotkey, and it's mildly annoying at times.

Re: Shaiya Fighter Bot

Posted: Thu Sep 11, 2008 4:27 pm
by Administrator
Then use the attack hotkey to target. I think that's what I ended up using in my script anyways.

Re: Shaiya Fighter Bot

Posted: Thu Sep 11, 2008 5:45 pm
by Jolt981
That's what I've been doing; it's been a little hit or miss, just means I have to pay attention to it and hit attack from time to time, which i had the intention of doing to begin with. Just means I can't pay 100% attention to CoD4 :) Thanks anyway

Re: Shaiya Fighter Bot

Posted: Mon Sep 22, 2008 12:39 pm
by Archon
It was easy to set up, but I really don't see a function for this below level 45 HM/UM.

On UM, it's too dangerous to use it because you'll end up losing your character.

On HM, well, would you really want to use something that could get your high level HM banned?

I see a function as a Gold Farmer, set up your character to kill White dungeon mobs, but other than that, I think on NM you level up too fast for this to really be effective unless it had a function that would slowly move you across the map to harder mobs.

Re: Shaiya Fighter Bot

Posted: Thu Sep 25, 2008 10:41 pm
by zer0
Someone was asking about having a healer bot that casts heals when damaged.

Here is an extract of some of my code. You will need to re-write it to make it compatible with whatever script you use, but the general algorithm is shown.

Code: Select all

RGB = class(
  function(obj, red, green, blue)
    obj.red = red;
    obj.green = blue;
    obj.blue = green;
  end
)

GUI_STATUSMINIBAR_BAR_OFFSETS = {
  hp={x=82,y=38,w=130,},
  mp={x=92,y=56,w=120,},
  sp={x=95,y=75,w=115,},
}
GUI_STATUSMINIBAR_COLOR_RANGE = {
  hp={_min=RGB(140,0,45), _max=RGB(210,30,75)},
  mp={_min=RGB(0,145,195), _max=RGB(0,175,225)},
  sp={_min=RGB(160,125,0), _max=RGB(190,155,30)},
}
GUI_STATUSMINIBAR_BAR_SAMPLES = 20

-- get the status bar value of the user.
-- @param bar_type The type of bar you want to check.
-- @return The percentage of the bar in decimal format.
function Gui:get_user_status(bar_type)
  local l_user_bar = {
    x=g_cfg[g_interface].STATUSMINIBAR_POS_X + GUI_STATUSMINIBAR_BAR_OFFSETS[bar_type].x,
    y=g_cfg[g_interface].STATUSMINIBAR_POS_Y + GUI_STATUSMINIBAR_BAR_OFFSETS[bar_type].y,
  }

  local l_bar_piece = (GUI_STATUSMINIBAR_BAR_OFFSETS[bar_type].w / GUI_STATUSMINIBAR_BAR_SAMPLES)
  local l_min = GUI_STATUSMINIBAR_COLOR_RANGE[bar_type]._min
  local l_max = GUI_STATUSMINIBAR_COLOR_RANGE[bar_type]._max
  local l_pixel_offset
  local l_r, l_g, l_b
  local l_pixel
  for i=0, GUI_STATUSMINIBAR_BAR_SAMPLES do
    l_pixel_offset = {
      x = l_user_bar.x + (l_bar_piece * i),
      y = l_user_bar.y,
    }
    l_r, l_g, l_b = getPixel(get_hdc(), l_pixel_offset.x, l_pixel_offset.y)
    l_pixel = RGB(l_r, l_g, l_b)
    if (match_pixel(l_pixel, l_min, l_max) == false) then
      return (i / GUI_STATUSMINIBAR_BAR_SAMPLES)
    end    
  end
end

-- checks a bar skill and uses it if it lower than the threshold.
-- @param bar The bar your wish to check, values are "hp", "mp", "sp".
-- @param tolerance If the bar goes lower than the point then execute skill (in decimal format).
-- @param skill The skill you wish to use.
function Avatar:check_use_bar_skill(bar, tolerance, skill)
  local l_bar_lvl = g_gui:get_user_status(bar)
  if (l_bar_lvl <= tolerance) then
    self:target_self()
    self:check_use_skill(skill)
  end
end

function Avatar_class:idle_period()
  g_avatar:check_use_bar_skill("hp", 0.3, skills[2]) -- at 30% or less, execute the Instant heal skill.
  g_avatar:check_use_bar_skill("hp", 0.9, skills[1]) -- at 90% or less, execute the heal skill.
  yrest(500)
end


Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 1:08 am
by vvayinsane
Shaiya update!!!!!!!!!1

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 3:16 am
by Dreadful_Warrior
Hi Elverion

I have been a follower of your work (credits also to others who helped) so far so good very nice development, i've looked into the entire topic and tried it myself coz im a shaiya fan too, and i find it really helpful specially for me coz i have a 10 months old son to attend to, so with the help of this bot i can attend to my son while playing! thanks for this,

But now shaiya has updated a new patch and the "GG BYPASS" no longer works
do you have time on creating or updating the new "NO GG PATCH"?

Hope youll get to this and thank you for your great work!

More power...

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 12:15 pm
by Administrator
The patch has been updated. You can find it here: http://solarimpact.servegame.com/phpBB3 ... &sk=t&sd=a

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 2:42 pm
by vvayinsane
I do have one issue with this script. It will use the first skill just fine but it wont use the other two. Also i changed the rest time for switching targets to 900 instead of 200 for an archer character. So far that fixed the problem from switching from targets to fast.

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 3:12 pm
by vvayinsane
ok i have not fixed the problem with a hunter switching targets. For what ever reason he will switch targets in mid fight or he will shoot once and switch to a new target i dont know how i can fix this...any1 have an idea

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 6:19 pm
by Dreadful_Warrior
elverion wrote:The patch has been updated. You can find it here: http://solarimpact.servegame.com/phpBB3 ... &sk=t&sd=a
Wow! that was quite in a flash! thank you elverion :D :) :D

i forgot to ask, is there no way of running 2 bots simultaneously? i know that this is an active game and it requires an active window to run game but is it impossible to "not freeze" the other window when you open another one?

many thanks again elverion...

:D

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 8:26 pm
by Administrator
Nope. Not without rewriting the whole input engine for Shaiya. You'd be better off writing a full clientless bot if you need more than 1 character. You can, I believe, use Windows XP's fast user switching to run multiple, independant environments. I'm not sure if this would allow you to continue botting or not, though.

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 9:49 pm
by vvayinsane
i figured out my my skill problem but the fighter bot can not be used for a hunter. Can anyone send me a hunter script. I have read there has been 1 alread made. The only problem i have with the script with being a hunter is that it will attack 1 target real quck and then click anouther target. So then i have 2 monsters on me and the bot wont attack the other one thinking its someone elses.

Any help?

Re: Shaiya Fighter Bot

Posted: Wed Oct 01, 2008 10:35 pm
by vvayinsane
ok i cant seem to get fighter bot to work as a hunter. I get the script to work maybe killing 5 times or more with no problems then for no reason it will start shooting the switching shooting switching to a new target. i tried to make the fighter work for hunter but i cant seem to pass that switching mobs while it shoots

WARNING: FAILURE READING MEMORY FROM 0xA8FFD) at 0X7835b4 in memoryreadintptr(). Error code 299 (only part of a readprocessmemory or writeprocessmemory request was completed

Re: Shaiya Fighter Bot

Posted: Fri Oct 03, 2008 4:23 pm
by vvayinsane
Heres my little something for the forums. The new numbers are at followers

playerptr_addr = 0x0081CBEC;

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

its working for me. The guy is taken his potion when needed. Im not sure if its 100 percent right but its all i got..lol

Re: Shaiya Fighter Bot

Posted: Fri Oct 03, 2008 5:01 pm
by Administrator
Nice job. I'll be making a link to this in the other main Shaiya thread to prevent confusion. Thanks for taking the time to look up the new static base!

Re: Shaiya Fighter Bot

Posted: Fri Oct 03, 2008 11:13 pm
by vvayinsane
:)...the only problem im haven is that the archor at time attacks to many at once and i will die. It does it when the screen turns. If the screen never turns he wont keep jumping. ummmm..

Re: Shaiya Fighter Bot

Posted: Sat Oct 04, 2008 12:17 am
by vvayinsane
One problem came up. As the bot sits and gets to a full bar he will stand, sit, stand sit, stand, sit and so on. How can i stop this from happening