Page 10 of 18

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 06, 2009 12:25 am
by celebor
Thanks! And what about sitting? ;)

I found 3 archer skills that are not in the list. Here they are, add them in the next release.

Bull's Eye:

Code: Select all

    <skill>
        <name>Bull's Eye</name>
        <level index="1" recharge="25" sp="49" range="24"/>
    </skill>
Nailed Shot:

Code: Select all

    <skill>
        <name>Nailed Shot</name>
        <level index="1" recharge="15" sp="60" range="24"/>
    </skill>
Sustain Shot:

Code: Select all

    <skill>
        <name>Sustain Shot</name>
        <level index="1" recharge="30" sp="60" range="24"/>
    </skill>
P.S I understand "level index" as Level of the skill, am I right? Well, that code is working anyway, I just want to make sure :)

EDIT:
I found some options! But what do 0.5 and 0.2 represent?? Percentage???

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 06, 2009 1:01 am
by shakey
Yes they do. .5 is 50% .2 is 20%.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 06, 2009 6:18 am
by atallisa
zer0 wrote:I've tried briefly, it works but not very well because the bot has been designed to battle one mob at a time.

However, I have been able to get a Guardian bot running via a Virtual Machine that done a ok job at luring mobs.

You have to do a few extra things though.

In My_Avatar.xml in the options:

Set fight target enabled to false so the avatar won't bother trying to kill the mob once he has targeted it.
Set quick_fight_enabled to false so the avatar does not react to taking damage.
You probably want to set picking up items to false.
And lower the look around arc to 90 degrees so it will target new mobs faster.

Code: Select all

<option name="fight_target_enabled" value="false" />
<option name="quick_fight_enabled" value="false" />
<option name="pickup_enabled" value="false" />
<option name="look_around_arc" value="90" />
You may want to reduce the hp/sp/mp sit multipliers too so it will not sit down so often.

Lastly you have to override the Avatar_class function battle_round_start.

You do this by in the char folder, create a new file called "My_Avatar.lua" (Name of your avatar).
We will make it so he will just cast the first skill in the xml file, and attack if that doesn't work and the mobs hp is full.

Code: Select all

function Avatar_class:battle_round_start()
    if (g_avatar:check_use_skill(g_avatar.skill[1])) then
        return
    end
    if (Gui:get_target_status() == target_status.full) then
        Avatar_actions:attack()
    end
end
This is a bit to take in, but hopefully it explains how to do a bit more with different classes other than warrrior/fighters.

Then on my normal PC, I chose a Pagan and could AoE after the Guard pulled in a bunch of mobs (I controlled the Pagan).


Also here is a custom lua functions file for an Assassin/Ranger.

Code: Select all

g_skill_prev_index = 0

function Avatar_class:battle_round_start()
  --g_skill_prev_index = 0
  Avatar_actions:attack()
end

function Avatar_class:battle_round()
  local l_next_index = (g_skill_prev_index + 1)
  local l_ready = g_avatar.skill[l_next_index]:available(g_avatar.mp, g_avatar.sp)
  if (l_ready) then
    local l_used = g_avatar.skill[l_next_index]:use()
    if (l_used == SKILL_USED) then
      if (l_next_index ~= table_len(g_avatar.skill)) then
        g_skill_prev_index = l_next_index
      end
    elseif (l_used == SKILL_PREV_REQ) then
      g_skill_prev_index = 0
    end
    return
  end
  Avatar_actions:attack()
  g_skill_prev_index = 0
end
To explain it in summary, It makes sure that the previous skill was performed before moving on to the other ones. For example:
Fatal Hit -> Tetanus -> Aggravation
where do i put thsi?

and yippie! more problems >.>

i tried using the bot on a sin with the waypoints feature on a new account, but this happens:

Code: Select all

.//classes/xml_data.lua:150: attempt to index local 'l_xml' (a nil value)
>.>

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Sun Feb 08, 2009 10:04 pm
by chopstick19
Hey I was wondering if their is already a function to do "Auto Resurrect" when your character dies. I'm about to start my UM character and anxious to know.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Sun Feb 08, 2009 11:30 pm
by celebor
If by saying "auto resurrect" you mean re spawn then you will be auto re spawned any ways. The way points are not working yet so your bot can't walk to the botting place by itself.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Mon Feb 09, 2009 2:37 am
by chopstick19
Respawning was already implied for every charac respawns after death unless ur in UM then u just lose ur character. When i mentioned auto-resurrect im referring to using the Resurrecting stones to keep my character active so i wont permanently lose it after death. So was just wondering if the bot could automatically use the resurrection stone after it dies.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Mon Feb 09, 2009 8:28 am
by celebor
Well what you can try is this:

