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 pathBishop_BTB.l2s
160 lines (150 loc) · 3.58 KB
/
Bishop_BTB.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// Kratky popis
// Server:
// Autor: mochitto
// Date:
// Special thanks for L2.NET contributors
// rev.: 0
PRINT_TEXT "SCRIPT STARTED!]"
INCLUDE StdLib\Player.l2c
DEFINE_GLOBAL INT REUSE 0 C
DEFINE_GLOBAL INT DIST 0
DEFINE_GLOBAL INT ALLOWMP 1
DEFINE_GLOBAL INT ALLOWBTB 1
DEFINE_GLOBAL ARRAYLIST PLAYERS 0
DEFINE_GLOBAL ARRAYLIST FRIENDS 0
DEFINE_GLOBAL STRING MUJ_TARGET 0
// Main section
// ===============================
SET_EVENT "<&SCRIPTEVENT_CHATTOBOT&>" "<&SYSTEM_CURRENTFILE&>" CHATTOBOT
FRIENDS.ADD "#$M8H6BN644N897JM"
THREAD BLESSTHEBODY_DIST
SLEEP 100
THREAD BLESS
SLEEP 100
THREAD MP
DO
SLEEP 10000
LOOP ZERO == ZERO
PRINT_TEXT "SCRIPT STOPED!]"
END_SCRIPT
/*
FUNCTION BLESSTHEBODY
WHILE ZERO == ZERO
IF (CHAR_CUR_HP != 0) && (ALLOWBTB == #i1)
GET_PLAYERS PLAYERS
FOREACH I PLAYER PLAYERS
FOREACH O STRING FRIENDS
IF "FRIENDS.O" == "PLAYERS.I.NAME"
DISTANCE DIST CHAR_X CHAR_Y CHAR_Z PLAYERS.I.DEST_X PLAYERS.I.DEST_Y PLAYERS.I.DEST_Z
MSG VOID 1 "#$Distance <&DIST&>"
IF DIST < #i400
SKILL_GET_REUSE REUSE 1531
REUSE = REUSE + 100
SLEEP "<&REUSE&>"
COMMAND "/target <&PLAYERS.I.NAME&>"
SLEEP 300
USE_SKILL 1531 // BLESS THE BODY
SLEEP 3000
CANCEL_TARGET
ENDIF
ENDIF
NEXTEACH
NEXTEACH
ENDIF
SLEEP 1000
WEND
RETURN VOID
*/
FUNCTION BLESSTHEBODY_DIST
WHILE ZERO == ZERO
IF (CHAR_CUR_HP != 0) && (ALLOWBTB == #i1)
GET_PLAYERS PLAYERS
DIST = 1000
FOREACH I PLAYER PLAYERS
FOREACH O STRING FRIENDS
IF "FRIENDS.O" == "PLAYERS.I.NAME"
DISTANCE DIST CHAR_X CHAR_Y 0 PLAYERS.I.DEST_X PLAYERS.I.DEST_Y 0
//MSG VOID 1 "#$Distance <&DIST&>"
MUJ_TARGET = PLAYERS.I.NAME
ENDIF
NEXTEACH
NEXTEACH
ENDIF
SLEEP 1000
WEND
RETURN VOID
FUNCTION BLESS
WHILE ZERO == ZERO
IF DIST < #i500
SKILL_GET_REUSE REUSE 1531
REUSE = REUSE + 100
SLEEP "<&REUSE&>"
COMMAND "/target <&MUJ_TARGET&>"
SLEEP 300
IF DIST < #i500
USE_SKILL 1531 // BLESS THE BODY
SLEEP 3000
ELSE
SLEEP 5000
ENDIF
CANCEL_TARGET
ELSE
SLEEP 1000
ENDIF
WEND
RETURN VOID
FUNCTION MP
DEFINE INT ASD 0
DEFINE INT MPPOTS 0
WHILE ZERO == ZERO
ITEM_COUNT MPPOTS 728
IF (MPPOTS > #i1) && (ALLOWMP == #i1)
ASD = CHAR_MAX_MP * 11
ASD = ASD / 100
IF (CHAR_CUR_MP < ASD)
ASD = CHAR_MAX_MP * 80
ASD = ASD / 100
WHILE (CHAR_CUR_MP < ASD)
USE_ITEM 728 // Mana Potion
SLEEP 500
WEND
ENDIF
ELSE
SLEEP 10000
ENDIF
SLEEP 1000
WEND
RETURN VOID
FUNCTION CHATTOBOT
SWITCH MESSAGE
CASE "#$mp"
IF ALLOWMP == #i1
ALLOWMP = #i0
MSG VOID 1 "#$Automatic MP has disabled!"
ELSE
ALLOWMP = #i1
MSG VOID 1 "#$Automatic MP has enabled!"
ENDIF
BREAK 1
CASE "#$o"
IF ALLOWBTB == #i1
ALLOWBTB = #i0
MSG VOID 1 "#$Automatic Bless the Body has disabled!"
ELSE
ALLOWBTB = #i1
MSG VOID 1 "#$Automatic Bless the Body has enabled!"
ENDIF
BREAK 1
ENDSWITCH
RETURN VOID
FUNCTION MSG 1 TEXT
DEFINE BYTEBUFFER SystemMessage 256
SystemMessage.WRITE_BYTE #i98
SystemMessage.WRITE_INT32 #i1987
SystemMessage.WRITE_INT32 TEXT.LENGTH
SystemMessage.WRITE_INT32 #i0
SystemMessage.WRITE_STRING TEXT
SystemMessage.TRIM_TO_INDEX
INJECTBB_CLIENT SystemMessage
DELETE SystemMessage
RETURN VOID