Any time I'm using tower, the GM seems to know that I am. I suspect it is because of the almost instant target after you kill 1 mob. Any idea on how could I make a delayed target?
Maybe there are other solutions but this one crossed my mind now. Didn`t test it but cant see why it wont work
LUA Programming
delay = 0; --- This is how much delay you want, i guess 200-300 would be fine
targetmode = 0; ---- Set here your target mode: 0 is disabled, 1 is by range, 2 is by point , 3 is polygon.
--Your other settings like range and stuff will be saved if you configure them once
repeat
if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
ProcessCommand("/targetMobMode_0")
Sleep(delay);
ProcessCommand("/targetMobMode_" ..tostring(targetmode));
end;
until false;
tell him you use macro for ex
/target Mob_name
/useShortcut 1 1
tell him to test it and gtfo
You got 2 solutions now
)
If you use macro or just simply make one it waits until the corpse disappears and then targets the next. Simply because /target X mob, targets the same mob which has been killed
Have you tried the on from my first post.. u didnt say anything
(05-01-2014 13:50 PM)eustach3 Wrote: [ -> ]Have you tried the on from my first post.. u didnt say anything
I have just tried it and it doesn't seem to do anything
I added a command to show some text and yes, it does enter the if condition after some mob dies.
i tested, and my CPU usage increase to 30% ... even with client minimized
So for you it is working? I know it uses a lot of cpu it`s a script and it is using repeat.. you can try to edit this part like this:
LUA Programming
repeat
if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
ProcessCommand("/targetMobMode_0")
Sleep(delay);
ProcessCommand("/targetMobMode_" ..tostring(targetmode));
end;
Sleep(600);
until false;
If it doesnt work probably you set smth wrong.. but lets do it like this, i set it manually for easy debugging.. Just set up on line 4 and 5(sleep time and target mode);
LUA Programming
repeat
if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
ProcessCommand("/targetMobMode_0")
Sleep(400); --- set sleep time
ProcessCommand("/targetMobMode_2")
ProcessCommand("/setMobTargetPoint")
-- 0 is disabled, 1 is by range, 2 is by point , 3 is polygon.
end;
Sleep(200);
until false;
P.S. It can be done as a plugin also.. it will use little CPU .. we need to mess with os.time, if you think it worth i`ll do it.
Found the culprit. Apparently ProcessCommand doesn't work for /targetMobMode. It works if I use Command tho but it spams the hell out of my chat..