forked from brycole/gemstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrguild.lic
3018 lines (2980 loc) · 102 KB
/
grguild.lic
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
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
=begin
Gib's rogue guild script
REQUIRED: grgvars.lic (probably)
NOTE: Script will NOT get you the first rank in any skill.
INCOMPLETE:
Lockmastery: Ranks 54-63.
Sweep, almost in its entirety.
Cheapshots, partner reps, plus multitown hop for watering flowers.
Gambits in its entirety.
Ta'Vaalor tasks may be subject to errors, and considered under construction.
Ta'Vaalor, currently working patchs in place for most tasks.
COMPLETE:
Stun Maneuvers.
Subdue's in-guild reps.
Lockmastery through rank 53.
NOTES:
logic for the script is provided by the get_task method, which returns an array of your tasks and reps and whatnot.
Use of get_task within other scripts can aid automation of critter/partner/picking reps.
Custom variables are all dealt with by the grgvars.lic script. This is to simplify YOUR life when I update.
Instructions are provided withing grgvars for setting it up.
Script will do all known and permitted tasks it can before leaving the guild
$stun_move_room variable seems to have taken precidence as the "resting room" of choice for grguild.
UPDATE:
LOCKMASTERY UP TO RANK 53 WORKING.
UNDER CONSTRUCTION:
Lockmastery ranks 54+
Sweep master reps, currently under construction.
Ta'Vaalor rogue guild. Cause whomever mapped it sucks. Not guaranteed quite yet.
Partner reps.
multitown hop for watering plants.
ERRORS:
(A log, UNEDITED, is always helpful when you find a bug, and I'll try to squish em ASAP.)
For help, check the PC thread in the ROGUE folder, or find me on AIM at Lord Gibreficul. Please make sure you've read the PC thread and the script notes (;grguild notes and ;grguild help) before contacting me directly. I'm busy writing scripts!
version: 0.3
author: Gibreficul
tags: rogue
changelog:
0.3 (2015-02-13):
removed .to_a from strings for Ruby 2.0 compatibility (Tillmen)
=end
#silence_me
#hide_me
#quiet_exit
no_kill_all
no_pause_all
$rgmethods = []
$do_lfm = false unless Skills.pickinglocks >= 30
$landtime = 0 unless $landtime >= 0
$soltime = 0 unless $soltime >= 0
$icetime = 0 unless $icetime >= 0
unless $rgpassword
start_script("grgvars")
wait_while("Loading password and custom settings."){running? 'grgvars'}
echo "CHECK TO MAKE SURE YOU HAVE grgvars.lic downloaded, MODIFIED FOR YOU (open the damn script) and trusted, then try again." unless $rgpassword
exit unless $rgpassword
end
if Char.name !~ /Gibreficul/ && $rgpassword == ["kick","pull","kick","knock","pull","pull"]
respond ""
respond "SCRIPT HAS DETERMINED THAT YOU HAVE THE SAME PASSWORD AS GIBREFICUL"
respond "THIS PROBABLY INDICATES THAT YOU HAVE NOT CHANGED grgvars.lic TO USE YOUR PASSWORD"
respond "PLEASE OPEN grgvars.lic AND MODIFY THE COMMANDS IN THE $rgpassword ARRAY."
respond "EXITING"
$rgpassword = nil
exit
elsif $rgpassword.length > 7 || $rgpassword.length < 5
respond ""
respond "SCRIPT HAS DETERMINED THAT YOU HAVE AN INVALID GUILD PASSWORD SET"
respond "PLEASE MODIFY THE grgvars.lic SCRIPT AND MAKE SURE YOUR PASSWORD IS WHAT IS SHOWN IN THE $rgpassword ARRAY."
respond "EXITING"
$rgpassword = nil
exit
end
################
$rogues = ["Nightcrawler", "Teef", "Kayous", "Clio", "Dashar", 'Sexy', 'Zan','Gibreficul', 'Swerr', 'Katze', 'Dan', 'Dagger', 'Veska','Locksmith','Baswab','Matt','Smeagol','Yollia','Morphion','Zishra','Seran','Dart','Stickyfingers','Rinn', 'Bhaal','Fiddlesticks','Ledru']
$rgdoors = [16393, 16838, 13350, 18348, 13243, 15694, 17984, 12421]
$rgidoor = [16394, 17897, 17838, 17806, 17932, 17964, 17985, 14089]
$vaalor_badrooms = [17829, 17830, 17831, 17832, 17833, 17834, 17835, 17836, 18347]
$lock_list = [["a primitive lock", 35],["a rudimentary lock", 75],["an extremely easy lock", 115],["a very easy lock", 155],["an easy lock", 195],["a very basic lock", 235],["a fairly easy lock", 275],["a simple lock", 315],["a fairly simple lock", 355],["a fairly plain lock", 395],["a moderately well\-crafted lock", 435],["a well-crafted lock", 475],["a tricky lock", 515],["a somewhat difficult lock", 555],["a moderately difficult lock", 595],["a very well\-crafted lock", 635],["a difficult lock", 675],["an extremely well\-crafted lock", 715],["a very difficult lock", 755],["a fairly complicated lock", 795],["an intricate lock", 835],["an amazingly well\-crafted lock", 875],["a very complex lock", 915],["an impressively complicated lock", 955],["an amazingly intricate lock", 995],["an extremely difficult lock", 1035],["an extremely complex lock", 1075],["a masterfully well\-crafted lock", 1115],["an amazingly complicated lock", 1155],["an astoundingly complex lock", 1195],["an incredibly intricate lock", 1235],["an absurdly well\-crafted lock", 1275],["an exceedingly complex lock", 1315],["an absurdly difficult lock", 1355],["a masterfully intricate lock", 1395],["an unbelievably complicated lock", 1435],["an impossibly complex lock", 1485]]
$trap_list = ["an easy trap","a rudimentary trap","a very basic trap","a simple trap","a fairly simple trap","a somewhat difficult trap","a moderately difficult trap","a difficult trap","a very difficult trap","an extremely difficult trap","an intricate trap","a very complex trap","an incredibly hard trap","an amazingly difficult trap","an astonishingly difficult trap","an absurdly difficult trap","a masterfully difficult trap"]
$grgshield = ["aegis", "buckler","greatshield","mantlet","parma","pavis", "scutum","shield","targe"]
$rgfindjaws = false
$rgfindacid = false
$rgfindcloud = false
$rgfindmagic = false
unless $rogues.include?(Char.name)
$rogues.push(Char.name) if XMLData.game =~ /GSF/
end
$rogues.push(Char.name)
###################
# ASSIGN SETUP METHODS #
###################
#$rgmethods.push("rg_hands_checker") unless $rgmethods.include?("hands_checker")
def rg_hands_checker
gweaps = ["achlais", "adze", "angon", "awl\-pike", "axe", "backsword", "baculus", "badelaire", "balestarius", "breastplate","chain", "ball\-and\-chain", "ball", "balta", "bardiche", "baselard", "battle\-axe", "battlesword", "bidenhander", "bilbo", "bill", "binnol", "bisacuta", "blackjack", "bodkin", "bola", "^bow$", "brandestoc", "braquemar", "broadsword", "bulawa", "bullwhip", "cat\-o'\-nine\-tails", "cateia", "cestus", "chakram", "chereb", "cinquedea", "claidhmore", "claw", "cleaver", "club", "colichemarde", "contus", "craquemarte", "croc", "crook", "crosier", "crossbow", "crowbill", "cudgel", "cutlass", "dagger", "dart", "dhara", "dirk", "discus", "doloire", "dubh", "epee", "espadon", "estoc", "falarica", "falcastra", "falchion", "falx", "fang", "fauchard", "fist\-scythe", "flail", "flamberge", "fleuret", "flyssa", "foil", "fork", "framea", "francisca", "fuscina", "gaesum", "gauche", "gauntlet\-sword", "gladius", "glaive", "godendag", "goliah", "goupillon", "greataxe", "greatsword", "guisarme", "halberd", "half\-moon", "hammer of kai", "hammer", "handaxe", "harpoon", "hatchet", "hippe", "hook\-knife", "hoolurge", "jackblade", "jaculum", "javelin", "jeddart\-axe", "jitte", "kai", "kama", "kaskara", "katana", "katar", "katzbalger", "kheten", "khopesh", "kilij", "knife", "knuckle\-blade", "knuckle\-duster", "korseke", "kozuka", "kris", "lance", "lisan", "longbow", "longsword", "mace", "machera", "machete", "magari\-yari", "mail", "manople", "massuelle", "mattina", "mattock", "maul", "misericord", "^moon$", "nagimaki", "naginata", "^net$", "oncin", "paingrip", "palache", "parazonium", "partisan", "pavade", "pelta", "periperiu", "pernat", "^pick", "pike", "pill", "pilum", "poignard", "pugio", "quadrelle", "quoit", "ranseur", "rapier", "razorpaw", "runestaff", "runka", "sabar", "sabre", "^sai$", "^sap$", "sapara", "sarissa", "scepter", "schiavona", "schlager", "scimitar", "scorpion", "scramasax", "scythe", "seax", "shail", "shillelagh", "sica", "sledgehammer", "spadroon", "sparte", "spatha", "spear", "spetum", "spiculum", "spontoon", "sprinkler", "staff", "^star$", "^stick$", "stiletto", "sudis", "sword", "taavish", "tabar", "tails", "takouba", "tambara", "tanto", "taper", "tetsubo", "tock", "tocke", "tongue", "toporok", "trident", "troll\-claw", "truncheon", "tuck", "verdun", "voulge", "wakizashi", "waraxe", "whip", "whip\-blade", "xiphos", "yataghan", "yierka\-spur", "yoribo", "zinnor", "zweihander"]
fput "store weapon" if GameObj.right_hand.noun =~ /#{gweaps.join('|')}/
fput "store shield" if GameObj.left_hand.noun =~ /shield|buckler|targe|parma|aegis|scutum|greatshield|mantlet|pavis/
fput "store ranged" if GameObj.left_hand.noun =~ /bow|yumi/i
fput "stow left" if GameObj.left_hand.noun =~ /lockpick/i
fput "wear keyring" if GameObj.left_hand.noun =~ /keyring/i || GameObj.left_hand.noun =~ /keyring/i
$container.flatten.each{|cont|
break if GameObj.right_hand.name =~ /Empty|\brag\b|broom|\bbag\b|\bcan\b/ && GameObj.left_hand.name =~ /Empty|\brag\b|broom|\bbag\b|\bcan\b/i
fput "_drag ##{GameObj.right_hand.id} ##{cont}" unless GameObj.right_hand.name =~ /Empty|\brag\b|broom|\bbag\b|\bcan\b/i
fput "_drag ##{GameObj.left_hand.id} ##{cont}" unless GameObj.left_hand.name =~ /Empty|\brag\b|broom|\bbag\b|\bcan\b/i
}
if GameObj.right_hand.noun =~ /\b(can|rag|broom|bag)\b/ || GameObj.left_hand.noun =~ /\b(can|rag|broom|bag)\b/
mymove $rgtoolrack
fput "put ##{GameObj.right_hand.id} on rack" if GameObj.right_hand.noun =~ /\b(can|rag|broom|bag)\b/
fput "put ##{GameObj.left_hand.id} on rack" if GameObj.left_hand.noun =~ /\b(can|rag|broom|bag)\b/
end
end
$rgmethods.push("gld_pw") unless $rgmethods.include?("gld_pw")
def gld_pw
# return(go_guild) unless [$rgdoor, $rgdoors].flatten.include?(Room.current.id)
fput "lean door"
$rgpassword.each{|action|
fput "#{action} door"
}
fput "go door"
end
#$rgmethods.push("find_nearest") unless $rgmethods.include?("find_nearest")
def find_nearest(target_list)
#You probably have this method somewhere already, it's recycled in a ton of scripts, but it's here if you don't.
start_room = Room.current
least_time = nil
least_target = nil
previous, shortest_distances = Map.dijkstra(start_room.id)
for target in target_list
return target if start_room.id == target
est_time = shortest_distances[target]
if !est_time.nil? and (least_time.nil? or least_time > est_time)
least_target = target
least_time = est_time
end
end
least_target = nil unless least_target
return least_target
end
$rgmethods.push("wait_rt") unless $rgmethods.include?("wait_rt")
def wait_rt
wait_while { checkrt > 0 or checkcastrt > 0 }
sleep 0.25
end
$rgmethods.push("mymove") unless $rgmethods.include?("mymove")
def mymove(room = false)
fput "out" if checkroom =~ /table|dark alcove|Locksmithing Workshop|dark corner/i || (Room.current.id == 4 && checkpaths.include?('out'))
if $vaalor_badrooms.include?(Room.current.id)
rguild(18348)
respond "YOU ARE IN THE VAALOR GUILD, PATCHING GO2 ERRORS"
if Room.current.id == 18347
walk
else
start_script("go2",[17833, '_disable_confirm_']) unless Room.current.id == 17833
wait_while{running?("go2")}
fput "go panel"
walk
end
end
if room
if hiding?
start_script("go2",['typeahead=0', room, '_disable_confirm_'])
wait_while{running?("go2")}
else
start_script("go2",[room, '_disable_confirm_'])
wait_while{running?("go2")}
end
else
echo "NO TARGET FOR MOVEMENT"
end
end
######################
## MOVE AROUND THE GUILD ##
######################
#########
### CUSTOM CODE BY KALROS. USER ;grguild enter to enter the guild.
#########
testvar =
if script.vars[1] == 'enter'
go_guild
if script.vars[2].nil?
mymove $rgadmin
else
eval ("testvar = $#{script.vars[2]}")
if testvar.nil?
echo "No room found"
exit
end
start_script "go2", ["#{testvar}"]
end
exit
end
$rgmethods.push("get_rank") unless $rgmethods.include?("get_rank")
def get_rank(task)
mymove $rgmaster
fput "ask ##{GameObj.npcs.find{|npc| npc.name =~ /master/i}.id} about next #{task}"
mymove $rgadmin
fput "ask ##{GameObj.npcs.find{|npc| npc.name =~ /training/i}.id} about train #{task}"
end
$rgmethods.push("go_admin") unless $rgmethods.include?("go_admin")
def go_admin
go_guild
mymove $rgadmin
end
$rgmethods.push("go_master") unless $rgmethods.include?("go_master")
def go_master
go_guild
mymove $rgmaster
end
def find_something(thisitem)
thisitem = [ thisitem ] unless thisitem.type == 'Array'
findthis = false
GameObj.inv.each{|sack|
findthis = GameObj.right_hand.id if GameObj.right_hand.noun =~ /#{thisitem.join('|')}/
findthis = GameObj.left_hand.id if GameObj.left_hand.noun =~ /#{thisitem.join('|')}/
next if sack.contents == nil
if thisitem.include?('lockpick')
findthis = sack.contents.find{|pick| pick.noun == "lockpick" && pick.name =~ /silver |mithril |ora |glaes |laje |vultite |rolaren |veniom |invar |alum |golvern |kelyn |vaalin /i}.id
else
end
if findthis != 4 && findthis
fput "get ##{findthis}"
break
else
findthis = false
end
}
end
def grg_checkin
mymove 'bank'
fput "with 15000 silver"
go_master
3.times{fput "ask ##{GameObj.npcs.find{|npc| npc.name =~ /master/i}.id} about checkin"}
mymove 'bank'
fput "depo all"
go_admin
end
def grg_initiation
mymove 'bank'
fput "withdraw 15000 silver"
go_master
fput "ask ##{GameObj.npcs.find{|npc| npc.name =~ /master/i}.id} about initiat"
end
$rgmethods.push("go_guild") unless $rgmethods.include?("go_guild")
def go_guild
respond "Rogue Guild Grandmaster Gibreficul will now determine the closest guild, this may take a moment."
x = find_nearest([$rgdoors, $rgidoor, $vaalor_badrooms].flatten)
if $rgdoors.include?(x)
rguild(x)
respond "Rogue Guild Grandmaster Gibreficul has determined you are nearest the #{$guildname} Guild"
if $rgdoor == 17984
### THIS SHOULD BE FIXED ###
mymove 10957
fput "go small door"
elsif $rgdoor == 17837
### THIS SHOULD BE FIXED ###
mymove 13350
fput "go gold door"
elsif $rgdoor == 17931
mymove 13243
fput "go narrow step"
elsif $rgdoor == 18348
respond "**** Ta'Vaalor smart patch because go2 needs to be fixed."
rg_hands_checker
if Skills.pickinglocks >= 30
echo "PASSED PICK CHECK, SCANNING FOR LOCKPICK"
findpick = false
GameObj.inv.each{|sack|
findpick = GameObj.right_hand.id if GameObj.right_hand.noun == 'lockpick'
findpick = GameObj.left_hand.id if GameObj.left_hand.noun == 'lockpick'
next if sack.contents == nil
findpick = sack.contents.find{|pick| pick.noun == "lockpick" && pick.name =~ /silver |mithril |ora |glaes |laje |vultite |rolaren |veniom |invar |alum |golvern |kelyn |vaalin /i}.id
if findpick != 4 && findpick
@stashsack = sack.id
fput "get ripper from toolkit"
break
else
findpick = false
end
}
if findpick
pickshed
fput "_drag ripper toolkit"
else
asklocksmith
end
else
echo "MOVE TO THE LOCKSMITH AND MAKE THAT BITCH LET YOU IN"
asklocksmith
end
else
end
mymove $rgdoor unless Room.current.id == $rgdoor
echo "GUILD PASSWORD HERE"
gld_pw
matchtimeout(1, "Obvious")
fput "climb shaft" if Room.current.id == 17985
elsif $rgidoor.include?(x)
case x
when 16394
rguild(16393)
when 17897
rguild(16838)
when 17838
rguild(17837)
when 17806
rguild(18348)
when 17932
rguild(13243)
when 17964
rguild(15694)
when 17985
rguild(17984)
when 14089
rguild(12421)
end
respond "Rogue Guild Grandmaster Gibreficul has determined you are inside the #{$guildname} Guild"
return
elsif $vaalor_badrooms.include?(x)
rguild(18348)
respond "YOU ARE IN THE VAALOR GUILD, PATCHING GO2 ERRORS"
if Room.current.id == 18347
walk
else
mymove 17833 unless Room.current.id == 17833
fput "go panel"
walk
end
else
echo "NO FUCKING CLUE"
echo "EXITING, 308"
exit
end
end
def pickshed
mymove 3509 unless Room.current.id == 3509
Spell[403].cast if Spell[403].known? && !Spell[403].active?
clear
fput "picklock shed"
x = matchwait /You make|does not appear to be locked|broken lockpick.|mention what you want to pick|Um, but it's open/
if x =~ /not appear|Um, but it's open/
fput "open shed" unless x =~ /open/
multifput("go shed", "_drag ripper toolkit")
shedpuzzle
elsif x =~ /broken|mention what you want to pick/
respond "********* Broken lockpick" if x =~ /broken/
fput "put my ripper in my toolkit"
return(asklocksmith)
else
y = matchwait /\.\.\.CLICK|not appear to be locked|using a broken|Roundtime/i
if y =~ /within your abilities|but you get a sense that it has|are not able to|Roundtime/
waitrt?
return(pickshed)
elsif y =~ /are not able to|stuck/
waitrt?
fput "put my ripper in my toolkit"
return(asklocksmith)
elsif y =~ /not appear to be locked|\.\.\.CLICK/
waitrt?
fput "put my ripper in my toolkit"
multifput("open shed","go shed")
return(shedpuzzle)
elsif y =~ /broken/
respond "********* Broken lockpick"
waitrt?
fput "put my ripper in my toolkit"
return(asklocksmith)
else
echo "maybe error?"
return(go_guild)
end
end
end
def asklocksmith
mymove 'locksmith'
fput "ask shind about guild"
matchwait /just went and picked the shed, so you ought to be able to get that far/
mymove 3509
fput "open shed"
fput "go shed"
shedpuzzle
end
def shedpuzzle
if Room.current.id.to_s =~ /17805|20020/
fput "pull hoe"
waitrt?
sleep 1
fput "pull rake"
waitrt?
sleep 1
fput "pull shovel"
waitrt?
sleep 1
fput "go panel"
else
go_guild
end
end
#$rgmethods.push("rguild") unless $rgmethods.include?("rguild")
def rguild(town)
case town
when 16393
### ROOM NUMBERS FOR W-LANDING PULLED FROM slib.lic. Thanks Spiffy.
$guildname = "Wehnimer's Landing"
$rgdoor = 16393
$rgindoor = 16394
$rgadmin = 16504
$rgfootpads = 16540
$rgmaster = 16485
$rgtoolrack = 16581
$rgwindows = [16557, 16555, 16491, 16490, 16517]
$rgdirt = [16517, 16490, 16438, 16492, 16534, 16540]
$rgshop = 16421
$rgbar = 16423
$rgwildflowers = [16504, 16438, 16517, 16534, 16545]
$rgkitchen = 16433
$rgtable = 16427
$rgworkshop = 16574
$rgdummy = 16509
$rgmannequin = 16509
$rglockroom = 8686
$rgtownsmith = 'locksmith'
$rghardlock = 'door'
$rgbuypick = 2
$rgwirenum = 4
when 16838
$guildname = "Zul Logoth"
$rgdoor = 16838
$rgindoor = 17897
$rgadmin = 17915
$rgfootpads = 17917
$rgmaster = 17904
$rgdummy = 17918
$rgmannequin = 17916
$rgtoolrack = 17894
$rgwildflowers = [17921, 17914, 17922, 17923, 17919]
$rgwindows = [17909, 17905, 17895, 17893, 17891]
$rgdirt = [17914, 17917, 17916, 17923, 17922, 17920, 17919, 17918]
$rgkitchen = 17890
$rgtable = 17901
$rgshop = 17906
$rgworkshop = 17911
$rgbar = 17899
$rgtownsmith = 'locksmith'
$rglockroom = 1011
$rghardlock = 'tent'
$rgbuypick = 2
$rgwirenum = 5
when 18348
echo "TA VAALOR GRGUILD SETTING VARS"
$guildname = "Ta'Vaalor"
$rgdoor = 18348
$rgindoor = 17806
$rgadmin = 17836
$rgfootpads = 18345
$rgmaster = 17831
$rgdummy = 17819
$rgmannequin = 17822
$rgtoolrack = 17817
$rgwildflowers = [17834, 17833, 17836, 17835, 17829]
$rgwindows = [17806, 17807, 17808, 17809, 17812, 17825, 17826]
$rgdirt = [17820, 17816, 17818, 17819, 17822, 17823, 17824]
$rgkitchen = 17830
$rgtable = 17828
$rgshop = 17821
$rgworkshop = 17827
$rgbar = 10386
$rgexit = [17825, "go chute", 10434]
$vaalor_locksmith = 10434
$rglockroom = 17829
$rgtownsmith = 'locksmith'
$rghardlock = 'door'
$rgbuypick = 2
$rgwirenum = 4
echo "Ta'Vaalor's map is buggy, I have done what I can to patch it, hopefully a remapping is in order shortly."
when 13350
$guildname = "Ta'Illistim"
$rgdoor = 17837
$rgindoor = 17838
$rgadmin = 17883
$rgfootpads = 17864
$rgmaster = 17886
$rgdummy = 17862
$rgmannequin = 17861
$rgtoolrack = 17861
$rgwildflowers = [17855, 17851, 17871, 17870, 17869 ]
$rgwindows = [17856, 17853, 17872, 17871, 17885, 17869, 17860]
$rgdirt = [17840, 17876, 17877, 17878, 17879]
$rgkitchen = 17889
$rgtable = 17838
$rgshop = 17880
$rgworkshop = 17881
$rgbar = 17867
$rglockroom = 17873
$rgtownsmith = 'locksmith'
$rghardlock = 'case'
$rgbuypick = 3
$rgwirenum = 4
$rgshieldroom = 4012
$rgshieldnum = 1
$rgshieldcost = 100
$rgdagshop = 602
$rgdagnum = 1
$rgdagcost = 100
when 13243
$guildname = "Solhaven"
$rgdoor = 17931
$rgindoor = 17932
$rgadmin = 17948
$rgfootpads = 17951
$rgmaster = 17956
$rgdummy = 17950
$rgmannequin = 17949
$rgtoolrack = 17941
$rgwildflowers = [17942, 17946, 17944, 17950, 17953]
$rgwindows = [17963, 17946, 17944, 17948, 17950]
$rgdirt = [17942, 17946, 17945, 17944, 17947, 17948, 17949]
$rgkitchen = 17940
$rgtable = 17962
$rgshop = 17935
$rgbuyer = 17958
$rgworkshop = 17960
$rgbar = 17937
$rglockroom = 1530
$rgtownsmith = 5725
$rghardlock = 'door'
$rgbuypick = 3
$rgwirenum = 6
when 15694
$guildname = "Icemule Trace"
$rgdoor = 15694
$rgindoor = 17964
$rgadmin = 17967
$rgfootpads = 17965
$rgmaster = 17975
$rgdummy = 17976
$rgmannequin = 17965
$rgtoolrack = 17969
$rgwildflowers = [17967, 17976, 17964, 17965, 17974]
$rgwindows = [17976, 17964, 17965, 17966, 17975]
$rgdirt = [17967, 17976, 17965]
$rgkitchen = 17969
$rgtable = 17981
$rgshop = 17970
$rgbuyer = 17971
$rgworkshop = 17978
$rgbar = 17980
$rglockroom = 2303
$rgtownsmith = 'locksmith'
$rghardlock = 'door'
$rgbuypick = 2
$rgwirenum = 4
when 17984
$guildname = "River's Rest"
$rgdoor = 17984
$rgindoor = 17985
$rgadmin = 18007
$rgfootpads = 18010
$rgmaster = 17991
$rgdummy = 18008
$rgmannequin = 18008
$rgtoolrack = 18003
$rgwildflowers = [18000, 18005, 18006, 18009, 17999]
$rgwindows = [18004, 18002, 18001, 17999, 17989, 17988]
$rgdirt = [17999, 18000, 18005, 18007, 18008, 18009 ]
$rgkitchen = 18001
$rgtable = 17995
$rgshop = 17992
$rgbuyer = false
$rgworkshop = 18004
$rgbar = 17995
$rglockroom = 10887
$rgtownsmith = 'locksmith'
$rghardlock = 'hatchway'
$rgbuypick = 2
$rgwirenum = 4
when 12421
$guildname = "Teras Isle"
$rgdoor = 12421
$rgindoor = 14089
$rgadmin = 17798
$rgfootpads = 17419
$rgmaster = 17432
$rgdummy = 17797
$rgmannequin = 17802
$rgtoolrack = 17396
$rgwildflowers = [17396, 17432, 17433, 17803, 17800]
$rgwindows = [17396, 17804, 14089, 17421, 17800]
$rgdirt = [17421, 17433, 17796, 17799, 17800]
$rgkitchen = 17420
$rgtable = 17801
$rgshop = 17434
$rgbuyer = 17796
$rgworkshop = 17387
$rgbar = 17800
$rglockroom = 1860
$rgtownsmith = 'locksmith'
$rghardlock = 'gate'
$rgbuypick = 2
$rgwirenum = 4
end
end
######### MULTIPLE SKILL TASKS ###########
############### SWEEP COURTYARD
$rgmethods.push("sweep_courtyard") unless $rgmethods.include?("sweep_courtyard")
def sweep_courtyard(again = false)
unless again
go_guild
mymove $rgtoolrack
fput "store weapon" if checkright
fput "store shield" if checkleft
fput "stow right" unless GameObj.right_hand.name =~ /broom|empty/i
fput "stow left" unless GameObj.left_hand.name =~ /bag|empty/i
end
multifput("get broom from rack","get bag from rack") unless GameObj.right_hand.noun =~ /broom/ && GameObj.left_hand.noun =~ /bag/i
fput "put bag in bin"
$rgdirt.each{|room|
mymove room
while GameObj.loot.find{|newdirt| newdirt.noun =~ /dirt/i}
sleep 1
fput "push broom"
wait_rt
end
sleep 1
fput "get pile"
fput 'look in my bag'
x = matchwait /room for more|full|empty/
break if x =~ /full/
}
mymove $rgtoolrack
fput "put bag in bin"
y = matchwait /isn't full|repetition| have completed/
if y =~ /completed/
fput "put broom on rack"
fput "put bag on rack"
mymove $rgadmin
else
sweep_courtyard(true)
end
end
############## WINDOWS
#$rgmethods.push("wintime") unless $rgmethods.include?("wintime")
def wintime
echo Time.now.to_i - $windows_time
end
$rgmethods.push("windows") unless $rgmethods.include?("windows")
def windows
go_guild
get_rag unless GameObj.right_hand.noun =~ /rag/i || GameObj.left_hand.noun =~ /rag/i
$windows_time = Time.now.to_i unless $windows_time
$windows_time = Time.now.to_i if Time.now.to_i - $windows_time > 620
$landtime = $windows_time if $guildname =~ /Wehnimer/
$soltime = $windows_time if $guildname =~ /Solhaven/
$icetime = $windows_time if $guildname =~ /Icemule/
$rgwindows.each{|win|
wait_rt
sleep 1
mymove win
fput "rub ##{GameObj.loot.find{|window| window.noun =~ /window/i}.id}" if GameObj.loot.find{|window| window.noun =~ /window/i}
fput "rub ##{GameObj.room_desc.find{|thing| thing.noun =~ /window/i}.id}" if GameObj.room_desc.find{|thing| thing.noun =~ /window/i} && !GameObj.loot.find{|window| window.noun =~ /window/i}
x = matchwait /repetition|completed|enough cleaning for|need to do that/
wait_rt
walk if win == 17885
if x =~ /completed|need to do that/
$done = true
break
else
$done = false
end
}
sleep 1
put_rag if GameObj.right_hand.noun =~ /rag/i || GameObj.left_hand.noun =~ /rag/i
end
#$rgmethods.push("put_rag") unless $rgmethods.include?("put_rag")
def put_rag
mymove $rgtoolrack
return put_rag unless Room.current.id == $rgtoolrack
fput "put rag on rack"
$windows_time = 0 if get_task.find{|skil, task, rep| task =~ /clean the windows in the guild/ && rep =~ /no/i}
end
#$rgmethods.push("get_rag") unless $rgmethods.include?("get_rag")
def get_rag
rg_hands_checker
mymove $rgtoolrack
return get_rag unless Room.current.id == $rgtoolrack
fput "get rag from rack"
end
def do_windows(backroom = false)
unless $windows_time
windows
return(smart_task)
end
if Time.now.to_i - $windows_time > 620
echo "HELLO NURSE"
windows
return(smart_task)
else
# echo "ELSE GOODBYE NURSE"
respond " **** ONE MOMENT, CALCULATING WINDOWS TO WASH IN WHAT GUILD AND WHATNOT ****"
x = find_nearest([$rgdoors, $rgidoor, $vaalor_badrooms].flatten)
rguild(x)
if $wait_for_windows
mymove $stun_move_room
wait_until("Waiting on dirty windows, change setting to $wait_for_windows = false in grgvars to toggle this off"){Time.now.to_i - $windows_time > 620}
windows
elsif $guildname =~ /Wehnimer/
if Time.now.to_i - $landtime > 620 && $landtime != 0
windows
return(smart_task)
elsif Time.now.to_i - $soltime > 590
mymove 'bank'
returnhome = Room.current.id
fput "depo all"
fput "with 100 silver"
fput "gird"
mymove 13243
$landtime = $windows_time
windows
mymove returnhome if $done
return(smart_task)
else
mymove 'bank'
returnhome = Room.current.id
fput "depo all"
fput "with 100 silver"
fput "gird"
$landtime = $windows_time
mymove 2300
windows
mymove returnhome if $done
return(smart_task)
end
elsif $guildname =~ /Solhaven/
if Time.now.to_i - $soltime > 620 && $soltime != 0
windows
return(smart_task)
elsif Time.now.to_i - $landtime > 590
mymove 'bank'
returnhome = Room.current.id
fput "depo all"
fput "with 100 silver"
fput "gird"
$soltime = $windows_time
mymove 13243
windows
mymove returnhome if $done
return(smart_task)
else
mymove 'bank'
returnhome = Room.current.id
fput "depo all"
fput "with 100 silver"
fput "gird"
$soltime = $windows_time
mymove 2300
windows
mymove returnhome if $done
return(smart_task)
end
elsif $guildname =~ /Icemule/
if Time.now.to_i - $icetime > 620 && $icetime != 0
windows
return(smart_task)
elsif Time.now.to_i - $soltime > 590
mymove 'bank'
returnhome = Room.current.id
fput "depo all"
fput "with 100 silver"
fput "gird"
$icetime = $windows_time
mymove 13243
windows
mymove returnhome if $done
return(smart_task)
else
mymove 'bank'
returnhome = Room.current.id
fput "depo all"
fput "with 100 silver"
fput "gird"
$icetime = $windows_time
mymove 228
windows
mymove returnhome if $done
return(smart_task)
end
elsif $guildname =~ /Ta'(Vaalor|Illistim)/ && Char.level > 60 && Skills.climbing >= 50 && percentencumbrance <= 20
###
if $guildname =~ /Ta'Illistim/
$rg_en_shortcut = { 'backroom' => 188, 'goroom' => 3519}
start_script('go2', ['shortcut=on'])
wait_while{running?('go2')}
elsif $guildname =~ /Ta'Vaalor/
$rg_en_shortcut = { 'backroom' => 3519, 'goroom' => 188}
start_script('go2', ['shortcut=on'])
wait_while{running?('go2')}
mymove $rgexit[0]
fput "go chute"
end
$windows_time = 0
mymove $rg_en_shortcut['goroom']
windows
if $guildname =~ /Ta'Vaalor/i
mymove $rgexit[0]
fput "go chute"
end
mymove $rg_en_shortcut['backroom']
echo "smart_task 790, maybe? ending loop"
else
if $wait_for_windows
mymove $stun_move_room
wait_until("Waiting on dirty windows"){Time.now.to_i - $windows_time > 620}
windows
else
if $guildname =~ /Ta'Vaalor/
mymove $rgexit[0]
fput "go chute"
end
mymove "town"
echo "GRGUILD EXITING, Toggle $wait_for_windows = true to prevent this. "
exit
end
end
end
end
def do_thewindows
if $windows_time
if Time.now.to_i - $windows_time > 620
windows
return(smart_task)
else
if $guildname =~ /Wehnimer's Landing/
mymove 'bank'
fput "with 100 silver"
$windows_time = 0
fput "gird"
returnhome = Room.current.id
mymove 13243
$landtime = $windows_time
windows
fput "gird"
unless $done
$soltime = $windows_time
mymove 15694
windows
end
fput "gird"
mymove returnhome
fput "depo all"
go_guild
$icetime = $windows_time
$windows_time = 0
return(smart_task)
elsif $guildname =~ /Solhaven|Icemule Trace/
mymove 'bank'
fput "with 100 silver"
$windows_time = 0
fput "gird"
returnhome = Room.current.id
mymove 228
go_guild
windows
fput "gird"
mymove returnhome
fput "depo all"
go_guild
$windows_time = 0
return(smart_task)
else
if $wait_for_windows
mymove $stun_move_room
wait_until("Waiting on dirty windows"){Time.now.to_i - $windows_time > 620}
windows
else
if $guildname =~ /Ta'Vaalor/
mymove $rgexit[0]
fput "go chute"
end
# mymove $stun_move_room
# next
end
end
end
else
echo "NO WINDOWS TIME SET"
windows
end
end
################ SPECIFIC SKILL TASKS #################
###### SUBDUE TASKS
######################## MELONS
$rgmethods.push("melons") unless $rgmethods.include?("melons")
def subdue_first_rank(inmaster = false)
unless inmaster
go_guild
mymove $rgfootpads
x = false
until x
fput "ask ##{GameObj.npcs.find{|npc| npc.name =~ /Master Footpad/}.id} about train subdue"
x = matchtimeout(30, "pulls you aside for some instruction")
end
return(subdue_first_rank(true))
end
echo "EXITING, 891"
matchwait /Type SUBDUE/
target = GameObj.npcs.find{|npc| npc.noun == 'mannequin'}.id
fput "stance off" unless percentstance < 20
exit
end
def melons(inside = false)
unless inside
go_guild
mymove $rgmannequin
rg_hands_checker
fput "ready weapon"
fput "go mann"
end
fput "look on mann"
x = matchwait /battered melon rests|gore cling to a wooden spike|ripe melon rests/
if x =~ /battered melon|gore cling/
fput "clean mann"
sleep 1
wait_rt
fput "put melon on man"
wait_rt
end
wait_rt
fput "stance off" unless percentstance <= 20
wait_until("LOW STAMINA"){checkstamina > 5}
fput "subdue mann"
z = false
y = matchwait /causes a deep crack|a nice percussion noise|land a perfect blow|melon is now pulp|melon is obliterated|mannequin needs a head/
if y =~ /land a perfect blow/
z = matchwait /repetition|complete/
wait_rt
elsif y =~ /melon is obliterated/
wait_rt
fput "stand" until standing?
end
wait_rt
if z =~ /complete/
fput "store weapon"
fput "out"
mymove $rgadmin
else
melons(true)
end
end
################ GARLIC
$rgmethods.push("garlic") unless $rgmethods.include?("garlic")
def garlic(inside = false)
unless inside
go_guild
mymove $rgkitchen
rg_hands_checker
fput "ready weapon"
fput "go kitchen"
end
fput "look on block"
z = matchwait /ripe clove of garlic sits neatly in the middle|horribly mangled clove of garlic|perfectly smashed clove of garlic|pile of freshly peeled garlic cloves sits/
wait_rt
fput "put block in pot" if z =~ /perfectly smashed/
fput "clean block" if z =~ /horribly mangled/
wait_rt
fput "put clove on block" unless z =~ /sits neatly/
wait_until("LOW STAMINA"){checkstamina > 5}
fput "subdue block"
x = matchwait /Bellisimo|little softer next|manage to miss the clove|clove is obliterated|You must caress da garlic|Put it in the pot now/
if x =~ /Bellisimo/
y = matchwait /repetition|complete/
wait_rt
unless y =~ /complete/i
garlic(true)
return
end
elsif x =~ /softer|clove is obliterated|You must caress da garlic/
wait_rt
fput "clean block"
garlic(true)
return
elsif x =~ /miss the clove/