for example, i do not specfy any waypoints not it is in wander but i only select a target and it attacks automatically in a specific order
1st lets say i select a goblin, then it should attack in a specified order like flame first then fireball and repeat until target is dead.
so the pseudocode must be something like
Code: Select all
if a target is selected then
if target hp>0% then
| repeat
| | cast spell on target
| | if player health <x% then
| | heal player //potion or spell
| | cast spell on target
| | if player health <x% then
| | heal player //potion or spell
| until target hp<=0%
end if
end if
if u get an error read http://www.solarstrike.net/phpBB3/viewt ... 326#p34326
here is the CORRECT CODE credits to lisa
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
while (true) do
player:checkSkills(true) -- self buff and heal
player:update()
if player.Battling then
player:target(player:findEnemy(true, nil, evalTargetDefault, player.IgnoreTarget));
if player:haveTarget() then
player:fight()
end
end
if keyPressed(key.VK_F) then
target = player:getTarget()
if target then
repeat
player:checkSkills(true) -- self buff and heal
player:cast("MAGE_FLAME")
player:cast("MAGE_FIREBALL")
target:update()
until 5 > target.HP/target.MaxHP*100
end
end
end
</onLoad>
</waypoints>