This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathLazycast.l2s
84 lines (59 loc) · 2.23 KB
/
Lazycast.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
INCLUDE "Include/EngineX.l2c"
DEFINE_GLOBAL ENGINEX ENGINEX 0
INCLUDE "Include/Lazy.l2c"
DEFINE_GLOBAL LAZY LAZY 0
DEFINE INT TARGETING 0
LAZY.REGISTER TARGETING 1 #$TARGETING
DEFINE INT RETURNING 0
LAZY.REGISTER RETURNING 1 #$RETURNING
DEFINE INT CASTING 0
LAZY.REGISTER CASTING 1 #$CASTING
// this is how to use pieces for the right skill id
// if (hp < 80%) {
// use "vampiric touch"
// } else {
// if (distance < 200) {
// use "aura burn"
// } else {
// use "blaze"
// }
// }
//
DEFINE INT MYPIECE 0
RETURNING.NEW_PIECE MYPIECE 2 #$Casting_SkillId #$IfThenElse
MYPIECE.SET_REFERENCE VOID 2 #$IF #$Self_MyHpIsOk
MYPIECE.SET_VALUE VOID 2 #$THEN #i1239
MYPIECE.SET_VALUE VOID 2 #$ELSE #i1234
DELETE MYPIECE
//-------------------------------------------------------------------------------------
// the pointer to our castlist
DEFINE INT CASTLIST 0
// create the castlist
CASTING.CREATE_CASTLIST CASTLIST 1 #$MyCastlist
// of course we want to repeat the castlist, as long as the mob is alive
CASTLIST.REPEAT = TRUE
// the pointer to our castlist-skill
DEFINE INT CASTLISTSKILL 0
// adds the skill to the castlist
CASTLIST.ADD_SKILL CASTLISTSKILL 0
// set the break piece ("4" when the target is invalid, otherwise "0")
CASTLISTSKILL.BREAK_PIECE = 0
// set the piece to search for the best skill-id
CASTLISTSKILL.SET_PIECE VOID 1 #$Casting_SkillId
// now we dont need this pointer anymore
DELETE CASTLISTSKILL
//-------------------------------------------------------------------------------------
DEFINE INT OBJECT_ID 0
WHILE (TRUE == TRUE)
TARGET_NEAREST
// target the id
//ENGINEX.UTILS.TARGET_UNIQUE VOID 3 OBJECT_ID #i1000 #i3
// start the castlist by using the pointer
CASTLIST.START VOID 0
// its the same like:
// starting the castling by using the lazy-class
//CASTING.START VOID 1 #$MyCastlist
// sleep this script while casting
CASTING.SLEEP VOID 0
SLEEP 100
WEND