Hi, i have this script... but sometimes i get cocoons's target to the other side, too far.
repeat
TargetNpc("Cocoon", 33147);
UseSkill(10763, false, true);
ClearTargets();
CancelTarget(true);
Sleep(10000);
until false
Can i have a help for put the range into 400?
Thanks!
try this, i have no idea if it works, because i just wroted it while i was drinking morning coffee in work
LUA Programming
range = 500;
NpcName = "Cocoon";
--------------------------------------------------------------------------------
repeat
if(GetTarget() == nil)then
NpcL = GetNpcList();
for user in NpcL.list do
if(GetMe():GetRangeTo(user) < range)then
if(user:GetName() == NpcName)then
Target(user:GetId());
UseSkill(10763, false, true);
end;
Sleep(500);
end;
end;
Sleep(500);
end;
if(GetTarget()~= nil)then
if(GetTarget():IsAlikeDeath() == true)then
ClearTargets();
CancelTarget(true);
Sleep(500);
end;
end;
Sleep(500);
until false;
Well... i put it in Tower Script, and have error =/
could u try to find it? >.<
appears that: [string "range=500";..."]:9: 'then' expected near ';'
try it now, small mistake should be then not ;