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
/
L2PsychoReputation.l2s
181 lines (153 loc) · 4.04 KB
/
L2PsychoReputation.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// Kratky popis
// Server:
// Autor: mochitto
// Date:
// Special thanks for L2.NET contributors
// rev.: 0
PRINT_TEXT "SCRIPT STARTED!]"
SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" CharList 9
SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" ACADEMY 44
DEFINE_GLOBAL INT CHARSLOT 0
DEFINE_GLOBAL INT LASTID 0
DEFINE_GLOBAL INT CHARS 0
DEFINE_GLOBAL INT WCHARS 0
DEFINE_GLOBAL INT CHARLIST 0
DEFINE_GLOBAL INT TOTAL_CHARS 0
DEFINE_GLOBAL INT RELOG_DELAY 7000
DEFINE_GLOBAL STRING NICK
DEFINE_GLOBAL STRING NAME "SexyBoy"
// Main section
// ===============================
DEFINE FILEREADER FR "last_id.ini"
FR.READ LASTID
FR.CLOSE
CharCreate
DEFINE FILEWRITER FW "last_id.ini"
FW.WRITE LASTID
FW.FLUSH
FW.CLOSE
THREAD CheckClass
PRINT_TEXT "== Thread for check class was started.. ]"
SLEEP 3000
CALLSUB Relog
SLEEP 3000
FOR A 0 "<&CHARS&>" 1
SLEEP 3000
IF ( CHAR_CLASS != 2 )
WHILE ( CHAR_LEVEL < 41 )
IF CHAR_CLAN != 0
PRINT_TEXT "== Attack Gremlin!!! ]"
//TARGET_NEAREST
//SLEEP 1000
//COMMAND "/attack"
BOTSET ACTIVE_TARGET_ON "<&TRUE&>"
BOTSET ACTIVE_ATTACK_ON "<&TRUE&>"
SLEEP 3000
ENDIF
SLEEP 500
WEND
BOTSET ACTIVE_TARGET_ON "<&FALSE&>"
//BOTSET ACTIVE_ATTACK_ON "<&FALSE&>"
PRINT_TEXT "== Wating for class change... ]"
WHILE ( CHAR_CLASS != 2 )
SLEEP 1000
WEND
SLEEP 10000
ENDIF
WHILE IS_INCOMBAT CHAR_ID
SLEEP 500
WEND
PRINT_TEXT "== Restart ]"
INJECT "57" //RELOG
SLEEP 5000
CALLSUB Relog
SLEEP 25
NEXT
PLAYALARM
PRINT_TEXT "SCRIPT STOPED!]"
END_SCRIPT
FUNCTION CharCreate
WHILE CHARS < 7
IF CHARLIST == 1
INJECT "13" //Create CHAR
SLEEP 3124
LASTID = LASTID + 1
NICK = "#$<&NAME&><&LASTID&>"
PRINT_TEXT "== Created char in slot <&CHARS&> with nick <&NICK&> ]"
DEFINE BYTEBUFFER CharCreateBuffer 512
CharCreateBuffer.WRITE_BYTE 12
CharCreateBuffer.WRITE_STRING NICK
CharCreateBuffer.WRITE_INT32 0
CharCreateBuffer.WRITE_INT32 0
CharCreateBuffer.WRITE_INT32 0
CharCreateBuffer.WRITE_INT32 28
CharCreateBuffer.WRITE_INT32 39
CharCreateBuffer.WRITE_INT32 30
CharCreateBuffer.WRITE_INT32 27
CharCreateBuffer.WRITE_INT32 35
CharCreateBuffer.WRITE_INT32 11
CharCreateBuffer.WRITE_INT32 0
CharCreateBuffer.WRITE_INT32 0
CharCreateBuffer.WRITE_INT32 0
CharCreateBuffer.TRIM_TO_INDEX
INJECTBB CharCreateBuffer
DELETE CharCreateBuffer
SLEEP 1900
ENDIF
SLEEP 25
WEND
RETURN VOID
SUB Relog
IF ( CHARSLOT < CHARS )
DEFINE BYTEBUFFER CharSelect_bb 64
print_text "== Loggin char in slot <&CHARSLOT&> ]"
CharSelect_bb.WRITE_BYTE #i18
CharSelect_bb.WRITE_INT32 CHARSLOT
CharSelect_bb.WRITE_INT16 #i0
CharSelect_bb.WRITE_INT32 #i0
CharSelect_bb.WRITE_INT32 #i0
CharSelect_bb.WRITE_INT32 #i0
CharSelect_bb.TRIM_TO_INDEX
INJECTBB CharSelect_bb
DELETE CharSelect_bb
CHARSLOT = CHARSLOT + 1
SLEEP "<&RELOG_DELAY&>"
ENDIF
RETURNSUB
FUNCTION CheckClass
WHILE ZERO == ZERO
IF ( ( CHAR_CLASS == #i0 ) && ( CHAR_LEVEL >= #i20 ) )
INJECT "87 E9 03 00 00"
SLEEP 1000
INJECT "85 43 00 4F 00 31 00 00 00 "
print_text "== Im Human Warrior now ]"
ENDIF
IF ( ( CHAR_CLASS == #i1 ) && ( CHAR_LEVEL >= #i40 ) )
SLEEP 3000
INJECT "87 E9 03 00 00"
SLEEP 1000
INJECT "85 43 00 4F 00 32 00 00 00"
print_text "== Im Gladiator now ]"
ENDIF
SLEEP 5000
WEND
RETURN VOID
FUNCTION CharList
PACKET.READ_BYTE NULL
PACKET.READ_INT32 CHARS
PRINT_TEXT "== Chars at your account <&CHARS&> ]"
CHARLIST = 1
RETURN VOID
FUNCTION ACADEMY
DEFINE INT _astobj
DEFINE INT CharID
PACKET.READ_BYTE NULL
PACKET.READ_INT32 _astobj
CHAR_GET_ID CharID "Gej"
IF CharID == _astobj
SLEEP 500
INJECT "27 01 00 00 00" // clan
PRINT_TEXT "== Accepted invite request to academy ]"
ENDIF
SLEEP 1000
RETURN VOID