01-14-2024, 02:30 PM
Souls of Elysium
I am fishing on a dock in Souls of Elysium and with the command !train I can spawn a 'Trainer'.
The problem is, the Trainer sometimes gets killed by Quara's or whatever monster, so I need to respawn it.
I made a script which writes !train if there is no Trainer right next to me, but the problem is, I use targeting to attack Trainer.
I want to make sure I am always attacking my own Trainer, and not someone elses trainer, because if I attack my own trainer, it attacks me back and thus I will train shielding as well.
If I attack the Trainer of someone else, I will not skill Shielding.
I tried to make something with the function isattackingme and the function attack to keep searching for a Trainer which attacks me back, but I didn't succeed.
I now have this, but perhaps you can make something better:
I am fishing on a dock in Souls of Elysium and with the command !train I can spawn a 'Trainer'.
The problem is, the Trainer sometimes gets killed by Quara's or whatever monster, so I need to respawn it.
I made a script which writes !train if there is no Trainer right next to me, but the problem is, I use targeting to attack Trainer.
I want to make sure I am always attacking my own Trainer, and not someone elses trainer, because if I attack my own trainer, it attacks me back and thus I will train shielding as well.
If I attack the Trainer of someone else, I will not skill Shielding.
I tried to make something with the function isattackingme and the function attack to keep searching for a Trainer which attacks me back, but I didn't succeed.
I now have this, but perhaps you can make something better:
local trainerName = 'Trainer'
local checkInterval = 60000
local function checkTrainers()
local trainerCount = maround(1, trainerName)
if trainerCount < 1 then
print('Trainer Spawned')
say('!train')
end
end
while true do
checkTrainers()
wait(checkInterval)
end