Trouble with Mob Count
Posted: Tue Jan 08, 2013 12:53 pm
Hey,
I try to get one part, the most important part of my script working. The only thing he should do is to stay between two mobs and kill them with purgatory fire and loot them and do this over and over again alway wehen they spawn.
First I tried this simple thing:
So if there is at least one mob is in a range of 75 he should cast purgatory fire. So far it works fine. But after they have been looted the bot errors with an error while using the lua function at waypoint #1. Sometimes the script works for 5 minutes or longer but when he tries to use the code above and there isn't a mob it errors. I thought normally it should then go to waypoint #1 again and try it again until there are mobs. So I thought maybe this helps:
But I get the same error. I don't know why such a simple thing can make such trouble. Anyone has an idea why this won't work? I am using the RC3 version.
AlterEgo95
I try to get one part, the most important part of my script working. The only thing he should do is to stay between two mobs and kill them with purgatory fire and loot them and do this over and over again alway wehen they spawn.
First I tried this simple thing:
Code: Select all
if player:countMobs(75) > 1 then
player:cast("MAGE_PURGATORY_FIRE)
end
Code: Select all
repeat
if player:countMobs(75) > 1 then
player:cast("MAGE_PURGATORY_FIRE)
end
until not player:countMobs(75) > 1AlterEgo95