-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathRPG MO - All in one Bot v2 Alpha.ahk
518 lines (410 loc) · 14.1 KB
/
RPG MO - All in one Bot v2 Alpha.ahk
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
/*
Script name: RPG MO - All in One Bot
Made by: FloowSnaake
Autohotkey version: v1.1.23.05
Tested on: Windows 7,8,10
Started working Date: 12/11/2015
Latest Build date: 2016/10/08
For more info:
https://github.com/floowsnaake/RPG-MO---All-in-one-Bot
*/
#MaxHotkeysPerInterval 99000000
SetWorkingDir, %A_ScriptDir%
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
#SingleInstance Force
OnExit, Quit
CoordMode, Mouse, Client
CoordMode, Pixel, Client
CoordMode, ToolTip, Client
Global Script
Global Walkspeed
Global outputvar
Global Mouse_Chest1
Global Mouse_Chest2
IfExist,RPG MO Bot Config.ini
{
FileReadLine,Read_Acc,RPG MO Bot Config.ini,1
FileReadLine,Read_StartKey,RPG MO Bot Config.ini,2
; FileReadLine,Read_HideKey,RPG MO Bot Config.ini,3
FileReadLine,Read_Steam,RPG MO Bot Config.ini,3
; Hotkey,%Read_HideKey%,Hidekey
Hotkey,%Read_StartKey%,Botkey
Account = %Read_Acc%
IF (Read_Steam = 1)
{
Game_Title = RPG MO - Early Access
Procces = nw.exe
}
IF (Read_Steam = 0)
{
Game_Title = RPG MO - Web Browser Game
Procces = RPG MO.exe
}
}
Gui, Lunch: Color, White
Gui, Lunch: Add, Button, x8 y272 w75 h23 gStart_Bot_gui, Run Bot
Gui, Lunch: Add, Button, x96 y272 w115 h23 gStart_Script_Maker, Run Script Maker
Gui, Lunch: Add, GroupBox, x8 y320 w187 h70, Download RPG MO Client
Gui, Lunch: Add, Button, x112 y352 w75 h23 gsteam, Steam
Gui, Lunch: Add, Button, x16 y352 w75 h23 gRpg, Normal
Gui, Lunch: Add, Link, x0 y408 w120 h23, <a href="https://github.com/floowsnaake/RPG-MO---All-in-one-Bot">Bot Development Page</a>
Gui, Lunch: Add, Picture, x8 y40 w32 h32, %A_ScriptDir%\Data\pickshovel.png
Gui, Lunch: Add, Text, x40 y48 w120 h23 +0x200, Mining and Digging sand
Gui, Lunch: Add, Text, x0 y0 w193 h23 +0x200, What can RPG MO - All in one Bot do?
Gui, Lunch: Add, Picture, x8 y80 w32 h32, %A_ScriptDir%\Data\campfire.png
Gui, Lunch: Add, Text, x40 y88 w46 h23 +0x200, Cooking
Gui, Lunch: Add, Picture, x176 y40 w32 h32, %A_ScriptDir%\Data\cactus.png
Gui, Lunch: Add, Text, x208 y48 w70 h23 +0x200, Woodcutting
Gui, Lunch: Add, Picture, x104 y80 w32 h32, %A_ScriptDir%\Data\still.png
Gui, Lunch: Add, Text, x136 y88 w46 h23 +0x200, Alchemy
Gui, Lunch: Add, Picture, x200 y80 w32 h32, %A_ScriptDir%\Data\native-american-turtle.png
Gui, Lunch: Add, Text, x232 y88 w47 h23 +0x200, Fishing
Gui, Lunch: Add, Text, x40 y152 w100 h23 +0x200, Works with your Pet
Gui, Lunch: Add, Picture, x8 y144 w32 h32, %A_ScriptDir%\Data\circus-llama.png
Gui, Lunch: Add, Text, x8 y200 w227 h23 +0x200, More Skills and Futures will be added soon `;)
Gui, Lunch: Add, Text, x8 y248 w125 h23 +0x200, What do you want to do?
Gui, Lunch: Add, Text, x248 y400 w39 h23 +0x200, Gui: v4
Gui, Lunch: Show, w282 h423, RPG MO Bot Menu
Return
LunchGuiClose:
ExitApp
Rpg:
Run, http://mo.ee/download.html
return
steam:
Run, http://store.steampowered.com/app/372800
return
Start_Bot_gui:
IfExist,RPG MO Bot Config.ini
{
Gui, Lunch: Destroy
gosub,BotMode
}
IfNOTExist,RPG MO Bot Config.ini
{
MsgBox, 4160, First Time Running, Hey and welcome to RPG MO Bot`n`nFirst of all make sure that you have downloaded the RPG MO Client and that you have logged in to the game`n`nMake sure that you read all the information in the next window and apply those settings to the game or else the bot will not work.`n`nFloowSnaake 2016-04-06
Gui, Start: Color, White
Gui, Start: Add, Tab2, x-8 y-3 w278 h397, Game Settings|Bot Settings
Gui, Start: Add, Text, x7 y32 w256 h20 0x50000000, Make sure that RPG MO Have the following settings:
Gui, Start: Add, Text, x14 y73 w111 h23 +0x200, Game max size(1.25x)
Gui, Start: Add, Text, x136 y72 w91 h23 +0x200, Game grid(13x13)
Gui, Start: Add, Text, x14 y105 w185 h23 +0x200, Interface size`, set this to the smallest
Gui, Start: Add, GroupBox, x8 y56 w240 h90, Menu --> Game Options --> Video
Gui, Start: Add, GroupBox, x6 y153 w232 h56, Menu --> Wiki & Mods menu
Gui, Start: Add, Text, x22 y177 w152 h23 +0x200, Press "Select All" then "Load"
Gui, Start: Add, GroupBox, x6 y217 w232 h125, Menu --> Keybindings
Gui, Start: Add, Text, x22 y241 w125 h20 0x50000000, Deposit All+ in chest = E
Gui, Start: Add, Text, x22 y273 w125 h20 0x50000000, Unload pet inventory = Z
Gui, Start: Add, Text, x22 y305 w125 h20 0x50000000, Toggle inventory = Q
Gui, Start: Add, Text, x10 y349 w150 h23 +0x200, Now Go to the Bot Settings Tab
Gui, Start: Tab, 2
Gui, Start: Add, Text, x7 y34 w84 h20 0x50000000, Account Name:
Gui, Start: Add, Edit, x7 y58 w100 h20 0x50010080 vAcc, username
Gui, Start: Add, Text, x7 y82 w110 h20 0x50000000, Bot Start Hotkey:
Gui, Start: Add, Hotkey, x7 y106 w70 h20 0x50010000 vStartKey, F3
Gui, Start: Add, CheckBox, x7 y138 w89 h13 0x50010003 vSteam, Steam version
Gui, Start: Add, Button, x7 y162 w90 h23 0x50010000 gsave, Save settings
Gui, Start: Show, w266 h385, First Time Config
Return
save:
Gui, Start: Submit
Gui, Lunch: Destroy
FileAppend,%Acc%`n%StartKey%`n%Steam%,RPG MO Bot Config.ini
Reload
return
}
return
Start_Script_Maker:
Gui, Lunch: Destroy
gosub,ScrMaker
return
ScrMaker:
SetWorkingDir, %A_ScriptDir%/scripts
CoordMode, Mouse, Client
CoordMode, Pixel, Client
CoordMode, ToolTip, Client
Home:
Gui, Maker: Color, White
Gui, Maker: Add, Button, x8 y8 w95 h23 gOpen, Open/Edit Script
Gui, Maker: Add, Text, x8 y40 w63 h23 +0x200, Open Script:
Gui, Maker: Add, Edit, x8 y64 w297 h20 ReadOnly vpath, Dont Edit this box
Gui, Maker: Add, Text, x8 y96 w44 h23, Type:
Gui, Maker: Add, Edit, x8 y120 w56 h21 vType,
Gui, Maker: Add, Text, x80 y96 w98 h23, Exp per Type/item:
Gui, Maker: Add, Edit, x80 y120 w39 h21 vExp,
Gui, Maker: Add, Text, x200 y96 w96 h23, Stash/Chest Click:
Gui, Maker: Add, Text, x184 y128 w32 h19, Cords:
Gui, Maker: Add, Edit, x216 y128 w47 h21 ReadOnly vChest_Click,
Gui, Maker: Add, Button, x274 y128 w89 h20 gCoords, Set Coords
Gui, Maker: Add, Text, x8 y160 w119 h23, Walking to chest/stash:
Gui, Maker: Add, Button, x136 y160 w75 h23 grecord1, Record walk
Gui, Maker: Add, Edit, x8 y184 w298 h21 vStash,
Gui, Maker: Add, Text, x8 y216 w71 h23, Walking Back:
Gui, Maker: Add, Button, x136 y216 w75 h23 grecord2, Record Walk
Gui, Maker: Add, Edit, x8 y240 w298 h21 vBack,
Gui, Maker: Add, Text, x8 y272 w26 h23 +0x200, Skill:
Gui, Maker: Add, Edit, x8 y296 w57 h21 vInfo1,
Gui, Maker: Add, Text, x80 y272 w47 h23 +0x200, Location:
Gui, Maker: Add, Edit, x80 y296 w80 h21 vInfo2,
Gui, Maker: Add, Text, x176 y272 w70 h23 +0x200, Requirements:
Gui, Maker: Add, Edit, x176 y296 w91 h21 vInfo3,
Gui, Maker: Add, Button, x8 y336 w75 h23 gsaveScript, Save Script
Gui, Maker: Show, w372 h369, Script Maker and Editor
Return
MakerGuiClose:
ExitApp
record1:
MsgBox, the recording is currently not working
return
record2:
MsgBox, the recording is currently not working
return
Open:
FileSelectFile, SelectedScript, 3, , Select a Script/Path, Edit script (*.path)
if SelectedScript =
MsgBox, The user didn't select anything.
else
FileReadLine,Read_Type,%SelectedScript%,1
FileReadLine,Read_Exp,%SelectedScript%,2
FileReadLine,Read_Stash,%SelectedScript%,3
FileReadLine,Read_Chest_Click,%SelectedScript%,4
FileReadLine,Read_Back,%SelectedScript%,5
FileReadLine,Read_Info,%SelectedScript%,6
GuiControl, Maker:,Type,%Read_Type%
GuiControl, Maker:,Exp,%Read_Exp%
GuiControl, Maker:,Stash,%Read_Stash%
GuiControl, Maker:,Chest_Click,%Read_Chest_Click%
GuiControl, Maker:,Back,%Read_Back%
StringSplit, w, Read_Info, ||,all
GuiControl, Maker:,Info1,%w2%
GuiControl, Maker:,Info2,%w5%
GuiControl, Maker:,Info3,%w8%
GuiControl, Maker:,path,%SelectedScript%
return
Coords:
MsgBox, 0, , Set Mouse Coordinates for the Chest/stash`n`nPress OK then mouse your mouse over to the chest and press X key. make sure that the RPG MO window is activated
WinActivate,RPG MO - Early Access
WinActivate,RPG MO - Web Browser Game
KeyWait, X,D
KeyWait, X
MouseGetPos,XX,YY
MsgBox, 0, , chest have been set to: %XX% %YY%
GuiControl, Maker:,Chest_Click, %XX% %YY%
return
saveScript:
Gui, Maker:Submit
Script_var =
(
%Type%
%Exp%
%Stash%
%Chest_Click%
%Back%
Skill:|%Info1%||Location/Coordinates:|%Info2%||Requirements:|%Info3%
)
FileSelectFile, Script, S16,%A_ScriptDir%/scripts, Save Script, script (*.ini)
if (ScriptName = "")
return
file := FileOpen(ScriptName, "w")
if !IsObject(file)
{
MsgBox Can't open "%ScriptName%" for writing.
return
}
file.Write(Script_var)
file.Close()
MsgBox, Saved %ScriptName%
return
BotMode:
FileRead,Cfg,RPG MO Bot Config.ini
IF errorlevel
{
MsgBox, 4112,Settings Error,Delete your RPG MO Bot Config.ini in the Bot folder and then restart the Bot.
}
Process, Exist, %Procces%
IF !errorlevel=1
{
MsgBox, 4112, RPG MO Client ERROR, Can't find: %Procces%`n`nPlease start %Procces% and Login to your account then restart RPG MO Bot.
ExitApp
}
Select_Again:
FileSelectFile, Script, 3,,Load Bot script, Script (*.ini)
IF Script =
{
MsgBox, You didn't select a script
Sleep, 200
gosub, Select_Again
return
}
Iniread,Var_Script,%Script%,File Name,Script Name
Iniread,Var_Location,%Script%,Location,Map And Coordinates
Iniread,Var_Training,%Script%,Training ,Skill
Iniread,Var_Equioment,%Script%,Requireings,Equioment
Iniread,Var_Level,%Script%,Requireings,Level
Iniread,Var_Material,%Script%,Gathering,Material/thing
Iniread,Var_Exp,%Script%,Gathering,Exp Per Gather
Iniread,Var_Destroy_FullINV,%Script%,Gathering,Destroy/Remove All The loot/picked items when INV Full
Iniread,Var_Destroy_only,%Script%,Gathering,Destroy/Remove Only These Items
Iniread,Var_Sell_Market,%Script%,Market,Automaticly Sell What you have picked/gatherd in the Market
Iniread,Var_Sell_FullINV,%Script%,Market,Sell ALL the full INV
Iniread,Var_Sell2Uer,%Script%,Market,Sell to a Specific User (UserName)
Iniread,Var_Sell_Price,%Script%,Market,Sell price per Item
Iniread,Var_Anounce_Sell,%Script%,Market,Anounce What you are sell in $$
Iniread,Var_Anounce_Timer,%Script%,Market,Anounce every (milisecounds)
Iniread,Var_Walkingspeed,%Script%,Paths,Walking Speed
Iniread,Var_Chest_Paths,%Script%,Paths,Walking Paths to Chest
Iniread,Var_Gather_Paths,%Script%,Paths,Walking Paths Back to Gathering place
Iniread,Var_ClickChest,%Script%,Paths,Click On Chest to Open
Iniread,Var_ClickGahering,%Script%,Paths,Click Gahering to harves/pick
Iniread,Var_Have_Pet,%Script%,Pet,Have Pet
Iniread,Var_PetINVSize,%Script%,Pet,Pet INV Space (4-16)
Iniread,Var_transfer2Pet,%Script%,Pet,Auto Transfer Loot/items to Pet Whn player INV is Full
WinActivate,%Game_Title%
WinMove,%Game_Title%,,,,0,0
Gui Color, White
Gui Add, Text, x8 y8 w84 h15, Script Info/Help:
Gui Add, Button, x8 y24 w96 h23, Script Info
Gui, Add, ListView,grid x8 y64 w451 h62, Status|Runs|%Var_Material% Stashed|Profit|XP Gained
LV_ModifyCol(1, 100) , LV_ModifyCol(2, 40) , LV_ModifyCol(3, 100) , LV_ModifyCol(4, 85) , LV_ModifyCol(5, 70)
Gui Add, Button, x112 y24 w90 h23, Load new Script
Gui Add, Button, x208 y24 w90 h23, Bot folder
Gui Add, Button, x8 y144 w90 h23, Script Manger
Gui Add, Link, x400 y144 w56 h13, <a href="https://github.com/floowsnaake/RPG-MO---All-in-one-Bot">Bot Page </a>
Gui Add, Link, x520 y144 w73 h13, <a href="http://rpg-mo.wikia.com/wiki/Main_Page">RPG MO Wiki</a>
Gui Show, AutoSize, RPG MO Bot v2 - %Var_Script%
LV_Modify(1,sss)
WinActivate,%Game_Title%
WinActivate,RPG MO Bot v2 - %Var_Script%
return
Help:
MsgBox, 262208,Script Info/Help, %NewStr%
return
SFolder:
run, explore %A_ScriptDir%
return
Lscript:
MsgBox, 36, , Are you sure that you want to load new script?
IfMsgBox,Yes
Gosub,BotMode
return
Make_Script:
MsgBox, 68, , This will close the Bot`, do you want to continue?
IfMsgBox,Yes
{
gosub,ScrMaker
}
return
Start_Bot:
Botkey:
Gui, Submit ,NoHide
hid = 0
Sleep, 200
Full_inv = %Var_Have_Pet%
loops+= 1
Runs+= 1
LV_Modify(1,,,Runs)
INV += Full_inv
XP += Full_inv*Read_Exp
LV_Modify(1,,,,,INV)
LV_Modify(1,,,,,,INV*price "$")
LV_Modify(1,,,,,,,XP)
LV_Modify(1,,,"Going to stash")
K(Var_Chest_Paths)
Sleep, 300
IF (click_chest = 1)
{
ControlClick,x%Mouse_Chest1% y%Mouse_Chest2%, ahk_id %outputvar%
Sleep, 500
ControlClick,x%Mouse_Chest1% y%Mouse_Chest2%, ahk_id %outputvar%
Sleep, 2000
}
LV_Modify(1,,,"Stashing the " Read_Type)
Sleep, 200
K("E 3")
Sleep, 1000
IF NOT Pet0
{
K("Z 3")
Sleep, 1500
K("E 3")
Sleep, 1500
}
IF (loops = Selling_time)
{
loops = 0
LV_Modify(1,,,"Selling " Read_Type " in the market for: " price)
ControlClick,x465 y114, ahk_id %outputvar%
Sleep, 1000
ControlClick,x546 y114, ahk_id %outputvar%
Sleep, 1000
ControlClick,x394 y179, ahk_id %outputvar%
Sleep, 1000
ControlSend,%Read_Type%, ahk_id %outputvar%
Sleep 700
ControlSend,, {Enter}, ahk_id %outputvar%
Sleep 700
ControlClick,x458, y235, ahk_id %outputvar%
Sleep, 200
ControlClick,x458, y235, ahk_id %outputvar%
Sleep 700
ControlSend,, %price%, ahk_id %outputvar%
Sleep 700
ControlClick,x493 y265, ahk_id %outputvar%
Sleep, 1000
ControlClick,x388 y320, ahk_id %outputvar%
Sleep, 1000
LV_Modify(1,,, Read_Type " sold in the market for: " price )
IF (Anounce_Sell = 1)
{
Sleep, 700
K("Enter 1")
Sleep, 3000
K("Up 4")
Sleep, 3000
SendRaw,[sell] %Read_Type% for %price% ea
Sleep, 4000
K("Enter 1")
Sleep, 3000
}
}
LV_Modify(1,,,"Going back")
K(Var_Gather_Paths)
LV_Modify(1,,,"Working...")
return
K(multipleKeyTimes){
Global
Loop, Parse, multipleKeyTimes,`|
{
keyOrTimes:=StrSplit(A_LoopField,A_Space)
Loop % keyOrTimes[2] {
Random, Sleepy, 140, 130
send, % "{" keyOrTimes[1]" Down}"
Sleep, % Sleepy
send, % "{" keyOrTimes[1]" Up}"
Sleep, %Var_Walkingspeed%
}
}
}
return
^Esc::
Quit:
send,{W}
send,{A}
send,{S}
send,{D}
send,{Up}
send,{Left}
send,{Right}
send,{Down}
WinMove,%Game_Title%,,,,906,539
ExitApp
return