Lineage 2 Tower Forum

Full Version: Problem with Script.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good! I'm putting together a script for a quest and I have a little inconvenience ...
The quest does it well, but when the Gate to take her back to the PJ takes it, but after reaching destination, not moving at all.
Here is the chunk of code where this came from, so I can lend a hand:
Code:
moveDistance = 30;

TargetNpc("Tatiana", 31275);
Talk();
Talk();
ClickAndWait("npc_268467637_Chat 1", "\"I want to teleport.\"");
ClickAndWait("npc_268467637_goto 1095", "Hot Springs - 9300 Adena");
MoveTo(147998, -55282, -2734, moveDistance);
WaitForTeleport();
MoveTo(144900, -113481, -2569, moveDistance);
MoveTo(145078, -113318, -2546, moveDistance);
MoveTo(145562, -112823, -2485, moveDistance);
MoveTo(145993, -112553, -2441, moveDistance);
MoveTo(146385, -112370, -2399, moveDistance);
MoveTo(146789, -112233, -2345, moveDistance);
MoveTo(147350, -112173, -2249, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148619, -112382, -2155, moveDistance);
MoveTo(149009, -112451, -2079, moveDistance);
MoveTo(149244, -112516, -2065, moveDistance);
MoveTo(149517, -112679, -2065, moveDistance);

It's as if after the WaitForTeleport () do not know.
I hope answer, thanks!

[EDIT] Now go and had to wait a while, the question is, how can I do q as it arrives to teleport, move to the coordinates, without waiting for the minutes that waits?
Hi.. Someone have scrip for dagger and yul..
Code:
moveDistance = 30;

TargetNpc("Tatiana", 31275);
Talk();
Talk();
ClickAndWait("npc_268467637_Chat 1", "\"I want to teleport.\"");
Click("npc_268467637_goto 1095", "Hot Springs - 9300 Adena");
Sleep(4000);
MoveTo(147998, -55282, -2734, moveDistance);
MoveTo(144900, -113481, -2569, moveDistance);
MoveTo(145078, -113318, -2546, moveDistance);
MoveTo(145562, -112823, -2485, moveDistance);
MoveTo(145993, -112553, -2441, moveDistance);
MoveTo(146385, -112370, -2399, moveDistance);
MoveTo(146789, -112233, -2345, moveDistance);
MoveTo(147350, -112173, -2249, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148223, -112307, -2200, moveDistance);
MoveTo(148619, -112382, -2155, moveDistance);
MoveTo(149009, -112451, -2079, moveDistance);
MoveTo(149244, -112516, -2065, moveDistance);
MoveTo(149517, -112679, -2065, moveDistance);
This is the fastest workaround.. there are more elegant ways of doing this but if this is ok let us know.
Right now it will wait 4 seconds after you press teleport and then it moves.
Try and come back with feedback
Change the WaitForTeleport () by Sleep (4000) line and no, still waiting almost 5 minutes after the teleport ... Any other ideas?
Thank you!
Note that you said a chunk of code, and i edited only that. And also I changed WaitForTeleport to sleep and ClickAndWait with Click.
Try to do that in your problematic part of the script
Is that my problem is just that part ... The char reaches destination but waits 5 minutes at the location of the teleport and after that, renews its activity.
My question is how to avoid those 5 minute wait.
Someone have script for pvp .. feoh or yul ?
Reference URL's