check and inv player
Posted: Fri Apr 04, 2014 6:47 pm
I have made waypoints for farming TT and IDK, but trying to completely automate TT farm to be as fast as possible I added a check for my alts in a list, and inv 1 of them before entering. When I first run the waypoint it works fine, invites, runs through, kills/loots and resets. The issue is when it gets to the same spot, it'll just sit there, rather than inv a new char. This is my waypoint:
Code: Select all
<!-- # 15 --><waypoint x="11588" z="2266" y="34">
inParty = false
repeat
player:update()
if RoMScript("UnitExists('party1')") then
GoThroughPortal()
inParty = true
fly()
else
if player.Name == "Main1" or player.Name == "Main2" then
local altList = {"Alt1","Alt2","Alt3","Alt4","Alt5"}
local obj = nil;
local objectList = CObjectList();
repeat
objectList:update();
player:updateXYZ()
for i = 0,objectList:size() do
obj = objectList:getObject(i);
if obj ~= nil and obj.Type == 1 then
for k,v in pairs(altList) do
if obj.Name == v and 100 >= distance(player,obj) then
player:target(obj.Address)
RoMScript('InviteToParty("target")')
invited = true
end
end
end
if invited and invited == true then
break
end
end
yrest(2000);
until RoMScript("UnitExists('party1')")
else
if player.Aggro then
player:fight()
else
yrest(5000);
end
end
end
until inParty
</waypoint>