Jump to content

Recommended Posts

Posted (edited)

Hello folks,

 

how do i check my current location in a loop everytime on l2net in scripts? Any ideas?

 

Thanks in advance,

 

Demens0s

Edited by DeMeNs0s
Posted (edited)

The command is  /loc

The script command is: MOVE_TO X Y Z

 

Yes I know, but how do I check my current location everytime in a loop?

It sould be look like:

DEFINE STRING HAVETO_LOC 1111 2222 3333
// ...
DO
MOVE_TO HAVETO_LOC
SLEEP 7000
// <<< check CURRENT_LOC??? >>>
LOOP CURRENT_LOC != HAVETO_LOC
// ...

Any ideas?

Edited by DeMeNs0s
  • 2 weeks later...
Posted (edited)
DEFINE_GLOBAL INT X 0
DEFINE_GLOBAL INT Y 0
DEFINE_GLOBAL INT Z 0

PRINT_TEXT "<&SYSTEM_CURRENTFILE&> Script Started!"

X = CHAR_X
Y = CHAR_Y
Z = CHAR_Z

PRINT_TEXT "X: <&X&>"
PRINT_TEXT "Y: <&Y&>"
PRINT_TEXT "Z: <&Z&>"

END_SCRIPT

The proper way to do it... Using "/loc" would be lolable.

 

You can put the 'X = CHAR_X' calls, inside their own function, and call them anytime you need to get the updated current location of the character.

Edited by MlDNlGHT
Posted
DEFINE_GLOBAL INT X 0
DEFINE_GLOBAL INT Y 0
DEFINE_GLOBAL INT Z 0

PRINT_TEXT "<&SYSTEM_CURRENTFILE&> Script Started!"

X = CHAR_X
Y = CHAR_Y
Z = CHAR_Z

PRINT_TEXT "X: <&X&>"
PRINT_TEXT "Y: <&Y&>"
PRINT_TEXT "Z: <&Z&>"

END_SCRIPT

The proper way to do it... Using "/loc" would be lolable.

 

You can put the 'X = CHAR_X' calls, inside their own function, and call them anytime you need to get the updated current location of the character.

 

 

Many thanks! Thats what i needed. Thanks you very much again.

Guest
This topic is now closed to further replies.


×
×
  • Create New...