forked from mochja/l2.net-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AfterDieTapToTown.l2s
59 lines (53 loc) · 1.25 KB
/
AfterDieTapToTown.l2s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Kratky popis
// Server:
// Autor: mochitto
// Date:
// Special thanks for L2.NET contributors
// rev.: 0
PRINT_TEXT "SCRIPT STARTED!]"
SET_EVENT "<&SCRIPTEVENT_SELFDIE&>" "<&SYSTEM_CURRENTFILE&>" SelfDie
SET_EVENT "<&SCRIPTEVENT_SYSTEMMESSAGE&>" "<&SYSTEM_CURRENTFILE&>" SystemMessages
INCLUDE "StdLib\NPC.l2c"
DEFINE_GLOBAL INT PROCESS 0
DEFINE_GLOBAL INT COUNT 0
// Main section
// ===============================
DO
//SLEEP 1000
IF ( ( TARGET_CUR_HP == ZERO ) && ( TARGET_ID != 0 ) )
CANCEL_TARGET
SLEEP 1212
ENDIF
SLEEP 500
LOOP ONE == ONE
PRINT_TEXT "SCRIPT STOPED!]"
END_SCRIPT
FUNCTION SelfDie
PRINT_TEXT "== f:SelfDie"
DEFINE STRING TEXT "lol.."
IF COUNT == #i0
COUNT = #i1
BOTSET ACTIVE_TARGET_ON "<&FALSE&>"
BOTSET ACTIVE_ATTACK_ON "<&FALSE&>"
SLEEP 3000
TAP_TO TOWN
SLEEP 15000
ENDIF
RETURN VOID
FUNCTION SystemMessages
DEFINE STRING CANNOTSEE "Cannot see target."
DEFINE INT Range 0
DEFINE INT NEW_X 0
IF PROCESS == 0
IF MESSAGE == CANNOTSEE
PROCESS = 1
PRINT_TEXT "moving..."
GET_RAND Range 100 300
NEW_X = Range + TARGET_X
MOVE_TO "<&NEW_X&>" "<&TARGET_Y&>" "<&TARGET_Z&>"
SLEEP 2000
TARGET_NEAREST
PROCESS = 0
ENDIF
ENDIF
RETURN VOID