put the resurrection stone in the desired slot. Ex. Bar 1 Slot 0

then in char config put it as HP potion and tolerance to zero - that means he will drink[use] it when he dies.

For testing purposes carry only one stone with you so the bot wont waste many in case of a bug.

Good luck.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Mon Feb 09, 2009 8:41 pm
by chopstick19
All right. I will try that. Thx ^_^

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Wed Feb 11, 2009 8:49 am
by sulfurio
hi zero , u made a great work with this bot and i thank u for it .
I have only a problem : i cant use my pc if this bot is running .
There is a way to send the commands to the game window even if its not focused or is minimized?

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Thu Feb 12, 2009 7:17 am
by Lysande
Ok, I can't get this to work.. I'm running this on windows xp so it isn't the vista problem..

I've read trough every page on this topic and still can't find the problem. I found 2 or 3 with the same problem but it still won't work for me. All it does is buffing and after that it cycles the target, but it ain't targeting.

Please help!

Here is my Avatar file:

Code: Select all

<avatar>
    <shortcuts>
        <!-- These are your action shortcuts -->
        <shortcut type="action" mode="attack" bar="1" slot="1" />
        <shortcut type="action" mode="pickup" bar="1" slot="7" />
        <!-- These are your skill attack shortcuts -->
        <shortcut type="skill" mode="attack" bar="1" slot="2" name="Stinger" level="1" />
        <shortcut type="skill" mode="attack" bar="1" slot="3" name="Rising Crash" level="1" />
        <shortcut type="skill" mode="attack" bar="1" slot="4" name="Double Damage" level="1" />
            <!--<shortcut type="skill" mode="attack" bar="1" slot="" name="" level="" />-->
        <!-- These are your skill buff shortcuts -->
        <shortcut type="skill" mode="buff" bar="1" slot="7" name="Bash" level="1" />
        <shortcut type="skill" mode="buff" bar="1" slot="8" name="Concentration" level="1" />
        <shortcut type="skill" mode="buff" bar="1" slot="9" name="Leadership" level="1" />
            <!--<shortcut type="skill" mode="buff" bar="1" slot="" name="" level="" />-->
        <!-- These are your potion shortcuts - Only bar 1 and 2 (if 2nd shortcut bar is open) supported. -->
        <!--<shortcut type="potion" mode="hp" bar="2" slot_start="1" slot_end="6" tolerance="65" />-->
        <!--<shortcut type="potion" mode="sp" bar="2" slot_start="7" slot_end="8" tolerance="50" />-->
        <!--<shortcut type="potion" mode="mp" bar="2" slot_start="9" slot_end="0" tolerance="50" />-->
            <!--<shortcut type="potion" mode="" bar="2" slot_start="" slot_end="" tolerance="" />-->
    </shortcuts>
   <!-- The avatar options are listed here, for a complete list, see ./classes/avatar.lua -->
    <options>
        <option name="mp_sit_multiplier" value="0.8" />
        <option name="sp_sit_multiplier" value="0.4" />
        <option name="target_difficulty_color_min" value="cyan" />
        <option name="target_difficulty_color_max" value="green" />
        <option name="target_enabled" value="true" />
        <option name="fight_target_enabled" value="true" />
        <option name="pickup_enabled" value="true" />
        <option name="rest_enabled" value="true" />
        <option name="quick_fight_enabled" value="true" />
        <option name="hp_sit_multiplier" value="0.4" />
        <!--<option name="waypoint_enabled" value="true" />-->
        <!--<option name="" value="" />-->
    </options>
</avatar>

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 13, 2009 12:57 am
by zer0
atallisa wrote:
zer0 wrote:I've tried briefly, it works but not very well because the bot has been designed to battle one mob at a time.

However, I have been able to get a Guardian bot running via a Virtual Machine that done a ok job at luring mobs.

You have to do a few extra things though.

In My_Avatar.xml in the options:

Set fight target enabled to false so the avatar won't bother trying to kill the mob once he has targeted it.
Set quick_fight_enabled to false so the avatar does not react to taking damage.
You probably want to set picking up items to false.
And lower the look around arc to 90 degrees so it will target new mobs faster.

Code: Select all

<option name="fight_target_enabled" value="false" />
<option name="quick_fight_enabled" value="false" />
<option name="pickup_enabled" value="false" />
<option name="look_around_arc" value="90" />
You may want to reduce the hp/sp/mp sit multipliers too so it will not sit down so often.

