Advertisement
Guest User

rogue.lic

a guest
Jan 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 85.84 KB | None | 0 0
  1. =begin
  2.  
  3. Automates many rogue guild tasks. Currently automates all solo sweep, gambit, cheap shot and subdue tasks. Can also automate critter sweep tasks.
  4. In order to automate sweep, gambit and cheap shot partner reps you and your partner must have both this script and the "task" script.
  5.  
  6. Must do ;rogue setup and fill out the settings before running this script.
  7.  
  8. Type ;rogue for usage.
  9.  
  10. Type ;rogue sweep to automate solo sweep tasks. ;rogue sweep <partnername> for partner tasks.
  11. Type ;rogue gam to automate solo gambit tasks. ;rogue gam <partnername> for partner tasks.
  12. Type ;rogue cheap to automate solo cheap shot tasks. ;rogue cheap <partnername> for partner tasks.
  13. Type ;rogue sub to automate solo subdue tasks.
  14. Type ;rogue lmas to do lockmastery tasks. Doesn't do all lockmastery tasks.
  15. Type ;rogue stun to do stun maneuvers tasks. Currently only does sweep courtyard and clean windows tasks.
  16. Typing ;rogue <sweep, gam, sub or lmas> will also turn in completed tasks to the NPC.
  17. Type ;rogue cal to calibrate your calipers.
  18. Type ;rogue wedge <number> to create specified number of wedges.
  19. Note: do not type GLD while script is running, it could make the script stop working.
  20.  
  21. Remember afk scripting is a no no in prime/platnium so pay attention to your game screen while running this script.
  22. Kill this script if going afk.
  23.  
  24. Author: Tgo01
  25. Version: 40
  26.  
  27. =end
  28. version = 40
  29.  
  30. wander_rooms = Array.new
  31. weapon = UserVars.rogue["task_weapon"]
  32. stow_container = UserVars.rogue["stow_container"]
  33. wedge_container = UserVars.rogue["wedge_container"]
  34. calipers_container = UserVars.rogue["calipers_container"]
  35. lockpick_container = UserVars.rogue["lockpick_container"]
  36. mainweapon = UserVars.rogue["mainweapon"]
  37. shield = UserVars.rogue["shield"]
  38. auto_promote = UserVars.rogue["auto_promote"]
  39. update_partner = UserVars.rogue["update_partner"]
  40. lock_create_number = UserVars.rogue["lock_create_number"]
  41. auto_run_after_partner_reps = UserVars.rogue["auto_run_after_partner_reps"]
  42. do_other_guild_tasks = UserVars.rogue["do_other_guild_tasks"]
  43. lmas_lockpick = UserVars.rogue["lmas_lockpick"]
  44. do_critter_sweep_tasks = UserVars.rogue["do_critter_sweep_tasks"]
  45. $stealth_get_item = UserVars.rogue["stealth_get_item"]
  46. $stealth_get_item_container = UserVars.rogue["stealth_get_item_container"]
  47. gam = UserVars.rogue["gambit"]
  48. flee_from_critters = /#{UserVars.rogue["flee_from_critters"]}/i
  49. valid_critter_targets = /#{UserVars.rogue["valid_critter_targets"]}/i
  50. flee_from_critters_count = UserVars.rogue["flee_from_critters_count"].to_i
  51. critter_task_rooms = "#{UserVars.rogue["critter_task_rooms"]}".split(",")
  52. partner_room_number = UserVars.rogue["partner_room_number"]
  53. lich_message_partner = UserVars.rogue["lich_message_partner"]
  54. numberoflockpicks = nil
  55. current_window_rooms = nil
  56. get_item_trick = nil
  57. hide_before_trick = nil
  58. CharSettings['setup_has_been_run'] = nil unless CharSettings['setup_has_been_run']
  59.  
  60. setup = proc{
  61. CharSettings['setup_has_been_run'] = true
  62. Gtk.queue {
  63. $AAA_WINDOW = Gtk::Window.new
  64. $AAA_WINDOW.title = "rogue"
  65. $AAA_WINDOW.set_border_width(10)
  66. $AAA_BOX = Gtk::VBox.new(false)
  67. $AAA_BOX.set_border_width(5)
  68.  
  69. $AAA_VERTICAL_BOX1 = Gtk::VBox.new(false, 0)
  70. $AAA_VERTICAL_BOX2 = Gtk::VBox.new(false, 0)
  71. $AAA_VERTICAL_BOX3 = Gtk::VBox.new(false, 0)
  72. $AAA_VERTICAL_BOX4 = Gtk::VBox.new(false, 0)
  73. $AAA_VERTICAL_BOX5 = Gtk::VBox.new(false, 0)
  74.  
  75. $AAA_WINDOW.add($AAA_BOX)
  76. $AAA_NOTEBOOK = Gtk::Notebook.new
  77. $AAA_NOTEBOOK.set_show_border(true)
  78. $AAA_BOX.add($AAA_NOTEBOOK)
  79. $AAA_NOTEBOOK.append_page($AAA_VERTICAL_BOX1, Gtk::Label.new('Info'))
  80. $AAA_NOTEBOOK.append_page($AAA_VERTICAL_BOX2, Gtk::Label.new('More Info'))
  81. $AAA_NOTEBOOK.append_page($AAA_VERTICAL_BOX3, Gtk::Label.new('Gambits'))
  82. $AAA_NOTEBOOK.append_page($AAA_VERTICAL_BOX4, Gtk::Label.new('Sweep'))
  83. $AAA_NOTEBOOK.append_page($AAA_VERTICAL_BOX5, Gtk::Label.new('Partner Info'))
  84. $AAA_ENTRY = Hash.new
  85. $AAA_TABLE_SIZE = Hash.new
  86. }
  87.  
  88. Gtk.queue {
  89. $AAA_TABLE1 = Gtk::Table.new(6, 3, false)
  90. $AAA_TABLE1.row_spacings=3
  91. $AAA_TABLE1.column_spacings=3
  92. $AAA_VERTICAL_BOX1.pack_start($AAA_TABLE1, false, false, 0)
  93.  
  94. $AAA_TABLE2 = Gtk::Table.new(6, 3, false)
  95. $AAA_TABLE2.row_spacings=3
  96. $AAA_TABLE2.column_spacings=3
  97. $AAA_VERTICAL_BOX2.pack_start($AAA_TABLE2, false, false, 0)
  98.  
  99. $AAA_TABLE3 = Gtk::Table.new(6, 3, false)
  100. $AAA_TABLE3.row_spacings=3
  101. $AAA_TABLE3.column_spacings=3
  102. $AAA_VERTICAL_BOX3.pack_start($AAA_TABLE3, false, false, 0)
  103.  
  104. $AAA_TABLE4 = Gtk::Table.new(6, 3, false)
  105. $AAA_TABLE4.row_spacings=3
  106. $AAA_TABLE4.column_spacings=3
  107. $AAA_VERTICAL_BOX4.pack_start($AAA_TABLE4, false, false, 0)
  108.  
  109. $AAA_TABLE5 = Gtk::Table.new(6, 3, false)
  110. $AAA_TABLE5.row_spacings=3
  111. $AAA_TABLE5.column_spacings=3
  112. $AAA_VERTICAL_BOX5.pack_start($AAA_TABLE5, false, false, 0)
  113. }
  114.  
  115. def self.add_label_entry(table, label, variable)
  116. size = $AAA_TABLE_SIZE[table] || 0
  117.  
  118. label = Gtk::Label.new(label)
  119. align = Gtk::Alignment.new 1, 0, 0, 0
  120. align.set_padding(4, 0, 3, 4)
  121. align.add(label)
  122. table.attach(align, 0, 1, size, size + 1)
  123.  
  124. entry = Gtk::Entry.new
  125. entry.text = UserVars.rogue[variable].to_s
  126. entry.set_width_request(157)
  127. table.attach(entry, 1, 2, size, size + 1)
  128.  
  129. $AAA_ENTRY[variable] = entry
  130. $AAA_TABLE_SIZE[table] += 1
  131. end
  132.  
  133. Gtk.queue {
  134. $AAA_ENTRY = Hash.new
  135. add_label_entry($AAA_TABLE1, "Task weapon:", 'task_weapon')
  136. add_label_entry($AAA_TABLE1, "Stow container:", 'stow_container')
  137. add_label_entry($AAA_TABLE1, "Wedge container:", 'wedge_container')
  138. add_label_entry($AAA_TABLE1, "Calipers container:", 'calipers_container')
  139. add_label_entry($AAA_TABLE1, "Lockpick container:", 'lockpick_container')
  140. add_label_entry($AAA_TABLE1, "Main weapon:", 'mainweapon')
  141. add_label_entry($AAA_TABLE1, "Shield/offhand:", 'shield')
  142. add_label_entry($AAA_TABLE2, "Auto promote:", 'auto_promote')
  143. add_label_entry($AAA_TABLE2, "Update partner:", 'update_partner')
  144. add_label_entry($AAA_TABLE2, "Lock create number:", 'lock_create_number')
  145. add_label_entry($AAA_TABLE2, "Auto run after partner reps:", 'auto_run_after_partner_reps')
  146. add_label_entry($AAA_TABLE2, "Do other guild tasks:", 'do_other_guild_tasks')
  147. add_label_entry($AAA_TABLE2, "Lmas lockpick:", 'lmas_lockpick')
  148. add_label_entry($AAA_TABLE2, "Do critter sweep tasks", 'do_critter_sweep_tasks')
  149. add_label_entry($AAA_TABLE3, "Stealth get item:", 'stealth_get_item')
  150. add_label_entry($AAA_TABLE3, "Stealth get item container:", 'stealth_get_item_container')
  151. add_label_entry($AAA_TABLE3, "Gambit:", 'gambit')
  152. add_label_entry($AAA_TABLE4, "Flee from critters:", 'flee_from_critters')
  153. add_label_entry($AAA_TABLE4, "Valid critter targets:", 'valid_critter_targets')
  154. add_label_entry($AAA_TABLE4, "Flee from critters count:", 'flee_from_critters_count')
  155. add_label_entry($AAA_TABLE4, "Critter rooms:", 'critter_task_rooms')
  156. add_label_entry($AAA_TABLE5, "Partner room number:", 'partner_room_number')
  157. add_label_entry($AAA_TABLE5, "Lich message partner:", 'lich_message_partner')
  158.  
  159. }
  160.  
  161. def self.add_checkbox(table, x_pos, label, variable, default = false)
  162. size = $AAA_TABLE_SIZE[table] || 0
  163. checkbox = Gtk::CheckButton.new label
  164. value = UserVars.rogue[variable].nil? ? default : UserVars.rogue[variable]
  165. checkbox.set_active(value)
  166. table.attach(checkbox, x_pos, x_pos + 1, size, size + 1)
  167. $AAA_ENTRY[variable] = checkbox
  168. $AAA_TABLE_SIZE[table] += 1 if x_pos == 1
  169. end
  170.  
  171. Gtk.queue {
  172. $AAA_WINDOW.signal_connect("delete_event") {
  173. $AAA_SETUP_COMPLETED = true
  174. }
  175. }
  176.  
  177. Gtk.queue {
  178. $AAA_TOOLTIPS = Gtk::Tooltips.new
  179. $AAA_TOOLTIPS.enable
  180.  
  181. label = Gtk::Label.new
  182. label.set_markup("Enter <b>nil</b> for any setting you don't want to use.\n<b>Task weapon:</b> Name of weapon you use for tasks.\n<b>Stow container:</b> Container name for where you stow things. Do NOT use same container you keep your lockpicks in, this might end up throwing them away.\n<b>Wedge container:</b> Name of container where your wedges are stored.\n<b>Calipers container:</b> Name of container where your calipers are stored.\n<b>Lockpick container:</b> Name of container where your lockpicks are stored.\n<b>Main weapon:</b> Name of weapon you use for hunting/DS.\n<b>Shield/offhand:</b> Name of shield/offhand weapon you use for hunting/DS.")
  183. align = Gtk::Alignment.new(1, 0, 0, 0)
  184. align.set_padding(50, 0, 0, 40)
  185. align.add(label)
  186. $AAA_TABLE1.attach(align, 1, 2, 8, 9)
  187.  
  188. label = Gtk::Label.new
  189. label.set_markup("Enter <b>nil</b> for any setting you don't want to use.\n<b>Auto promote:</b> Enter <b>on</b> to have script automatically receive promotions from NPC guildmaster.\n<b>Update partner:</b> Enter <b>on</b> to whisper your partner how many reps you have left after each successful rep.\n<b>Lock create number:</b> Difficulty level of locks to create for non master create lock reps.\n<b>Auto run after partner reps:</b> Enter <b>yes</b> to automatically turn in partner tasks as soon as they are finished.\n<b>Do other guild tasks:</b> Enter <b>yes</b> to automatically go to other guilds to finish window and water plants tasks.\n<b>Lmas lockpick:</b> Name of your best lockpick, for example <b>vaalin lockpick</b>\n<b>Do critter sweep tasks:</b> Enter <b>yes</b> if you want to do these tasks manually, <b>no</b> if you want the script to turn these tasks in and continue on, <b>auto</b> if you want the script to automatically finish these tasks.")
  190. align = Gtk::Alignment.new(1, 0, 0, 0)
  191. align.set_padding(50, 0, 0, 40)
  192. align.add(label)
  193. $AAA_TABLE2.attach(align, 1, 2, 8, 9)
  194.  
  195. label = Gtk::Label.new
  196. label.set_markup("Enter <b>nil</b> for any setting you don't want to use.\n<b>Stealth get item:</b> Name of item to use during <b>stealth get gambits.</b> NOTE This item will be dropped on the ground, don't use an item you don't want to lose.\n<b>Stealth get item container:</b> Container where your <b>stealth get item</b> is stored.\n<b>Gambit:</b> Enter what you type to do your current gambit; do not include the word 'rgambit' and don't abbreviate any words.\nIf doing the stealth get gambit then the <b>Gambit</b> setting should be: stealth get # $stealth_get_item (without the space between # and $)")
  197. align = Gtk::Alignment.new(1, 0, 0, 0)
  198. align.set_padding(50, 0, 0, 40)
  199. align.add(label)
  200. $AAA_TABLE3.attach(align, 1, 2, 8, 9)
  201.  
  202.  
  203. label = Gtk::Label.new
  204. label.set_markup("Enter <b>nil</b> for any setting you don't want to use.\n<b>These settings are only required if you're having the script automatically do sweep critter tasks.</b>\n<b>Flee from critters:</b> Name of critters to always flee from. Seperate each name with a |. Example kobold|orc|rolton\n<b>Valid critter targets:</b> Name of critters to sweep. Same as above for more than one critter.\n<b>Flee from critters count:</b> Will flee from current room if number of critters is this amount of higher.\n<b>Critter rooms:</b> List all rooms of area you want to look for critters in; example 1,2,3\nNo spaces after commas.\n")
  205. align = Gtk::Alignment.new(1, 0, 0, 0)
  206. align.set_padding(50, 0, 0, 40)
  207. align.add(label)
  208. $AAA_TABLE4.attach(align, 1, 2, 8, 9)
  209.  
  210. label = Gtk::Label.new
  211. label.set_markup("Fill these settings out if you are running with a dedicated partner who is also running the <b>rogue</b> and <b>task</b> scripts and is going to help you automate through partner tasks.\nEnter <b>nil</b> for each setting if you are not running with such a partner or if you don't want to use a particular setting.\n<b>Partner room number:</b> Room number where you and your partner will meet to do partner tasks.\n<b>Lich message partner:</b> Enter <b>yes</b> to send a lnet message to your partner when you need them for a partner task.\nThe lnet message is just to inform your partner when you need their help in the room you specified for partner tasks, it does not make your partner move or run any scripts even if they are currently running <b>rogue</b> and <b>task</b>.")
  212. align = Gtk::Alignment.new(1, 0, 0, 0)
  213. align.set_padding(50, 0, 0, 40)
  214. align.add(label)
  215. $AAA_TABLE5.attach(align, 1, 2, 8, 9)
  216.  
  217. $AAA_WINDOW.show_all
  218. }
  219.  
  220. $AAA_SETUP_COMPLETED = false
  221. until($AAA_SETUP_COMPLETED)
  222. sleep 1
  223. end
  224.  
  225. UserVars.rogue ||= Hash.new
  226. $AAA_ENTRY.keys.each { |key|
  227. if( $AAA_ENTRY[key].class.to_s =~ /CheckButton/ )
  228. value = $AAA_ENTRY[key].active?
  229. UserVars.rogue[key] = $AAA_ENTRY[key].active?
  230. else
  231. if(key == 'wounded_eval')
  232. UserVars.rogue[key] = $AAA_ENTRY[key].text
  233. else
  234. UserVars.rogue[key] = $AAA_ENTRY[key].text.strip.downcase
  235. end
  236. end
  237. }
  238. UserVars.save()
  239.  
  240. Gtk.queue {
  241. $AAA_WINDOW.destroy
  242. }
  243. }
  244. my_partner = script.vars[2] if script.vars[2] != nil
  245. flower = nil
  246. icedirt_rooms = [ '17972', '17966', '17965', '17976' ]
  247. landingdirt_rooms = [ '16517', '16490', '16438', '16492', '16534', '16540' ]
  248. soldirt_rooms = [ '17949', '17948', '17947', '17946', '17942', '17944', '17945' ]
  249. illistim_dirt_rooms = [ '17840', '17876', '17877', '17879', '17878' ]
  250. icewindow_rooms = [ '17975', '17966', '17965', '17976', '17964' ]
  251. landingwindow_rooms = [ '16557', '16555', '16491', '16490', '16517' ]
  252. solwindow_rooms = [ '17950', '17948', '17946', '17944', '17963' ]
  253. illistimwindow_rooms = [ '17871', '17872', '17853', '17860', '17869' ]
  254. iceplant_rooms = [ '17974', '17965', '17967', '17976', '17964' ]
  255. landingplant_rooms = [ '16545', '16504', '16438', '16534', '16517' ]
  256. solplant_rooms = [ '17953', '17950', '17946', '17942', '17944' ]
  257. illistimplant_rooms = [ '17871', '17851', '17855', '17869', '17870' ]
  258. audience_rooms = [ '2300', '228', '188' ]
  259. training_administrator_room = [ '17967', '16504', '17948', '17798', '17883' ]
  260. toolbenches_room_number = [ '17978', '16574', '17960', '17881' ]
  261. guild_master_room_number = [ '17975', '16485', '17956', '17886' ]
  262. training_master_room_number = [ '17965', '16540', '17951', '17419', '17864' ]
  263. sweeping_dummies_room_number = [ '17976', '16509', '17950', '17862' ]
  264. kitchen_room_number = [ '17969', '16433', '17940', '17889' ]
  265. mannequin_room_number = [ '17965', '16509', '17949', '17861' ]
  266. tool_rack_room_number = [ '17969', '16581', '17941', '17861' ]
  267. training_administrator_names = /teagais|deluca|milgrew|runaire|boucher/i
  268. guild_master_names = /kuidich|dante|lindil|lydon/i
  269. master_names = /duchel|palder|meallan|miller|bean|reilly|varant|triaholly|sneck|jimik|herit|lagick|zardak|faldes|gludac|vigil|ritchie|colvin|purkhiser/i
  270. flower_names = /wildflower|iceflower|dandelion|begonia|iris|rose|wisteria/i
  271. (stand_up = nil;stamina_check = nil;my_room = nil;other_players = nil;other_players_disks = nil;wander = nil;auto_critter_sweep_tasks = nil;critter_target = nil;get_critter_target = nil;dangerous_critter_found = 0;npcs_alive = nil;critter_count = 0;get_critter_target = nil;dangerous_critter_found = 0;getpick = nil;checkin = nil;person = nil;help_sweep_partner_start = nil;help = nil;help_cheap_partner_start = nil;go_to_task = nil;stow = nil;gam_teach_help_start = nil;gam_learn_help_start = nil;gam_teach_help_start1 = nil;gam_learn_help_start2 = nil;gam_learn_help_start3 = nil;sweepstart = nil;sweep_partner = nil;sweep_defend = nil;sweep_master = nil;sweep_dummies = nil;sweep_dirt = nil;sweep_critters = nil;promotion = nil;partner_room = nil;sweep_partner_start = nil;auto_run = nil;sweep_defend_start = nil;reps = nil;sweep_master_begin = nil;sweep_master_start = nil;promotion = nil;number = nil;sweep_dummy_start = nil;sweep_dirt_move = nil;sweep_dirt_sweep = nil;sweep_dirt_get = nil;sweep_dirt_full = nil;garlic_start = nil;mannequins_start = nil;windows_get_rag = nil;sub_critters = nil;get_garlic = nil;mannequins_subdue = nil;windows_move = nil;windows_clean = nil;go_to_room = nil;lmas_tough_boxes = nil;lmas_trick = nil;keys = nil;lmas_footpad_talk = nil;lmas_footpad_challenge = nil;customize = nil;lmas_footpad_lock_start = nil;lmas_lockpick_start = nil;customize_footpad_pre = nil;customize_create = nil;customize_footpad_create = nil;customize_footpad_finished = nil;customize_footpad_hand_in1 = nil;lmas_footpad_lock_start = nil;lmas_footpad_challenge_begin = nil;lmas_footpad_challenge_begin1 = nil;lmas_footpad_challenge_wait = nil;lmas_footpad_challenge_trap = nil;lmas_footpad_challenge_pick = nil;lmas_footpad_challenge1 = nil;cal = nil;cal_start = nil;carve_go = nil;buy_block = nil;carve_start = nil;carve = nil;carve_rub = nil;lock_pick_create = nil;lockpick_handin = nil;lockpick_handin1 = nil;gam_learn_start = nil;gam_audience_start = nil;gam_speed_start = nil;gam_teach_start = nil;gam_learn_start1 = nil;gam_learn_start2 = nil;gam_audience_start1 = nil;gam_speed_begin = nil;gam_teach_start1 = nil;repair = nil;keys_1 = nil;footstomp_defend = nil;footstomp_partner = nil;cheap_critter = nil;cheap_plants = nil;foot_stomp_defend1 = nil;footstomp_partner_start = nil;cheap_plants_move = nil;cheap_plants_water = nil;cheapstart = nil;substart = nil;lmasstart = nil;gamstart = nil;master = nil;stunstart = nil)
  272. target_room = nil
  273. dirt_rooms = nil
  274. talk_to_footpad_masters = nil
  275. current_plant_rooms = nil
  276.  
  277. box = ["filler",
  278. "first box",
  279. "second box",
  280. "third box",
  281. "fourth box",
  282. "fifth box"
  283. ]
  284.  
  285. Pick = ["red lockpick", "steel lockpick", "gold lockpick", "silver lockpick", "ora lockpick", "mithril lockpick", "scrimshaw lockpick", "laje lockpick", "vultite lockpick", "rolaren lockpick", "veniom lockpick", "invar lockpick", "alum lockpick", "golvern lockpick", "kelyn lockpick", "vaalin lockpick", "cast"]
  286. $lockpick_number = 0
  287.  
  288. getpick = proc{
  289. exit if $lockpick_number >= 16
  290. multifput "get my #{Pick[$lockpick_number]} from my keyring", "lmas app my lock"
  291. while line = get
  292. if line =~ /It appears to be broken/
  293. wire = 2 if $lockpick_number == 0
  294. wire = 4 if $lockpick_number == 1
  295. wire = 5 if $lockpick_number == 2
  296. wire = 6 if $lockpick_number == 3
  297. wire = 7 if $lockpick_number == 4
  298. wire = 8 if $lockpick_number == 5
  299. wire = 9 if $lockpick_number == 7
  300. wire = 11 if $lockpick_number == 8
  301. wire = 12 if $lockpick_number == 9
  302. wire = 13 if $lockpick_number == 10
  303. wire = 15 if $lockpick_number == 11
  304. wire = 10 if $lockpick_number == 12
  305. wire = 16 if $lockpick_number == 13
  306. wire = 14 if $lockpick_number == 14
  307. wire = 17 if $lockpick_number == 15
  308. multifput "order #{wire}", "buy", "lmas repair my lock"
  309. waitrt?
  310. fput "lmas repair my lock"
  311. waitrt?
  312. fput "put my lockpick in my keyring"
  313. $lockpick_number = $lockpick_number + 1
  314. getpick.call
  315. elsif line =~ /You could probably handle/
  316. fput "lmas repair my lock"
  317. waitrt?
  318. fput "put my lockpick in my keyring"
  319. $lockpick_number = $lockpick_number + 1
  320. getpick.call
  321. end
  322. end
  323. }
  324.  
  325. stand_up = proc{
  326. (waitrt?;fput "stand";sleep 0.1) until standing?
  327. }
  328.  
  329. stamina_check = proc{
  330. if checkstamina < 12
  331. echo "Waiting for stamina."
  332. wait_until{ checkstamina >= 12 }
  333. end
  334. }
  335.  
  336. auto_run = proc{
  337. if auto_run_after_partner_reps == "yes"
  338. turnin.call
  339. else
  340. exit
  341. end
  342. }
  343.  
  344. turnin = proc{
  345. stand_up.call if !standing?
  346. waitrt?
  347. move 'out' if checkpaths 'out'
  348. target_room = Room.current.find_nearest(training_administrator_room)
  349. start_script 'go2', [ target_room.to_s ]
  350. wait_while{ running?('go2') }
  351. GameObj.npcs.find { |npc| person = npc if npc.name =~ training_administrator_names }
  352. multifput "ask #{person} about train #{script.vars[1]}", "ask #{person} about train #{script.vars[1]}"
  353. go_to_task.call
  354. }
  355.  
  356. promotion = proc{
  357. if auto_promote == "on"
  358. move 'out' if checkpaths 'out'
  359. target_room = Room.current.find_nearest(guild_master_room_number)
  360. start_script 'go2', [ target_room.to_s ]
  361. wait_while{ running?('go2') }
  362. GameObj.npcs.find { |npc| person = npc if npc.name =~ guild_master_names }
  363. fput "ask #{person} about next #{script.vars[1]}"
  364. target_room = Room.current.find_nearest(training_administrator_room)
  365. start_script 'go2', [ target_room.to_s ]
  366. wait_while{ running?('go2') }
  367. GameObj.npcs.find { |npc| person = npc if npc.name =~ training_administrator_names }
  368. fput "ask #{person} about train #{script.vars[1]}"
  369. go_to_task.call
  370. else
  371. exit
  372. end
  373. }
  374.  
  375. wander = proc{
  376. sleep 0.1
  377. room = Room.current
  378. acceptable_adjacent_rooms = room.wayto.keys & critter_task_rooms
  379. not_visited_rooms = acceptable_adjacent_rooms.find_all { |r| not wander_rooms.include?(r) }
  380. if not_visited_rooms.empty?
  381. next_room = wander_rooms.find { |r| acceptable_adjacent_rooms.include?(r) }
  382. else
  383. next_room = not_visited_rooms[rand(not_visited_rooms.length)]
  384. end
  385. if next_room
  386. wander_rooms.delete(next_room)
  387. wander_rooms.push(next_room)
  388. way = room.wayto[next_room]
  389. if way.class == String
  390. move(way)
  391. my_room = nil
  392. critter_target = nil
  393. other_players = nil
  394. other_players_disks = nil
  395. other_players = checkpcs.each { |pc| i += 1; break if pc == Char.name }
  396. (wander.call) if other_players != nil
  397. other_players_disks = GameObj.loot.find { |obj| (obj.noun == 'disk') and (obj.name !~ /#{checkname}/) }
  398. (wander.call) if other_players_disks != nil
  399. my_room = Room.current.id
  400. else
  401. way.call
  402. my_room = nil
  403. critter_target = nil
  404. other_players = nil
  405. other_players_disks = nil
  406. other_players = checkpcs.each { |pc| i += 1; break if pc == Char.name }
  407. (wander.call) if other_players != nil
  408. other_players_disks = GameObj.loot.find { |obj| (obj.noun == 'disk') and (obj.name !~ /#{checkname}/) }
  409. (wander.call) if other_players_disks != nil
  410. my_room = Room.current.id
  411. end
  412. else
  413. start_script 'go2', [ Room.current.find_nearest(critter_task_rooms.collect { |id| id.to_i }).to_s ]
  414. wait_while { running?('go2') }
  415. my_room = nil
  416. critter_target = nil
  417. other_players = nil
  418. other_players_disks = nil
  419. other_players = checkpcs.each { |pc| i += 1; break if pc == Char.name }
  420. (wander.call) if other_players != nil
  421. other_players_disks = GameObj.loot.find { |obj| (obj.noun == 'disk') and (obj.name !~ /#{checkname}/) }
  422. (wander.call) if other_players_disks != nil
  423. my_room = Room.current.id
  424. end
  425. }
  426.  
  427. partner_room = proc{
  428. if partner_room_number != "nil"
  429. LNet.send_message(h={'to'=>"#{my_partner}", 'type'=>'private'}, "I need your help with a guild task.") if lich_message_partner == "yes"
  430. if Room.current.id != Integer(partner_room_number)
  431. move 'out' if checkpaths 'out'
  432. start_script "go2", [partner_room_number]
  433. wait_while{ running?('go2') }
  434. end
  435. end
  436. }
  437.  
  438. get_critter_target = proc{
  439. critter_target = GameObj.npcs.find { |npc| npc.name =~ valid_critter_targets and npc.status !~ /dead|gone|prone|sit|kneel/ }
  440. if critter_target == nil
  441. wander.call
  442. end
  443. }
  444.  
  445. auto_critter_sweep_tasks = proc{
  446. loop{
  447. if critter_target.status =~ /dead|gone|prone|sit|kneel/
  448. critter_target = nil
  449. end
  450. if !standing?
  451. until standing?
  452. waitrt?
  453. fput "stand"
  454. sleep 0.5
  455. end
  456. end
  457. if checkstance != "defensive"
  458. waitrt?
  459. fput "stance def"
  460. end
  461. if checkstamina < 12
  462. echo "Waiting for stamina."
  463. wait_until{ checkstamina >= 12 }
  464. end
  465. if my_room != Room.current.id
  466. critter_target = nil
  467. my_room = nil
  468. wander.call
  469. redo
  470. end
  471. if critter_target == nil and my_room == Room.current.id
  472. critter_target = nil
  473. get_critter_target.call
  474. redo
  475. end
  476. npcs_alive = nil
  477. npcs_alive = GameObj.npcs.find_all { |i| i.status != 'dead' }
  478. npcs_alive.each { critter_count = critter_count + 1 }
  479. if critter_count > flee_from_critters_count
  480. (critter_count = 0;dangerous_critter_found = 0;npcs_alive = nil;wander.call;redo)
  481. end
  482. GameObj.npcs.each { |i| dangerous_critter_found = 1 if i.name =~ flee_from_critters and i.status != 'dead' }
  483. if dangerous_critter_found == 1
  484. (dangerous_critter_found = 0;critter_count = 0;wander.call;redo)
  485. end
  486. if critter_target != nil and critter_target.status !~ /dead|gone|prone|sit|kneel/ and my_room == Room.current.id
  487. fput "stance off"
  488. result = dothistimeout "sweep #{critter_target}", 3, /You have completed/i
  489. if result =~ /You have completed/i
  490. (turnin.call)
  491. elsif result.nil?
  492. redo
  493. end
  494. end
  495. sleep 0.1
  496. }
  497. }
  498.  
  499. stow = proc{
  500. fput "stow left" if checkleft != nil
  501. fput "stow right" if checkright != nil
  502. }
  503.  
  504. go_to_task = proc{
  505. if script.vars[1] == "sweep"
  506. sweepstart.call
  507. elsif script.vars[1] == "gam"
  508. gamstart.call
  509. elsif script.vars[1] == "cheap"
  510. cheapstart.call
  511. elsif script.vars[1] == "lmas"
  512. lmasstart.call
  513. elsif script.vars[1] == "sub"
  514. substart.call
  515. elsif script.vars[1] == "stun"
  516. stunstart.call
  517. end
  518. }
  519.  
  520. checkin = proc{
  521. move 'out' if checkpaths 'out'
  522. target_room = Room.current.find_nearest(guild_master_room_number)
  523. start_script 'go2', [ target_room.to_s ]
  524. wait_while{ running?('go2') }
  525. GameObj.npcs.find { |npc| person = npc if npc.name =~ guild_master_names }
  526. fput "ask #{person} about checkin"
  527. exit
  528. }
  529.  
  530. help_sweep_partner_start = proc{
  531. stand_up.call if !standing?
  532. stamina_check.call if checkstamina < 12
  533. waitrt?
  534. result = dothistimeout "sweep #{script.vars[3]}", 3, /is already prone|(You might want to stand up first.|Roundtime)/i
  535. if result =~ /is already prone/i
  536. fput "pull #{script.vars[3]}"
  537. help_sweep_partner_start.call
  538. elsif result =~ /(You might want to stand up first.|Roundtime)/i
  539. help_sweep_partner_start.call
  540. elsif result.nil?
  541. help_sweep_partner_start.call
  542. end
  543. }
  544.  
  545. help_cheap_partner_start = proc{
  546. stand_up.call if !standing?
  547. stamina_check.call if checkstamina < 12
  548. waitrt?
  549. result = dothistimeout "cheap foot #{script.vars[3]}", 2, /just fell for a footstomp not long ago/i
  550. if result =~ /just fell for a footstomp not long ago/
  551. sleep 2
  552. help_cheap_partner_start.call
  553. elsif result.nil?
  554. sleep 13
  555. help_cheap_partner_start.call
  556. end
  557. }
  558.  
  559. gam_teach_help_start = proc{
  560. stow.call
  561. waitfor "I am ready to learn"
  562. partner = GameObj.pcs.find { |pc| pc.name =~ /#{script.vars[3]}(.*)/i }
  563. gam_teach_help_start1.call
  564. }
  565.  
  566. gam_teach_help_start1 = proc{
  567. if $task =~ /stealth/i
  568. if $task =~ /stand/i
  569. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{partner}/i and partner.status =~ /kneel/ } }
  570. else
  571. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{partner}/i and partner.status.nil? } }
  572. end
  573. end
  574. waitrt?
  575. result = dothistimeout "#$task", 5, /You need to have free hands to teach this gambit|You already have that|You should have a silver coin on you to teach this gambit|Wait a few seconds and try again|You need to be holding something first|Who are you trying to teach/i
  576. if result =~ /You need to have free hands to teach this gambit/i
  577. stow.call
  578. gam_teach_help_start1.call
  579. elsif result =~ /You already have that/i
  580. fput "stow #{weapon}"
  581. gam_teach_help_start1.call
  582. elsif result =~ /You should have a silver coin on you to teach this gambit/i
  583. fput "whisper #{script.vars[3]} Need a coin, be right back."
  584. currentroom = Room.current.id
  585. start_script 'go2', [ 'bank', '--disable-confirm' ]
  586. wait_while{ running?('go2') }
  587. fput "withdraw 2 silvers"
  588. start_script "go2", [ "#{currentroom}" ]
  589. wait_while{ running?('go2') }
  590. gam_teach_help_start1.call
  591. elsif result =~ /Wait a few seconds and try again/i
  592. sleep 2
  593. gam_teach_help_start1.call
  594. elsif result =~ /You need to be holding something first/
  595. fput "get my #{weapon}"
  596. gam_teach_help_start1.call
  597. elsif result =~ /Who are you trying to teach/
  598. sleep 2
  599. gam_teach_help_start1.call
  600. elsif result.nil?
  601. gam_teach_help_start1.call
  602. end
  603. }
  604.  
  605. gam_learn_help_start = proc{
  606. stow.call
  607. fput "#$task"
  608. if $task =~ /stealth/i
  609. hide_before_trick = "yes"
  610. end
  611. if $task =~ /get/i
  612. get_item_trick = "yes"
  613. end
  614. if get_item_trick == "yes"
  615. multifput "get my #$stealth_get_item from my #$stealth_get_item_container", "drop my #$stealth_get_item"
  616. end
  617. until !hiding?
  618. waitrt?
  619. fput "unhide"
  620. end
  621. if $task =~ /stealth/i
  622. if $task =~ /stand/i
  623. until kneeling?
  624. waitrt?
  625. fput "kneel"
  626. sleep 0.1
  627. end
  628. else
  629. until standing?
  630. waitrt?
  631. fput "stand"
  632. sleep 0.1
  633. end
  634. end
  635. end
  636. waitrt?
  637. fput "whisper #{script.vars[3]} I am ready to learn"
  638. gam_learn_help_start2.call
  639. }
  640.  
  641. gam_learn_help_start2 = proc{
  642. waitrt?
  643. until !hiding?
  644. waitrt?
  645. fput "unhide"
  646. sleep 0.1
  647. end
  648. if $task =~ /stealth/i
  649. if $task =~ /stand/i
  650. until kneeling?
  651. waitrt?
  652. fput "kneel"
  653. sleep 0.1
  654. end
  655. else
  656. until standing?
  657. waitrt?
  658. fput "stand"
  659. sleep 0.1
  660. end
  661. end
  662. end
  663. waitrt?
  664. if get_item_trick == "yes"
  665. waitfor "shows you how to take an item from the ground without giving yourself away"
  666. elsif hide_before_trick == "yes"
  667. waitfor "gives you some pointers"
  668. end
  669. gam_learn_help_start3.call
  670. }
  671.  
  672. gam_learn_help_start3 = proc{
  673. waitrt?
  674. until !hiding?
  675. waitrt?
  676. fput "unhide"
  677. sleep 0.1
  678. end
  679. if $task =~ /stealth/i
  680. if $task =~ /stand/i
  681. until kneeling?
  682. waitrt?
  683. fput "kneel"
  684. sleep 0.1
  685. end
  686. else
  687. until standing?
  688. waitrt?
  689. fput "stand"
  690. sleep 0.1
  691. end
  692. end
  693. end
  694. waitrt?
  695. if get_item_trick == "yes"
  696. fput "drop my #$stealth_get_item"
  697. end
  698. if hide_before_trick == "yes"
  699. until hiding?
  700. waitrt?
  701. fput "hide"
  702. sleep 0.1
  703. end
  704. end
  705. waitrt?
  706. result = dothistimeout "#$task", 5, /You need to be holding something first|You already have that|Just how stealthy are you trying to be|but realize that doing so would reveal your location|suddenly become aware that your actions have revealed your location|Roundtime|You manage to move to|keeping your location hidden|but have revealed yourself from hiding in doing so|but realize that doing so would compromise your hidden position/i
  707. if result =~ /You need to be holding something first/i
  708. fput "get my #{weapon}"
  709. gam_learn_help_start2.call
  710. elsif result =~ /You already have that/i
  711. fput "stow #{weapon}"
  712. gam_learn_help_start2.call
  713. elsif result =~ /Roundtime|You manage to move to|keeping your location hidden/i
  714. gam_learn_help_start2.call
  715. elsif result =~ /Just how stealthy are you trying to be/i
  716. gam_learn_help_start3.call
  717. elsif result =~ /suddenly become aware that your actions have revealed your location|but realize that doing so would reveal your location/i
  718. gam_learn_help_start2.call
  719. elsif result =~ /but have revealed yourself from hiding in doing so/i
  720. if get_item_trick == "yes"
  721. fput "drop my #$stealth_get_item"
  722. gam_learn_help_start3.call
  723. end
  724. elsif result =~ /but realize that doing so would compromise your hidden position/i
  725. gam_learn_help_start3.call
  726. elsif result.nil?
  727. gam_learn_help_start3.call
  728. end
  729. }
  730.  
  731. sweepstart = proc{
  732. stow.call
  733. fput "gld"
  734. waitfor "Sweep skill"
  735. while line = get
  736. (sweep_partner.call;break) if line =~ /The Training Administrator told you to practice sweeping a partner./i
  737. (sweep_defend.call;break) if line =~ /The Training Administrator told you to defend against a partner./i
  738. (sweep_master.call;break) if line =~ /The Training Administrator told you to get some lessons from the footpads./i
  739. (sweep_dummies.call;break) if line =~ /The Training Administrator told you to work out on the sweep dummies./i
  740. (sweep_dirt.call;break) if line =~ /The Training Administrator told you to sweep the guild courtyard./i
  741. (sweep_critters.call;break) if line =~ /The Training Administrator told you to practice sweeping creatures./i
  742. (promotion.call;break) if line =~ /(Congratulations, you've earned a rank|You need to get promoted to your next rank in Sweep|You have earned enough training points for your next rank.)/i
  743. (turnin.call;break) if line =~ /You are not currently training in this skill/i
  744. end
  745. }
  746.  
  747. stunstart = proc{
  748. stow.call
  749. fput "gld"
  750. waitfor "Stun Maneuvers skill"
  751. while line = get
  752. if line =~ /The Training Administrator told you to sweep the guild courtyard\./
  753. sweep_dirt.call
  754. break
  755. elsif line =~ /The Training Administrator told you to clean the windows in the guild\.|The Training Administrator told you to clean the guild windows\./
  756. windows_get_rag.call
  757. break
  758. end
  759. end
  760. }
  761.  
  762. sweep_partner = proc{
  763. fput "gld"
  764. waitfor "The Training Administrator told you to practice sweeping a partner"
  765. while line = get
  766. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  767. if line =~ /remaining to complete this task|remaining for this task/i
  768. multifput "gld stance off", "stance off"
  769. partner_room.call
  770. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  771. fput "whisper #{my_partner} I need to sweep you."
  772. waitfor "Ready to be swept"
  773. sweep_partner_start.call
  774. break
  775. end
  776. end
  777. }
  778.  
  779. sweep_partner_start = proc{
  780. stand_up.call if !standing?
  781. stamina_check.call if checkstamina < 12
  782. waitrt?
  783. result = dothistimeout "sweep #{my_partner}", 3, /You have completed your training task.|is already prone|You might want to stand up first.|Sweep what\?|repetition|Roundtime/i
  784. if result =~ /You have completed your training task./i
  785. waitrt?
  786. fput "pull #{my_partner}"
  787. fput "whisper #{my_partner} All done!"
  788. auto_run.call
  789. elsif result =~ /is already prone/i
  790. waitrt?
  791. fput "pull #{my_partner}"
  792. sweep_partner_start.call
  793. elsif result =~ /You might want to stand up first./i
  794. stand_up.call
  795. sweep_partner_start.call
  796. elsif result =~ /repetition|Roundtime/i
  797. sweep_partner_start.call
  798. elsif result =~ /Sweep what\?/i
  799. exit
  800. elsif result.nil?
  801. sweep_partner_start.call
  802. end
  803. }
  804.  
  805. sweep_defend = proc{
  806. fput "gld"
  807. waitfor "The Training Administrator told you to defend against a partner"
  808. while line = get
  809. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  810. if line =~ /remaining to complete this task|remaining for this task/i
  811. stand_up.call if !standing?
  812. waitrt?
  813. multifput "gld stance def", "stance off"
  814. partner_room.call
  815. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  816. fput "whisper #{my_partner} I need to be swept."
  817. sweep_defend_start.call
  818. break
  819. end
  820. end
  821. }
  822.  
  823. sweep_defend_start = proc{
  824. while line = get
  825. if line =~ /You have (.*) repetition/i
  826. reps = $1
  827. fput "whisper #{my_partner} #{reps} more." if update_partner == "on"
  828. elsif line =~ /You have completed your training task/i
  829. fput "whisper #{my_partner} All done. Thank you!"
  830. auto_run.call
  831. end
  832. end
  833. }
  834.  
  835. sweep_master = proc{
  836. fput "gld"
  837. waitfor "The Training Administrator told you to get some lessons from the footpads"
  838. while line = get
  839. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  840. if line =~ /remaining to complete this task|remaining for this task/i
  841. waitrt?
  842. multifput "gld stance off", "stance off"
  843. move 'out' if checkpaths 'out'
  844. target_room = Room.current.find_nearest(training_master_room_number)
  845. start_script 'go2', [ target_room.to_s ]
  846. wait_while{ running?('go2') }
  847. GameObj.npcs.find { |npc| master = npc if npc.name =~ master_names }
  848. sweep_master_begin.call
  849. break
  850. end
  851. end
  852. }
  853.  
  854. sweep_master_begin = proc{
  855. fput "ask #{master} about training sweep"
  856. waitfor "pulls you aside for some instruction."
  857. waitfor "says"
  858. sweep_master_start.call
  859. }
  860.  
  861. sweep_master_start = proc{
  862. stand_up.call if !standing?
  863. stamina_check.call if checkstamina < 12
  864. waitrt?
  865. result = dothistimeout "sweep #{master}", 3, /You have completed your training task|is already prone|You might want to stand up first.|Roundtime/i
  866. if result =~ /You have completed your training task/i
  867. turnin.call
  868. elsif result =~ /is already prone/i
  869. waitrt?
  870. fput "hide" if !hidden?
  871. waitfor "stands back up"
  872. sweep_master_start.call
  873. elsif result =~ /You might want to stand up first./i
  874. stand_up.call
  875. sweep_master_start.call
  876. elsif result =~ /Roundtime/i
  877. waitrt?
  878. fput "hide" if !hidden?
  879. sweep_master_start.call
  880. elsif result.nil?
  881. sweep_master_start.call
  882. end
  883. }
  884.  
  885. sweep_dummies = proc{
  886. fput "gld"
  887. waitfor "The Training Administrator told you to work out on the sweep dummies"
  888. while line = get
  889. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  890. if line =~ /remaining to complete this task|remaining for this task/i
  891. waitrt?
  892. move 'out' if checkpaths 'out'
  893. target_room = Room.current.find_nearest(sweeping_dummies_room_number)
  894. start_script 'go2', [ target_room.to_s ]
  895. wait_while{ running?('go2') }
  896. fput "go dummies"
  897. sweep_dummy_start.call
  898. break
  899. end
  900. end
  901. }
  902.  
  903. sweep_dummy_start = proc{
  904. stand_up.call if !standing?
  905. stamina_check.call if checkstamina < 12
  906. waitrt?
  907. result = dothistimeout "sweep dummy", 3, /You have completed your training task.|The dummy is swinging back and forth.|The dummy has fallen off its post, you'll need to FIX it.|repetition|fail to flip/i
  908. if result =~ /You have completed your training task./i
  909. turnin.call
  910. elsif result =~ /The dummy is swinging back and forth./i
  911. waitrt?
  912. fput "touch dummy"
  913. sweep_dummy_start.call
  914. elsif result =~ /The dummy has fallen off its post, you'll need to FIX it./i
  915. waitrt?
  916. fput "fix dummy"
  917. sweep_dummy_start.call
  918. elsif result =~ /repetition|fail to flip/i
  919. sweep_dummy_start.call
  920. elsif result.nil?
  921. sweep_dummy_start.call
  922. end
  923. }
  924.  
  925. sweep_dirt = proc{
  926. fput "gld"
  927. waitfor "The Training Administrator told you to sweep the guild courtyard"
  928. while line = get
  929. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  930. if line =~ /remaining to complete this task|remaining for this task/i
  931. number = 0
  932. target_room = Room.current.find_nearest(tool_rack_room_number)
  933. start_script 'go2', [ target_room.to_s ]
  934. wait_while{ running?('go2') }
  935. if Room.current.id == 17969
  936. dirt_rooms = icedirt_rooms
  937. elsif Room.current.id == 16581
  938. dirt_rooms = landingdirt_rooms
  939. elsif Room.current.id == 17941
  940. dirt_rooms = soldirt_rooms
  941. elsif Room.current.id == 17861
  942. dirt_rooms = illistim_dirt_rooms
  943. else
  944. echo "Error! Stuck in sweep_dirt, try running script again and please inform author of this error."
  945. end
  946. fput "put my broom on rack" if checkright =~ /broom/i || checkleft =~ /broom/i
  947. fput "put my bag on rack" if checkright =~ /bag/i || checkleft =~ /bag/i
  948. stow.call
  949. multifput "get broom from rack", "get bag from rack"
  950. sweep_dirt_move.call
  951. break
  952. end
  953. end
  954. }
  955.  
  956. sweep_dirt_move = proc{
  957. if number > dirt_rooms.length - 1
  958. sweep_dirt_full.call
  959. else
  960. start_script "go2", [dirt_rooms.at(number)]
  961. wait_while{ running?('go2') }
  962. number += 1
  963. sweep_dirt_sweep.call
  964. end
  965. }
  966.  
  967. sweep_dirt_sweep = proc{
  968. waitrt?
  969. result = dothistimeout "push broom", 3, /There is no dirt here to sweep|Get what|Round time/i
  970. if result =~ /There is no dirt here to sweep/i
  971. sweep_dirt_get.call
  972. elsif result =~ /Get what/i
  973. sweep_dirt_move.call
  974. elsif result =~ /Round time/i
  975. sweep_dirt_sweep.call
  976. elsif result.nil?
  977. sweep_dirt_sweep.call
  978. end
  979. }
  980.  
  981. sweep_dirt_get = proc{
  982. waitrt?
  983. result = dothistimeout "get pile", 3, /Your bag is full\, time to go empty it out|You don't see a dirt pile that you have created here|You gather a dirt pile into your burlap bag.|Get what/i
  984. if result =~ /Your bag is full\, time to go empty it out|You don't see a dirt pile that you have created here/i
  985. sweep_dirt_full.call
  986. elsif result =~ /You gather a dirt pile into your burlap bag.|Get what/i
  987. sweep_dirt_move.call
  988. elsif result.nil?
  989. sweep_dirt_get.call
  990. end
  991. }
  992.  
  993. sweep_dirt_full = proc{
  994. number = 0
  995. target_room = Room.current.find_nearest(tool_rack_room_number)
  996. start_script 'go2', [ target_room.to_s ]
  997. wait_while{ running?('go2') }
  998. waitrt?
  999. result = dothistimeout "put my bag in bin", 3, /You have completed|Your burlap bag isn't full yet.|repetition/i
  1000. if result =~ /You have completed/i
  1001. target_room = Room.current.find_nearest(tool_rack_room_number)
  1002. start_script 'go2', [ target_room.to_s ]
  1003. wait_while{ running?('go2') }
  1004. multifput "put my broom on rack", "put my bag on rack"
  1005. turnin.call
  1006. elsif result =~ /Your burlap bag isn't full yet.|repetition/i
  1007. sweep_dirt_move.call
  1008. elsif result.nil?
  1009. sweep_dirt_full.call
  1010. end
  1011. }
  1012.  
  1013. sweep_critters = proc{
  1014. fput "gld"
  1015. waitfor "The Training Administrator told you to practice sweeping creatures"
  1016. while line = get
  1017. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1018. if line =~ /remaining to complete this task|remaining for this task/i
  1019. if do_critter_sweep_tasks == "yes"
  1020. fput "gld stance off"
  1021. echo "Go sweep some critters! Restart script when you have finished this task."
  1022. exit
  1023. elsif do_critter_sweep_tasks == "no"
  1024. target_room = Room.current.find_nearest(training_administrator_room)
  1025. start_script 'go2', [ target_room.to_s ]
  1026. wait_while{ running?('go2') }
  1027. GameObj.npcs.find { |npc| person = npc if npc.name =~ training_administrator_names }
  1028. multifput "ask #{person} about trade sweep", "ask #{person} about train sweep"
  1029. go_to_task.call
  1030. elsif do_critter_sweep_tasks == "auto"
  1031. stow.call
  1032. multifput "gld stance o", "get my #{mainweapon}", "get my #{shield}"
  1033. fput "remove my #{shield}" if checkleft == nil
  1034. my_room = Room.current.id
  1035. auto_critter_sweep_tasks.call
  1036. end
  1037. break
  1038. end
  1039. end
  1040. }
  1041.  
  1042. substart = proc{
  1043. fput "gld"
  1044. waitfor "Subdue skill"
  1045. while line = get
  1046. (garlic_start.call;break) if line =~ /The Training Administrator told you to crush up some/i
  1047. (mannequins_start.call;break) if line =~ /The Training Administrator told you to ding up a few melons at the subdue mannequins./i
  1048. (windows_get_rag.call;break) if line =~ /The Training Administrator told you to clean the windows in the guild./i
  1049. (sub_critters.call;break) if line =~ /The Training Administrator told you to try and subdue some creatures/i
  1050. (promotion.call;break) if line =~ /Congratulations\, you\'ve earned a rank|You need to get promoted to your next rank|You have earned enough training points for your next rank./i
  1051. (turnin.call;break) if line =~ /You are not currently training in this skill/i
  1052. end
  1053. }
  1054.  
  1055. sub_critters = proc{
  1056. fput "gld stance off"
  1057. echo "Go subdue some critters! Restart script when you have finished this task."
  1058. exit
  1059. }
  1060.  
  1061. garlic_start = proc{
  1062. fput "gld"
  1063. waitfor "The Training Administrator told you to crush up some"
  1064. while line = get
  1065. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1066. if line =~ /remaining to complete this task|remaining for this task/i
  1067. stow.call
  1068. fput "get my #{weapon}"
  1069. target_room = Room.current.find_nearest(kitchen_room_number)
  1070. start_script 'go2', [ target_room.to_s ]
  1071. wait_while{ running?('go2') }
  1072. move 'go kitchen'
  1073. get_garlic.call
  1074. break
  1075. end
  1076. end
  1077. }
  1078.  
  1079. get_garlic = proc{
  1080. stand_up.call if !standing?
  1081. waitrt?
  1082. fput "put clove on block"
  1083. result = dothistimeout "subdue block", 3, /You have completed your training task|You\'re done with this task for now\, you should see the Training Administrator for what to do next|PUT BLOCK IN POT|Put it in the pot now|You\'ll need to have a clove of garlic on the block before trying to smash it properly|You\'re going to need to CLEAN the block before putting another clove on it|Roundtime/i
  1084. if result =~ /You have completed your training task|You\'re done with this task for now\, you should see the Training Administrator for what to do next/i
  1085. turnin.call
  1086. elsif result =~ /PUT BLOCK IN POT|Put it in the pot now/i
  1087. waitrt?
  1088. fput "put block in pot"
  1089. get_garlic.call
  1090. elsif result =~ /You\'ll need to have a clove of garlic on the block before trying to smash it properly|You\'re going to need to CLEAN the block before putting another clove on it/i
  1091. waitrt?
  1092. fput "clean block"
  1093. get_garlic.call
  1094. elsif result =~ /Roundtime/i
  1095. stand_up.call if !standing?
  1096. stamina_check.call if checkstamina < 12
  1097. waitrt?
  1098. fput "subdue block"
  1099. get_garlic.call
  1100. elsif result.nil?
  1101. get_garlic.call
  1102. end
  1103. }
  1104.  
  1105. mannequins_start = proc{
  1106. fput "gld"
  1107. waitfor "The Training Administrator told you to ding up a few melons at the subdue mannequins"
  1108. while line = get
  1109. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1110. if line =~ /remaining to complete this task|remaining for this task/i
  1111. waitrt?
  1112. stow.call
  1113. fput "get my #{weapon}"
  1114. target_room = Room.current.find_nearest(mannequin_room_number)
  1115. start_script 'go2', [ target_room.to_s ]
  1116. wait_while{ running?('go2') }
  1117. move 'go mannequin'
  1118. mannequins_subdue.call
  1119. break
  1120. end
  1121. end
  1122. }
  1123.  
  1124. mannequins_subdue = proc{
  1125. stand_up.call if !standing?
  1126. stamina_check.call if checkstamina < 12
  1127. waitrt?
  1128. result = dothistimeout "subdue mann", 3, /You have completed your training task|clean|needs a head|Round time|repetition|Roundtime/i
  1129. if result =~ /You have completed your training task/i
  1130. turnin.call
  1131. elsif result =~ /Round time|repetition|Roundtime/i
  1132. mannequins_subdue.call
  1133. elsif result =~ /clean/i
  1134. waitrt?
  1135. fput "clean mann"
  1136. mannequins_subdue.call
  1137. elsif result =~ /needs a head/i
  1138. waitrt?
  1139. multifput "clean mann", "put melon on mann"
  1140. mannequins_subdue.call
  1141. elsif result.nil?
  1142. mannequins_subdue.call
  1143. end
  1144. }
  1145.  
  1146. windows_get_rag = proc{
  1147. fput "gld"
  1148. waitfor "The Training Administrator told you to clean the windows in the guild", "The Training Administrator told you to clean the guild windows."
  1149. while line = get
  1150. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1151. if line =~ /remaining to complete this task|remaining for this task/i
  1152. number = 0
  1153. target_room = Room.current.find_nearest(tool_rack_room_number)
  1154. start_script 'go2', [ target_room.to_s ]
  1155. wait_while{ running?('go2') }
  1156. my_room = Room.current.id
  1157. if Room.current.id == 17969
  1158. current_window_rooms = icewindow_rooms
  1159. elsif Room.current.id == 16581
  1160. current_window_rooms = landingwindow_rooms
  1161. elsif Room.current.id == 17941
  1162. current_window_rooms = solwindow_rooms
  1163. elsif Room.current.id == 17861
  1164. current_window_rooms = illistimwindow_rooms
  1165. else
  1166. echo "Error! Stuck in windows_get_rag, try running script again and please inform author of this error."
  1167. end
  1168. fput "put my rag on rack" if checkright =~ /rag/i or checkleft =~ /rag/i
  1169. stow.call
  1170. fput "get rag from rack"
  1171. windows_move.call
  1172. break
  1173. end
  1174. end
  1175. }
  1176.  
  1177. windows_clean = proc{
  1178. result = dothistimeout "rub window", 3, /You have completed this task|repetition|let someone else have a crack at it/i
  1179. if result =~ /You have completed this task/i
  1180. waitrt?
  1181. target_room = Room.current.find_nearest(tool_rack_room_number)
  1182. start_script 'go2', [ target_room.to_s ]
  1183. wait_while{ running?('go2') }
  1184. multifput "put my rag on rack", "get my #{mainweapon}", "get my #{shield}"
  1185. fput "remove my #{shield}" if checkleft == nil
  1186. fput "stance def"
  1187. start_script 'go2', [my_room]
  1188. wait_while{ running?('go2') }
  1189. turnin.call
  1190. elsif result =~ /repetition|let someone else have a crack at it/i
  1191. windows_move.call
  1192. elsif result.nil?
  1193. windows_clean.call
  1194. end
  1195. }
  1196.  
  1197. windows_move = proc{
  1198. if number > current_window_rooms.length - 1
  1199. if do_other_guild_tasks == "yes"
  1200. target_room = Room.current.find_nearest(tool_rack_room_number)
  1201. start_script 'go2', [ target_room.to_s ]
  1202. wait_while{ running?('go2') }
  1203. multifput "put my rag on rack", "get my #{mainweapon}", "get my #{shield}"
  1204. fput "remove my #{shield}" if checkleft == nil
  1205. fput "stance def"
  1206. if Room.current.id == 17969
  1207. go_to_room = 16581
  1208. elsif Room.current.id == 16581
  1209. go_to_room = 17941
  1210. elsif Room.current.id == 17941
  1211. go_to_room = 17969
  1212. end
  1213. start_script "go2", [go_to_room]
  1214. wait_while{ running?('go2') }
  1215. number = 0
  1216. target_room = Room.current.find_nearest(tool_rack_room_number)
  1217. start_script 'go2', [ target_room.to_s ]
  1218. wait_while{ running?('go2') }
  1219. if Room.current.id == 17969
  1220. current_window_rooms = icewindow_rooms
  1221. elsif Room.current.id == 16581
  1222. current_window_rooms = landingwindow_rooms
  1223. elsif Room.current.id == 17941
  1224. current_window_rooms = solwindow_rooms
  1225. elsif Room.current.id == 17861
  1226. current_window_rooms = illistimwindow_rooms
  1227. else
  1228. echo "Error! Stuck in sweep_dirt, try running script again and please inform author of this error."
  1229. end
  1230. fput "put my rag on rack" if checkright =~ /rag/i or checkleft =~ /rag/i
  1231. stow.call
  1232. fput "get rag from rack"
  1233. windows_move.call
  1234. else
  1235. waitrt?
  1236. target_room = Room.current.find_nearest(tool_rack_room_number)
  1237. start_script 'go2', [ target_room.to_s ]
  1238. wait_while{ running?('go2') }
  1239. multifput "put my rag on rack", "get my #{mainweapon}", "get my #{shield}"
  1240. fput "remove my #{shield}" if checkleft == nil
  1241. fput "stance def"
  1242. start_script 'go2', [my_room]
  1243. wait_while{ running?('go2') }
  1244. respond "Couldn't finish task, try starting script again in 20 minutes."
  1245. exit
  1246. end
  1247. else
  1248. start_script "go2", [current_window_rooms.at(number)]
  1249. wait_while{ running?('go2') }
  1250. number += 1
  1251. windows_clean.call
  1252. end
  1253. }
  1254.  
  1255. lmasstart = proc{
  1256. fput "gld"
  1257. waitfor "Lock Mastery skill"
  1258. while line = get
  1259. (lmas_tough_boxes.call;break) if line =~ /pick some tough boxes from creatures/i
  1260. (lmas_trick.call;break) if line =~ /challenging boxes to practice your latest trick for an audience/i
  1261. (keys.call;break) if line =~ /cut keys for some locks you make/i
  1262. (lmas_footpad_talk.call;break) if line =~ /The Training Administrator told you to visit a master footpad for a talk/i
  1263. (lmas_footpad_challenge.call;break) if line =~ /The Training Administrator told you to pit your skills against a footpad./i
  1264. (customize.call;break) if line =~ /customize some lockpicks and keys/i
  1265. (promotion.call;break) if line =~ /(Congratulations\, you\'ve earned a rank|You need to get promoted to your next rank|You have earned enough training points for your next rank.)/i
  1266. (turnin.call;break) if line =~ /You are not currently training in this skill/i
  1267. end
  1268. }
  1269.  
  1270. lmas_footpad_talk = proc{
  1271. fput "gld"
  1272. waitfor "The Training Administrator told you to visit a master footpad for a talk"
  1273. while line = get
  1274. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1275. if line =~ /remaining to complete this task|remaining for this task/i
  1276. target_room = Room.current.find_nearest(training_master_room_number)
  1277. start_script 'go2', [ target_room.to_s ]
  1278. wait_while{ running?('go2') }
  1279. GameObj.npcs.find { |npc| master = npc if npc.name =~ master_names }
  1280. talk_to_footpad_masters.call
  1281. break
  1282. end
  1283. end
  1284. }
  1285.  
  1286. talk_to_footpad_masters = proc{
  1287. fput "ask #{master} about train lmas"
  1288. while line = get
  1289. (lmas_footpad_lock_start.call;break) if line =~ /LMASTER RELOCK the box on the table/i
  1290. (lmas_lockpick_start.call;break) if line =~ /just because you can make your own lockpicks/i
  1291. (customize_footpad_pre.call;break) if line =~ /yer coming down the homestretch now/i
  1292. end
  1293. }
  1294.  
  1295. lmas_tough_boxes = proc{
  1296. fput "gld"
  1297. waitfor "pick some tough boxes from creatures"
  1298. while line = get
  1299. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1300. (echo "Pick some tough boxes then restart script when finished with task.";exit) if line =~ /remaining to complete this task|remaining for this task/i
  1301. end
  1302. }
  1303.  
  1304. lmas_trick = proc{
  1305. fput "gld"
  1306. waitfor "challenging boxes to practice your latest trick for an audience"
  1307. while line = get
  1308. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1309. (echo "Practice your latest trick for an audience then restart script when finished with task.";exit) if line =~ /remaining to complete this task|remaining for this task/i
  1310. end
  1311. }
  1312.  
  1313. customize = proc{
  1314. fput "gld"
  1315. waitfor "customize some lockpicks and keys"
  1316. while line = get
  1317. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1318. if line =~ /remaining to complete this task|remaining for this task/i
  1319. fput "gld"
  1320. waitfor "Lock Mastery skill"
  1321. numberoflockpicks = matchfindword "You have ?"
  1322. numberoflockpicks = Integer(numberoflockpicks)
  1323. start_script 'go2', [ 'bank', '--disable-confirm' ]
  1324. wait_while{ running?('go2') }
  1325. multifput "depo all", "withdraw 5000 silvers"
  1326. target_room = Room.current.find_nearest(toolbenches_room_number)
  1327. start_script 'go2', [ target_room.to_s ]
  1328. wait_while{ running?('go2') }
  1329. fput "go tool"
  1330. customize_create.call
  1331. end
  1332. end
  1333. }
  1334.  
  1335. customize_create = proc{
  1336. if numberoflockpicks > 0
  1337. waitrt?
  1338. multifput "order 26", "buy"
  1339. result = dothistimeout "lmas create", 3, /You carefully slice the ruined part of|As you remove the resulting/i
  1340. if result =~ /You carefully slice the ruined part of/i
  1341. waitrt?
  1342. fput "drop copper"
  1343. customize_create.call
  1344. elsif result =~ /As you remove the resulting/i
  1345. waitrt?
  1346. fput "swap"
  1347. multifput "lmas customize edge brass", "lmas customize edge brass"
  1348. waitrt?
  1349. numberoflockpicks -= 1
  1350. fput "drop my lockpick"
  1351. customize_create.call
  1352. end
  1353. else
  1354. turnin.call
  1355. end
  1356. }
  1357.  
  1358. customize_footpad_pre = proc{
  1359. move 'out' if checkpaths 'out'
  1360. fput "gld"
  1361. waitfor "Lock Mastery skill"
  1362. numberoflockpicks = matchfindword "You have ?"
  1363. numberoflockpicks = Integer(numberoflockpicks)
  1364. start_script 'go2', [ 'bank', '--disable-confirm' ]
  1365. wait_while{ running?('go2') }
  1366. multifput "depo all", "withdraw 5000 silvers"
  1367. target_room = Room.current.find_nearest(toolbenches_room_number)
  1368. start_script 'go2', [ target_room.to_s ]
  1369. wait_while{ running?('go2') }
  1370. fput "go tool"
  1371. customize_footpad_create.call
  1372. }
  1373.  
  1374. customize_footpad_create = proc{
  1375. if numberoflockpicks > 0
  1376. waitrt?
  1377. multifput "order 26", "buy"
  1378. result = dothistimeout "lmas create", 3, /You carefully slice the ruined part of|As you remove the resulting/i
  1379. if result =~ /You carefully slice the ruined part of/i
  1380. waitrt?
  1381. fput "drop copper"
  1382. customize_footpad_create.call
  1383. elsif result =~ /As you remove the resulting/i
  1384. waitrt?
  1385. fput "swap"
  1386. multifput "lmas customize edge brass", "lmas customize edge brass"
  1387. waitrt?
  1388. numberoflockpicks -= 1
  1389. fput "stow my lockpick"
  1390. customize_footpad_create.call
  1391. end
  1392. else
  1393. move 'out' if checkpaths 'out'
  1394. target_room = Room.current.find_nearest(training_master_room_number)
  1395. start_script 'go2', [ target_room.to_s ]
  1396. wait_while{ running?('go2') }
  1397. GameObj.npcs.find { |npc| master = npc if npc.name =~ master_names }
  1398. fput "ask #{master} about training lmas"
  1399. waitfor "I assume you've got some lockpicks or keys to show me"
  1400. customize_footpad_hand_in1.call
  1401. end
  1402. }
  1403.  
  1404. customize_footpad_hand_in1 = proc{
  1405. result = dothistimeout "get copper lockpick from my #{stow_container}", 3, /Get what|You remove/i
  1406. if result =~ /Get what/i
  1407. turnin.call
  1408. elsif result =~ /You remove/i
  1409. multifput "give my lockpick to #{master}", "drop my lockpick"
  1410. customize_footpad_hand_in1.call
  1411. end
  1412. }
  1413.  
  1414. lmas_footpad_lock_start = proc{
  1415. waitrt?
  1416. fput "get my #{lmas_lockpick}" if checkright !~ /#{lmas_lockpick}/
  1417. multifput "get box", "lmas relock my box"
  1418. result = dothistimeout "give my box to #{master}", 3, /You have completed your training task|repetition|roundtime/i
  1419. if result =~ /You have completed your training task/i
  1420. waitrt?
  1421. fput "put my #{lmas_lockpick} in my #{lockpick_container}"
  1422. turnin.call
  1423. elsif result =~ /repetition|roundtime/i
  1424. lmas_footpad_lock_start.call
  1425. elsif result.nil?
  1426. lmas_footpad_lock_start.call
  1427. end
  1428. }
  1429.  
  1430. lmas_footpad_challenge = proc{
  1431. fput "gld"
  1432. waitfor "pit your skills against a footpad"
  1433. while line = get
  1434. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1435. if line =~ /remaining to complete this task|remaining for this task/i
  1436. stow.call
  1437. move 'out' if checkpaths 'out'
  1438. target_room = Room.current.find_nearest(training_master_room_number)
  1439. start_script 'go2', [ target_room.to_s ]
  1440. wait_while{ running?('go2') }
  1441. lmas_footpad_challenge1.call
  1442. break
  1443. end
  1444. end
  1445. }
  1446.  
  1447. lmas_footpad_challenge1 = proc{
  1448. move 'out' if checkpaths 'out'
  1449. GameObj.npcs.find { |npc| master = npc if npc.name =~ master_names }
  1450. number = 0
  1451. fput "ask #{master} about training lmas"
  1452. while line = get
  1453. (turnin.call;break) if line =~/gives you a strange look/i
  1454. (fput "nod";lmas_footpad_challenge_begin.call;break) if line =~ /just nod to me when yer feelin/i
  1455. end
  1456. }
  1457.  
  1458.  
  1459. lmas_footpad_challenge_begin = proc{
  1460. fput "put my lockpick on table" if checkright == "lockpick"
  1461. number = number + 1
  1462. if number <= 5
  1463. lmas_footpad_challenge_begin1.call
  1464. else
  1465. lmas_footpad_challenge_wait.call
  1466. end
  1467. }
  1468.  
  1469. lmas_footpad_challenge_begin1 = proc{
  1470. waitrt?
  1471. result = dothistimeout "disarm #{box[number]}", 3, /You can see what appears to be a tiny hole next to the lock plate which doesn't seem to belong there|You discover no traps./i
  1472. if result =~ /You can see what appears to be a tiny hole next to the lock plate which doesn't seem to belong there/i
  1473. lmas_footpad_challenge_trap.call
  1474. elsif result =~ /You discover no traps./i
  1475. lmas_footpad_challenge_pick.call
  1476. elsif result.nil?
  1477. lmas_footpad_challenge_begin1.call
  1478. end
  1479. }
  1480.  
  1481. lmas_footpad_challenge_trap = proc{
  1482. waitrt?
  1483. result = dothistimeout "disarm #{box[number]}", 3, /you nudge the end of the flag to one side|You can't seem to get the trap disarmed without setting it off by accident!/i
  1484. if result =~ /you nudge the end of the flag to one side/i
  1485. lmas_footpad_challenge_pick.call
  1486. elsif result =~ /You can't seem to get the trap disarmed without setting it off by accident!/i
  1487. lmas_footpad_challenge_trap.call
  1488. elsif result.nil?
  1489. lmas_footpad_challenge_trap.call
  1490. end
  1491. }
  1492.  
  1493. lmas_footpad_challenge_pick = proc{
  1494. waitrt?
  1495. fput "get vaalin lockpick from table"
  1496. result = dothistimeout "pick #{box[number]}", 3, /It opens|You are not able to pick the lock|Roundtime/i
  1497. if result =~ /It opens/i
  1498. lmas_footpad_challenge_begin.call
  1499. elsif result =~ /You are not able to pick the lock|Roundtime/i
  1500. lmas_footpad_challenge_pick.call
  1501. elsif result.nil?
  1502. lmas_footpad_challenge_pick.call.call
  1503. end
  1504. }
  1505.  
  1506. lmas_footpad_challenge_wait = proc{
  1507. while line = get
  1508. (lmas_footpad_challenge1.call;break) if line =~ /escorts you back to the training area|Game\'s over/i
  1509. end
  1510. }
  1511.  
  1512. cal = proc{
  1513. stow.call
  1514. target_room = Room.current.find_nearest(toolbenches_room_number)
  1515. start_script 'go2', [ target_room.to_s ]
  1516. wait_while{ running?('go2') }
  1517. fput "go toolbench"
  1518. waitfor "workshop instructions"
  1519. fput "get my calipers"
  1520. cal_start.call
  1521. }
  1522.  
  1523. cal_start = proc{
  1524. waitrt?
  1525. result = dothistimeout "lmaster cal my cal", 3, /Those calipers could not be more perfectly calibrated.|They practically glow with calibration!|need further tuning|Roundtime/i
  1526. if result =~ /Those calipers could not be more perfectly calibrated.|They practically glow with calibration!/i
  1527. fput "put my calipers in my #{calipers_container}"
  1528. move 'out' if checkpaths 'out'
  1529. exit
  1530. elsif result =~ /need further tuning|Roundtime/i
  1531. cal_start.call
  1532. elsif result.nil?
  1533. cal_start.call
  1534. end
  1535. }
  1536.  
  1537. carve_go = proc{
  1538. number_of_wedges = (script.vars[2].to_i)
  1539. silvers_needed = number_of_wedges * 300
  1540. if number_of_wedges == 1
  1541. echo "Making 1 wedge"
  1542. else
  1543. echo "Making #{number_of_wedges} wedges."
  1544. end
  1545. stow.call
  1546. start_script 'go2', [ 'bank', '--disable-confirm' ]
  1547. wait_while{ running?('go2') }
  1548. multifput "depo all", "withdraw #{silvers_needed} silvers"
  1549. target_room = Room.current.find_nearest(toolbenches_room_number)
  1550. start_script 'go2', [ target_room.to_s ]
  1551. wait_while{ running?('go2') }
  1552. fput "go toolbench"
  1553. waitfor "workshop instructions"
  1554. buy_block.call
  1555. }
  1556.  
  1557. buy_block = proc{
  1558. fput "put my wedge in my #{wedge_container}" if checkleft == "wedge" or checkright == "wedge"
  1559. fput "stow right" if checkright
  1560. fput "stow left" if checkleft
  1561. number_of_wedges -= 1
  1562. if number_of_wedges <= 0
  1563. echo "Done making wedges"
  1564. move 'out' if checkpaths 'out'
  1565. exit
  1566. end
  1567. waitrt?
  1568. multifput "order 1", "buy"
  1569. carve_start.call
  1570. }
  1571.  
  1572. carve_start = proc{
  1573. waitrt?
  1574. result = dothistimeout "carve my block", 3, /wedge|wooden block|You can\'t carve that\!/i
  1575. if result =~ /wedge/i
  1576. carve.call
  1577. elsif result =~ /wooden block/i
  1578. carve_start.call
  1579. elsif result =~ /You can\'t carve that\!/
  1580. echo "Done making wedges"
  1581. move 'out' if checkpaths 'out'
  1582. exit
  1583. elsif result.nil?
  1584. carve_start.call
  1585. end
  1586. }
  1587.  
  1588. carve = proc{
  1589. waitrt?
  1590. result = dothistimeout "carve my wedge", 3, /You should RUB the wedge now.|Roundtime/i
  1591. if result =~ /You should RUB the wedge now./i
  1592. carve_rub.call
  1593. elsif result =~ /Roundtime/i
  1594. carve.call
  1595. elsif result.nil?
  1596. carve.call
  1597. end
  1598. }
  1599.  
  1600. carve_rub = proc{
  1601. waitrt?
  1602. result = dothistimeout "rub my wedge", 3, /is ready for use!|Roundtime/i
  1603. if result =~ /is ready for use!/i
  1604. buy_block.call
  1605. elsif result =~ /Roundtime/i
  1606. carve_rub.call
  1607. elsif result.nil?
  1608. carve_rub.call
  1609. end
  1610. }
  1611.  
  1612. lmas_lockpick_start = proc{
  1613. move 'out' if checkpaths 'out'
  1614. fput "gld"
  1615. waitfor "Lock Mastery skill"
  1616. numberoflockpicks = matchfindword "You have ?"
  1617. numberoflockpicks = Integer(numberoflockpicks)
  1618. echo "Making #{numberoflockpicks} lockpicks"
  1619. start_script 'go2', [ 'bank', '--disable-confirm' ]
  1620. wait_while{ running?('go2') }
  1621. multifput "depo all", "withdraw 5000 silvers"
  1622. target_room = Room.current.find_nearest(toolbenches_room_number)
  1623. start_script 'go2', [ target_room.to_s ]
  1624. wait_while{ running?('go2') }
  1625. fput "go tool"
  1626. lock_pick_create.call
  1627. }
  1628.  
  1629. lock_pick_create = proc{
  1630. if numberoflockpicks > 0
  1631. waitrt?
  1632. multifput "order 26", "buy"
  1633. result = dothistimeout "lmas create", 3, /You carefully slice the ruined part of|As you remove the resulting/i
  1634. if result =~ /You carefully slice the ruined part of/i
  1635. waitrt?
  1636. fput "drop copper"
  1637. lock_pick_create.call
  1638. elsif result =~ /As you remove the resulting/i
  1639. numberoflockpicks -= 1
  1640. waitrt?
  1641. fput "stow my lockpick"
  1642. lock_pick_create.call
  1643. end
  1644. else
  1645. move 'out' if checkpaths 'out'
  1646. target_room = Room.current.find_nearest(training_master_room_number)
  1647. start_script 'go2', [ target_room.to_s ]
  1648. wait_while{ running?('go2') }
  1649. GameObj.npcs.find { |npc| master = npc if npc.name =~ master_names }
  1650. lockpick_handin.call
  1651. fput "ask #{master} about train lmas"
  1652. waitfor "got some lockpicks to show me"
  1653. lockpick_handin1.call
  1654. end
  1655. }
  1656.  
  1657. lockpick_handin1 = proc{
  1658. result = dothistimeout "get copper lockpick from my #{stow_container}", 3, /Get what|You remove/i
  1659. if result =~ /Get what/i
  1660. move 'out' if checkpaths 'out'
  1661. target_room = Room.current.find_nearest(training_administrator_room)
  1662. start_script 'go2', [ target_room.to_s ]
  1663. wait_while{ running?('go2') }
  1664. GameObj.npcs.find { |npc| person = npc if npc.name =~ training_administrator_names }
  1665. multifput "ask #{training_administrator_names} about train lock", "ask #{training_administrator_names} about train lock"
  1666. lmasstart.call
  1667. elsif result =~ /You remove/i
  1668. multifput "give my lockpick to #{master}", "drop my lockpick"
  1669. lockpick_handin1.call
  1670. end
  1671. }
  1672.  
  1673. gamstart = proc{
  1674. waitrt?
  1675. fput "put my #$stealth_get_item in my #$stealth_get_item_container" if checkleft == "#$stealth_get_item"
  1676. fput "put my #$stealth_get_item in my #$stealth_get_item_container" if checkright == "#$stealth_get_item"
  1677. stow.call
  1678. fput "gld"
  1679. waitfor "Rogue Gambits skill"
  1680. while line = get
  1681. (gam_learn_start.call;break) if line =~ /partner to teach you your latest trick/i
  1682. (gam_audience_start.call;break) if line =~ /The Training Administrator told you to practice your latest trick in front of an audience/i
  1683. (gam_speed_start.call;break) if line =~ /one minute/i
  1684. (gam_teach_start.call;break) if line =~ /teach a fellow guildmember something about rogue gambits/i
  1685. (promotion.call;break) if line =~ /(Congratulations, you've earned a rank|You need to get promoted to your next rank|You have earned enough training points for your next rank.)/i
  1686. (turnin.call;break) if line =~ /You are not currently training in this skill/i
  1687. end
  1688. }
  1689.  
  1690. gam_learn_start = proc{
  1691. fput "gld"
  1692. waitfor "partner to teach you your latest trick"
  1693. while line = get
  1694. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1695. if line =~ /remaining to complete this task|remaining for this task/i
  1696. exit if script.vars[2] == nil
  1697. hide_before_trick = "yes" if gam =~ /stealth/i
  1698. get_item_trick = "yes" if gam =~ /get/i
  1699. partner_room.call
  1700. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  1701. multifput "get my #$stealth_get_item from my #$stealth_get_item_container", "drop my #$stealth_get_item" if get_item_trick == "yes"
  1702. fput "whisper #{my_partner} rgam teach #{checkname} #{gam}"
  1703. until !hiding?
  1704. waitrt?
  1705. fput "unhide"
  1706. end
  1707. if gam =~ /stealth/i
  1708. if gam =~ /stand/i
  1709. until kneeling?
  1710. waitrt?
  1711. fput "kneel"
  1712. end
  1713. else
  1714. until standing?
  1715. waitrt?
  1716. fput "stand"
  1717. end
  1718. waitrt?
  1719. end
  1720. end
  1721. fput "whisper #{my_partner} I am ready to learn"
  1722. gam_learn_start1.call
  1723. break
  1724. end
  1725. end
  1726. }
  1727.  
  1728. gam_learn_start1 = proc{
  1729. waitrt?
  1730. until !hiding?
  1731. waitrt?
  1732. fput "unhide"
  1733. end
  1734. if gam =~ /stealth/i
  1735. if gam =~ /stand/i
  1736. until kneeling?
  1737. waitrt?
  1738. fput "kneel"
  1739. end
  1740. else
  1741. until standing?
  1742. waitrt?
  1743. fput "stand"
  1744. end
  1745. end
  1746. end
  1747. waitrt?
  1748. if get_item_trick == "yes"
  1749. waitfor "shows you how to take an item from the ground without giving yourself away"
  1750. elsif hide_before_trick == "yes"
  1751. waitfor "gives you some pointers"
  1752. end
  1753. gam_learn_start2.call
  1754. }
  1755.  
  1756. gam_learn_start2 = proc{
  1757. waitrt?
  1758. until !hiding?
  1759. waitrt?
  1760. fput "unhide"
  1761. end
  1762. if gam =~ /stealth/i
  1763. if gam =~ /stand/i
  1764. until kneeling?
  1765. waitrt?
  1766. fput "kneel"
  1767. end
  1768. else
  1769. until standing?
  1770. waitrt?
  1771. fput "stand"
  1772. end
  1773. waitrt?
  1774. end
  1775. end
  1776. fput "drop my #$stealth_get_item" if get_item_trick == "yes"
  1777. if hide_before_trick == "yes"
  1778. until hiding?
  1779. waitrt?
  1780. fput "hide"
  1781. end
  1782. end
  1783. waitrt?
  1784. result = dothistimeout "rgam #{gam}", 2, /You need to be holding something first|You already have that|You have completed your training task|You have (.*) repetition|but realize that doing so would reveal your location|suddenly become aware that your actions have revealed your location|Just how stealthy are you trying to be|but have revealed yourself from hiding in doing so|but realize that doing so would compromise your hidden position/i
  1785. if result =~ /You need to be holding something first/i
  1786. fput "get my #{weapon}"
  1787. gam_learn_start2.call
  1788. elsif result =~ /You already have that/i
  1789. fput "stow #{weapon}"
  1790. gam_learn_start1.call
  1791. elsif result =~ /You have completed your training task/i
  1792. fput "whisper #{my_partner} All done. Thank you!"
  1793. until !hiding?
  1794. waitrt?
  1795. fput "unhide"
  1796. end
  1797. hide_before_trick = nil
  1798. get_item_trick = nil
  1799. fput "put my #$stealth_get_item in my #$stealth_get_item_container" if get_item_trick == "yes"
  1800. auto_run.call
  1801. elsif result =~ /Just how stealthy are you trying to be/i
  1802. until !hiding?
  1803. waitrt?
  1804. fput "unhide"
  1805. end
  1806. gam_learn_start2.call
  1807. elsif result =~ /suddenly become aware that your actions have revealed your location|but realize that doing so would reveal your location/i
  1808. gam_learn_start2.call
  1809. elsif result =~ /You have (.*) repetition/i
  1810. reps = $1
  1811. fput "whisper #{my_partner} #{reps} more." if update_partner == "on"
  1812. until !hiding?
  1813. waitrt?
  1814. fput "unhide"
  1815. end
  1816. gam_learn_start1.call
  1817. elsif result =~ /but have revealed yourself from hiding in doing so/i
  1818. gam_learn_start2.call
  1819. elsif result =~ /but realize that doing so would compromise your hidden position/i
  1820. gam_learn_start2.call
  1821. elsif result.nil?
  1822. until !hiding?
  1823. waitrt?
  1824. fput "unhide"
  1825. end
  1826. gam_learn_start2.call
  1827. end
  1828. }
  1829.  
  1830. gam_audience_start = proc{
  1831. fput "gld"
  1832. waitfor "The Training Administrator told you to practice your latest trick in front of an audience"
  1833. while line = get
  1834. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1835. if line =~ /remaining to complete this task|remaining for this task/i
  1836. target_room = Room.current.find_nearest(audience_rooms)
  1837. start_script 'go2', [ target_room.to_s ]
  1838. wait_while{ running?('go2') }
  1839. hide_before_trick = "yes" if gam =~ /stealth/i
  1840. get_item_trick = "yes" if gam =~ /get/i
  1841. multifput "get my #$stealth_get_item from my #$stealth_get_item_container", "drop my #$stealth_get_item" if get_item_trick == "yes"
  1842. gam_audience_start1.call
  1843. break
  1844. end
  1845. end
  1846. }
  1847.  
  1848. gam_audience_start1 = proc{
  1849. waitrt?
  1850. until !hiding?
  1851. waitrt?
  1852. fput "unhide"
  1853. end
  1854. if gam =~ /stealth/i
  1855. if gam =~ /stand/i
  1856. until kneeling?
  1857. waitrt?
  1858. fput "kneel"
  1859. end
  1860. else
  1861. until standing?
  1862. waitrt?
  1863. fput "stand"
  1864. end
  1865. waitrt?
  1866. end
  1867. end
  1868. fput "drop my #$stealth_get_item" if get_item_trick == "yes"
  1869. if hide_before_trick == "yes"
  1870. until hiding?
  1871. waitrt?
  1872. fput "hide"
  1873. end
  1874. end
  1875. i = 0
  1876. checkpcs.each { |pc| i += 1; break if pc == Char.name }
  1877. echo "#{i} people are here."
  1878. waitrt?
  1879. result = dothistimeout "rgam #{gam}", 5, /You need to be holding something first|You already have that|You have completed your training task|repetition|but realize that doing so would reveal your location|suddenly become aware that your actions have revealed your location|Just how stealthy are you trying to be|but have revealed yourself from hiding in doing so/i
  1880. if result =~ /You need to be holding something first/i
  1881. fput "get my #{weapon}"
  1882. gam_audience_start1.call
  1883. elsif result =~ /You already have that/i
  1884. fput "stow #{weapon}"
  1885. gam_audience_start1.call
  1886. elsif result =~ /You have completed your training task/i
  1887. if get_item_trick == "yes"
  1888. fput "put my #$stealth_get_item in my #$stealth_get_item_container"
  1889. end
  1890. hide_before_trick = nil
  1891. get_item_trick = nil
  1892. turnin.call
  1893. elsif result =~ /repetition/i
  1894. until !hiding?
  1895. waitrt?
  1896. fput "unhide"
  1897. end
  1898. sleep 30
  1899. gam_audience_start1.call
  1900. elsif result =~ /suddenly become aware that your actions have revealed your location/i
  1901. until !hiding?
  1902. waitrt?
  1903. fput "unhide"
  1904. end
  1905. gam_audience_start1.call
  1906. elsif result =~ /but have revealed yourself from hiding in doing so|but realize that doing so would compromise your hidden position|Just how stealthy are you trying to be/i
  1907. gam_audience_start1.call
  1908. elsif result.nil?
  1909. until !hiding?
  1910. waitrt?
  1911. fput "unhide"
  1912. end
  1913. sleep 3
  1914. gam_audience_start1.call
  1915. end
  1916. }
  1917.  
  1918. gam_speed_start = proc{
  1919. fput "gld"
  1920. waitfor "one minute"
  1921. while line = get
  1922. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1923. (gam_speed_begin.call;break) if line =~ /remaining to complete this task|remaining for this task/i
  1924. end
  1925. }
  1926.  
  1927. gam_speed_begin = proc{
  1928. hide_before_trick = "yes" if gam =~ /stealth/i
  1929. get_item_trick = "yes" if gam =~ /get/i
  1930. multifput "get my #$stealth_get_item from my #$stealth_get_item_container", "drop my #$stealth_get_item" if get_item_trick == "yes"
  1931. waitrt?
  1932. until !hiding?
  1933. waitrt?
  1934. fput "unhide"
  1935. end
  1936. if gam =~ /stealth/i
  1937. if gam =~ /stand/i
  1938. until kneeling?
  1939. waitrt?
  1940. fput "kneel"
  1941. end
  1942. else
  1943. until standing?
  1944. waitrt?
  1945. fput "stand"
  1946. end
  1947. waitrt?
  1948. end
  1949. end
  1950. fput "drop my #$stealth_get_item" if get_item_trick == "yes"
  1951. if hide_before_trick == "yes"
  1952. until hiding?
  1953. waitrt?
  1954. fput "hide"
  1955. end
  1956. end
  1957. waitrt?
  1958. result = dothistimeout "rgam #{gam}", 5, /You need to be holding something first|You already have that|You have completed your training task|(repetition|You must succeed)|but realize that doing so would reveal your location|suddenly become aware that your actions have revealed your location|Just how stealthy are you trying to be|but have revealed yourself from hiding in doing so|but realize that doing so would compromise your hidden position/i
  1959. if result =~ /You need to be holding something first/i
  1960. fput "get my #{weapon}"
  1961. gam_speed_begin.call
  1962. elsif result =~ /You already have that/i
  1963. fput "stow #{weapon}"
  1964. gam_speed_begin.call
  1965. elsif result =~ /You have completed your training task/i
  1966. fput "put my #$stealth_get_item in my #$stealth_get_item_container" if get_item_trick == "yes"
  1967. hide_before_trick = nil
  1968. get_item_trick = nil
  1969. turnin.call
  1970. elsif result =~ /repetition|You must succeed|but realize that doing so would reveal your location|Just how stealthy are you trying to be|but have revealed yourself from hiding in doing so/i
  1971. gam_speed_begin.call
  1972. elsif result =~ /suddenly become aware that your actions have revealed your location/i
  1973. until !hiding?
  1974. waitrt?
  1975. fput "unhide"
  1976. end
  1977. gam_speed_begin.call
  1978. elsif result.nil?
  1979. until !hiding?
  1980. waitrt?
  1981. fput "unhide"
  1982. end
  1983. gam_speed_begin.call
  1984. end
  1985. }
  1986.  
  1987. gam_teach_start = proc{
  1988. fput "gld"
  1989. waitfor "teach a fellow guildmember something about rogue gambits"
  1990. while line = get
  1991. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  1992. if line =~ /remaining to complete this task|remaining for this task/i
  1993. exit if script.vars[2] == nil
  1994. partner_room.call
  1995. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  1996. fput "whisper #{my_partner} rgam #{gam}"
  1997. waitfor "I am ready to learn"
  1998. partner = GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i }
  1999. gam_teach_start1.call
  2000. break
  2001. end
  2002. end
  2003. }
  2004.  
  2005. gam_teach_start1 = proc{
  2006. if reget 10, "You have completed your training task"
  2007. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  2008. fput "whisper #{my_partner} All done. Thank you!"
  2009. auto_run.call
  2010. end
  2011. waitrt?
  2012. if gam =~ /stealth/i
  2013. if gam =~ /stand/i
  2014. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{partner}/i and partner.status =~ /kneel/ } }
  2015. else
  2016. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{partner}/i and partner.status.nil? } }
  2017. end
  2018. end
  2019. waitrt?
  2020. result = dothistimeout "rgam teach #{my_partner} #{gam}", 5, /You need to have free hands to teach this gambit|You already have that|You should have a silver coin on you to teach this gambit|Wait a few seconds and try again|You have completed your training task|You have (.*) repetition|You need to be holding something first|Who are you trying to teach/i
  2021. if result =~ /You need to have free hands to teach this gambit/i
  2022. stow.call
  2023. gam_teach_start1.call
  2024. elsif result =~ /You already have that/i
  2025. fput "stow #{weapon}"
  2026. gam_teach_start1.call
  2027. elsif result =~ /You should have a silver coin on you to teach this gambit/i
  2028. fput "whisper #{my_partner} Need a coin, be right back."
  2029. currentroom = Room.current.id
  2030. start_script 'go2', [ 'bank', '--disable-confirm' ]
  2031. wait_while{ running?('go2') }
  2032. fput "withdraw 2 silvers"
  2033. start_script "go2", [ "#{currentroom}" ]
  2034. wait_while{ running?('go2') }
  2035. gam_teach_start1.call
  2036. elsif result =~ /Wait a few seconds and try again/i
  2037. sleep 2
  2038. gam_teach_start1.call
  2039. elsif result =~ /You have completed your training task/i
  2040. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{script.vars[3]}(.*)/i } }
  2041. fput "whisper #{my_partner} All done. Thank you!"
  2042. auto_run.call
  2043. elsif result =~ /You have (.*) repetition/i
  2044. reps = $1
  2045. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{script.vars[3]}(.*)/i } }
  2046. fput "whisper #{my_partner} #{reps} more." if update_partner == "on"
  2047. gam_teach_start1.call
  2048. elsif result =~ /You need to be holding something first/
  2049. fput "get my #{weapon}"
  2050. gam_teach_start1.call
  2051. elsif result =~ /Who are you trying to teach/
  2052. sleep 2
  2053. gam_teach_start1.call
  2054. elsif result.nil?
  2055. gam_teach_start1.call
  2056. end
  2057. }
  2058.  
  2059. repair = proc{
  2060. stow.call
  2061. target_room = Room.current.find_nearest(toolbenches_room_number)
  2062. start_script 'go2', [ target_room.to_s ]
  2063. wait_while{ running?('go2') }
  2064. fput "go toolbench"
  2065. getpick.call
  2066. }
  2067.  
  2068. keys = proc{
  2069. fput "gld"
  2070. waitfor "cut keys for some locks you make"
  2071. while line = get
  2072. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  2073. if line =~ /remaining to complete this task|remaining for this task/i
  2074. start_script 'go2', [ 'bank', '--disable-confirm' ]
  2075. wait_while{ running?('go2') }
  2076. multifput "depo all", "withdraw 5000 silvers"
  2077. target_room = Room.current.find_nearest(toolbenches_room_number)
  2078. start_script 'go2', [ target_room.to_s ]
  2079. wait_while{ running?('go2') }
  2080. fput "go tool"
  2081. keys_1.call
  2082. break
  2083. end
  2084. end
  2085. }
  2086.  
  2087. keys_1 = proc{
  2088. waitrt?
  2089. multifput "drop my key", "drop my assem"
  2090. multifput "lmas lock create 25", "lmas lock create 25"
  2091. waitrt?
  2092. multifput "order 25", "buy"
  2093. result = dothistimeout "lmas cut key", 5, /repetition|You have completed your training task/i
  2094. if result =~ /repetition/i
  2095. keys_1.call
  2096. elsif result =~ /You have completed your training task/i
  2097. waitrt?
  2098. multifput "drop my key", "drop my assem", "out"
  2099. turnin.call
  2100. end
  2101. }
  2102.  
  2103. cheapstart = proc{
  2104. fput "gld"
  2105. waitfor "Cheap Shot skill"
  2106. while line = get
  2107. (footstomp_defend.call;break) if line =~ /The Training Administrator told you to practice defending against footstomps./i
  2108. (footstomp_partner.call;break) if line =~ /The Training Administrator told you to practice footstomping a partner./i
  2109. (cheap_critter.call;break) if line =~ /The Training Administrator told you to tweak some creatures\' noses.|The Training Administrator told you to practice templeshot on some creatures./i
  2110. (cheap_plants.call;break) if line =~ /The Training Administrator told you to water the guild plants./i
  2111. (sweep_dirt.call;break) if line =~ /The Training Administrator told you to sweep the guild courtyard./i
  2112. (windows_get_rag.call;break) if line =~ /The Training Administrator told you to clean the guild windows./i
  2113. (promotion.call;break) if line =~ /(Congratulations, you've earned a rank|You need to get promoted to your next rank|You have earned enough training points for your next rank.)/i
  2114. (turnin.call;break) if line =~ /You are not currently training in this skill/i
  2115. end
  2116. }
  2117.  
  2118. footstomp_defend = proc{
  2119. fput "gld"
  2120. waitfor "The Training Administrator told you to practice defending against footstomps."
  2121. while line = get
  2122. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  2123. if line =~ /remaining to complete this task|remaining for this task/i
  2124. exit if script.vars[2] == nil
  2125. multifput "gld stance def", "stance off"
  2126. partner_room.call
  2127. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  2128. fput "whisper #{my_partner} I need to be footstomped."
  2129. foot_stomp_defend1.call
  2130. break
  2131. end
  2132. end
  2133. }
  2134.  
  2135. foot_stomp_defend1 = proc{
  2136. while line = get
  2137. if line =~ /You have (.*) repetition/i
  2138. reps = $1
  2139. fput "whisper #{my_partner} #{reps} more." if update_partner == "on"
  2140. elsif line =~ /You have completed your training task/i
  2141. fput "whisper #{my_partner} All done. Thank you!"
  2142. auto_run.call
  2143. break
  2144. end
  2145. end
  2146. }
  2147.  
  2148.  
  2149. footstomp_partner = proc{
  2150. fput "gld"
  2151. waitfor "The Training Administrator told you to practice footstomping a partner"
  2152. while line = get
  2153. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  2154. if line =~ /remaining to complete this task|remaining for this task/i
  2155. multifput "gld stance off", "stance off"
  2156. partner_room.call
  2157. wait_until { GameObj.pcs.find { |pc| pc.name =~ /#{my_partner}(.*)/i } }
  2158. fput "whisper #{my_partner} I need to footstomp you."
  2159. waitfor "Ready to be footstomped"
  2160. footstomp_partner_start.call
  2161. break
  2162. end
  2163. end
  2164. }
  2165.  
  2166. footstomp_partner_start = proc{
  2167. stand_up.call if !standing?
  2168. stamina_check.call if checkstamina < 12
  2169. waitrt?
  2170. result = dothistimeout "cheap foot #{my_partner}", 2, /just fell for a footstomp not long ago|You have completed your training task|You have (.*) repetition/i
  2171. if result =~ /just fell for a footstomp not long ago/
  2172. sleep 2
  2173. footstomp_partner_start.call
  2174. elsif result =~ /You have (.*) repetition/
  2175. reps = $1
  2176. fput "whisper #{my_partner} #{reps} more." if update_partner == "on"
  2177. sleep 13
  2178. footstomp_partner_start.call
  2179. elsif result =~ /You have completed your training task/
  2180. fput "whisper #{my_partner} All done!"
  2181. waitrt?
  2182. auto_run.call
  2183. elsif result.nil?
  2184. sleep 2
  2185. footstomp_partner_start.call
  2186. end
  2187. }
  2188.  
  2189.  
  2190. cheap_critter = proc{
  2191. fput "gld"
  2192. waitfor "The Training Administrator told you to tweak some creatures' noses.", "The Training Administrator told you to practice templeshot on some creatures."
  2193. while line = get
  2194. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  2195. if line =~ /remaining to complete this task|remaining for this task/i
  2196. fput "gld stance off"
  2197. echo "Go cheap shot some critters!"
  2198. exit
  2199. end
  2200. end
  2201. }
  2202.  
  2203. cheap_plants = proc{
  2204. fput "gld"
  2205. waitfor "The Training Administrator told you to water the guild plants"
  2206. while line = get
  2207. (turnin.call;break) if line =~ /You have completed|You have no repetitions remaining for this task/i
  2208. if line =~ /remaining to complete this task|remaining for this task/i
  2209. number = 0
  2210. target_room = Room.current.find_nearest(tool_rack_room_number)
  2211. start_script 'go2', [ target_room.to_s ]
  2212. wait_while{ running?('go2') }
  2213. my_room = Room.current.id
  2214. if Room.current.id == 17969
  2215. current_plant_rooms = iceplant_rooms
  2216. elsif Room.current.id == 16581
  2217. current_plant_rooms = landingplant_rooms
  2218. elsif Room.current.id == 17941
  2219. current_plant_rooms = solplant_rooms
  2220. elsif Room.current.id == 17861
  2221. current_plant_rooms = illistimplant_rooms
  2222. else
  2223. echo "Error! Stuck in sweep_dirt, try running script again and please inform author of this error."
  2224. end
  2225. fput "put my can in rack" if checkright =~ /can/i or checkleft =~ /can/i
  2226. stow.call
  2227. fput "get can"
  2228. cheap_plants_move.call
  2229. end
  2230. end
  2231. }
  2232.  
  2233. cheap_plants_move = proc{
  2234. if number > current_plant_rooms.length - 1
  2235. if do_other_guild_tasks == "yes"
  2236. target_room = Room.current.find_nearest(tool_rack_room_number)
  2237. start_script 'go2', [ target_room.to_s ]
  2238. wait_while{ running?('go2') }
  2239. multifput "put my can in rack", "get my #{mainweapon}", "get my #{shield}"
  2240. fput "remove my #{shield}" if checkleft == nil
  2241. fput "stance def"
  2242. if Room.current.id == 17969
  2243. go_to_room = 16581
  2244. elsif Room.current.id == 16581
  2245. go_to_room = 17941
  2246. elsif Room.current.id == 17941
  2247. go_to_room = 17969
  2248. end
  2249. start_script "go2", [go_to_room]
  2250. wait_while{ running?('go2') }
  2251. number = 0
  2252. target_room = Room.current.find_nearest(tool_rack_room_number)
  2253. start_script 'go2', [ target_room.to_s ]
  2254. wait_while{ running?('go2') }
  2255. if Room.current.id == 17969
  2256. current_plant_rooms = iceplant_rooms
  2257. elsif Room.current.id == 16581
  2258. current_plant_rooms = landingplant_rooms
  2259. elsif Room.current.id == 17941
  2260. current_plant_rooms = solplant_rooms
  2261. elsif Room.current.id == 17861
  2262. current_plant_rooms = illistimplant_rooms
  2263. else
  2264. echo "Error! Stuck in cheap_plants_move, try running script again and please inform author of this error."
  2265. end
  2266. fput "put my can in rack" if checkright =~ /can/i or checkleft =~ /can/i
  2267. stow.call
  2268. fput "get can"
  2269. cheap_plants_move.call
  2270. else
  2271. waitrt?
  2272. target_room = Room.current.find_nearest(tool_rack_room_number)
  2273. start_script 'go2', [ target_room.to_s ]
  2274. wait_while{ running?('go2') }
  2275. multifput "put my can in rack", "get my #{mainweapon}", "get my #{shield}"
  2276. fput "remove my #{shield}" if checkleft == nil
  2277. fput "stance def"
  2278. start_script 'go2', [my_room]
  2279. wait_while{ running?('go2') }
  2280. respond "Couldn't finish task, try starting script again in 20 minutes."
  2281. exit
  2282. end
  2283. else
  2284. start_script "go2", [current_plant_rooms.at(number)]
  2285. wait_while{ running?('go2') }
  2286. number += 1
  2287. cheap_plants_water.call
  2288. end
  2289. }
  2290.  
  2291. cheap_plants_water = proc{
  2292. waitrt?
  2293. fput "kneel"
  2294. GameObj.loot.find { |loot| flower = loot.name if loot.name =~ flower_names }
  2295. if Room.current.id == 17871 or Room.current.id == 17851 or Room.current.id == 17855 or Room.current.id == 17869 or Room.current.id == 17870
  2296. flower = "wildflower"
  2297. end
  2298. if flower =~ /rose/
  2299. flower = "rose"
  2300. end
  2301. result = dothistimeout "water #{flower}", 2, /You have completed|let someone else have a crack at it|repetition/i
  2302. if result =~ /You have completed/i
  2303. target_room = Room.current.find_nearest(tool_rack_room_number)
  2304. start_script 'go2', [ target_room.to_s ]
  2305. wait_while{ running?('go2') }
  2306. multifput "put my can in rack", "get my #{mainweapon}", "get my #{shield}"
  2307. fput "remove my #{shield}" if checkleft == nil
  2308. fput "stance def"
  2309. start_script 'go2', [my_room]
  2310. wait_while{ running?('go2') }
  2311. turnin.call
  2312. elsif result =~ /let someone else have a crack at it|repetition/i
  2313. cheap_plants_move.call
  2314. end
  2315. }
  2316.  
  2317. if Char.prof != "Rogue"
  2318. echo "This script only works for rogues."
  2319. exit
  2320. end
  2321. stow.call
  2322. my_partner = script.vars[2] if script.vars[2] != nil
  2323. (setup.call;exit) if script.vars[1] == "setup"
  2324. if (CharSettings['setup_has_been_run'] == nil || UserVars.rogue.nil?) and (script.vars[1] != 'setup')
  2325. echo "Setup is required, type ;rogue setup and fill in all settings."
  2326. exit
  2327. end
  2328. if script.vars[1] == nil
  2329. respond "Type ;rogue sweep to automate solo sweep tasks. ;rogue sweep <partnername> for partner tasks."
  2330. respond "Type ;rogue gam to automate solo gambit tasks. ;rogue gam <partnername> for partner tasks."
  2331. respond "Type ;rogue cheap to automate solo cheap shot tasks. ;rogue cheap <partnername> for partner tasks."
  2332. respond "Type ;rogue sub to automate solo subdue tasks."
  2333. respond "Type ;rogue lmas do lockmastery tasks. Doesn't do all lockmastery tasks."
  2334. respond "Typing ;rogue <sweep, gam, sub or lmas> will also turn in completed tasks to the NPC."
  2335. respond "Type ;rogue cal to calibrate your calipers."
  2336. respond "Type ;rogue wedge <number> to create specified number of wedges."
  2337. respond "Note, do not type gld while script is running, it could make the script stop working."
  2338. respond "Version: #{version}"
  2339. exit
  2340. elsif script.vars[2] == "help"
  2341. multifput "gld stance off", "stance off"
  2342. if script.vars[1] == "sweep"
  2343. help_sweep_partner_start.call
  2344. elsif script.vars[1] == "cheap"
  2345. help_cheap_partner_start.call
  2346. end
  2347. elsif script.vars[2] == "teach"
  2348. gam_teach_help_start.call
  2349. elsif script.vars[2] == "learn"
  2350. gam_learn_help_start.call
  2351. elsif script.vars[1] == "def"
  2352. (multifput "gld stance def", "stance off";exit)
  2353. elsif script.vars[1] == "cal"
  2354. cal.call
  2355. elsif script.vars[1] == "wedge"
  2356. carve_go.call
  2357. elsif script.vars[1] == "carve"
  2358. carve_go.call
  2359. elsif script.vars[1] == "repair"
  2360. repair.call
  2361. elsif script.vars[1] == "checkin"
  2362. checkin.call
  2363. else
  2364. go_to_task.call
  2365. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement