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