Lastly you have to override the Avatar_class function battle_round_start.

You do this by in the char folder, create a new file called "My_Avatar.lua" (Name of your avatar).
We will make it so he will just cast the first skill in the xml file, and attack if that doesn't work and the mobs hp is full.

Code: Select all

function Avatar_class:battle_round_start()
    if (g_avatar:check_use_skill(g_avatar.skill[1])) then
        return
    end
    if (Gui:get_target_status() == target_status.full) then
        Avatar_actions:attack()
    end
end
This is a bit to take in, but hopefully it explains how to do a bit more with different classes other than warrrior/fighters.

Then on my normal PC, I chose a Pagan and could AoE after the Guard pulled in a bunch of mobs (I controlled the Pagan).


Also here is a custom lua functions file for an Assassin/Ranger.

Code: Select all

g_skill_prev_index = 0

function Avatar_class:battle_round_start()
  --g_skill_prev_index = 0
  Avatar_actions:attack()
end

function Avatar_class:battle_round()
  local l_next_index = (g_skill_prev_index + 1)
  local l_ready = g_avatar.skill[l_next_index]:available(g_avatar.mp, g_avatar.sp)
  if (l_ready) then
    local l_used = g_avatar.skill[l_next_index]:use()
    if (l_used == SKILL_USED) then
      if (l_next_index ~= table_len(g_avatar.skill)) then
        g_skill_prev_index = l_next_index
      end
    elseif (l_used == SKILL_PREV_REQ) then
      g_skill_prev_index = 0
    end
    return
  end
  Avatar_actions:attack()
  g_skill_prev_index = 0
end
To explain it in summary, It makes sure that the previous skill was performed before moving on to the other ones. For example:
Fatal Hit -> Tetanus -> Aggravation
where do i put thsi?

and yippie! more problems >.>

i tried using the bot on a sin with the waypoints feature on a new account, but this happens:

Code: Select all

.//classes/xml_data.lua:150: attempt to index local 'l_xml' (a nil value)
>.>
You have to create a new file in the char folder, with the avatar name with the lua extension. e.g. My_Avatar.lua
The Waypoint system is still experimental. Further changes will be needed so while the bot is running you can add your own waypoints, and no set time has been set as to the release date.
sulfurio wrote:hi zero , u made a great work with this bot and i thank u for it .
I have only a problem : i cant use my pc if this bot is running .
There is a way to send the commands to the game window even if its not focused or is minimized?
Not unless you run Shaiya in a virtual machine, and I can tell you it runs very slow even with the latest PC's.
sulfurio wrote:hi zero , u made a great work with this bot and i thank u for it .
I have only a problem : i cant use my pc if this bot is running .
There is a way to send the commands to the game window even if its not focused or is minimized?
What color were the mobs? The setting you have made it was from cyan to green, anything else it will skip it.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 13, 2009 1:29 am
by chopstick19
Hey Zer0 How would i set my Resurrection stone to be used whenever i die. I cant put it when my hp is 0 if it even works also because im already using that function for my HP pots.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Thu Feb 19, 2009 3:57 pm
by SinSxi
I create the insert_avatar_name_here.lua in the char folder, but what do i put into the insert_avatar_name_here.lua?
+
It wont attack, it just cycles through targets....

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 20, 2009 3:55 pm
by nknwn666
had to edit launch.bat too,not only the things sayd in first post,coz it had

Code: Select all

START ..\..\micromacro.exe main.lua
and it couldnt start,but now it starts and i get this
Image
and got no ideea how to fix it :( can anyone help me?

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 20, 2009 10:49 pm
by SinSxi
iv got a problem of a sort, my bot just cycles through the targets, and doesnt attack, but it does buff

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Fri Feb 20, 2009 11:31 pm
by SinSxi
Someone help me please!
My bot just Cycles through targets, not attacking, i tried changing the target color thing.

Help please!

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Sat Feb 21, 2009 1:59 am
by nknwn666
i dont think its necesary to spam,just use the edit button

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Sat Feb 21, 2009 2:27 am
by vvayinsane
Please put the log file. It may help figure out your problem. I dont know off the top of my head.

Have you set up your toolbar correctly?

nknwn666:
Post your log file also.

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Sat Feb 21, 2009 8:01 am
by nknwn666
it doesnt write any logs :?

Re: Shaiya[US] - ZS Shaiya Bot

Posted: Sat Feb 21, 2009 10:10 am
by SinSxi
Heres my log, i woke up just a few mins ago, and tried the bot again but now it seems to attack , but cycles through the targets attacking all of the targets not killing one, then going to another...


Image