Hanryu

burgle

Dec 26th, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.14 KB | None | 0 0
  1. #burgle
  2. #
  3. # written by Hanryu
  4. # Please report any bugs to Hanryu#0052 (Discord) or [email protected]
  5. # Initial script burgled from Jalika
  6. # Some bits stolen from Reveler's Burgle Script, v.1.0, 02/15/2020
  7. # This script is designed to use Oulander, http://outlanderapp.com
  8. # 2020-02-15
  9. # Cleaned up for release to Prime
  10. # 2020-02-18
  11. # Search while hidden in first room, not in second
  12. # Added check to look for guards after you move to second room
  13. # 2020-02-27
  14. # Significant rewrite, will now skip the bedroom.
  15. # 2020-02-28
  16. # Got busted in a linear on a bad move because of bad boundary conditions added a bunch of \b's
  17. # risking changing `move` to `put`
  18. # 2020-02-29
  19. # now targeting anything BUT the Kitchen
  20. # Added walk sub to move rooms
  21. # 2020-03-11
  22. # Added variable override for locks v. althletics
  23. # 2020-05-21
  24. # Noticed I had a bad trigger for logging data, fixt
  25. # Added trigger for failed searches to be logged also
  26. # 2020-06-24
  27. # Added some to the log trigger, missed arrows/bolts/stones/leathers/plate etc prior to this
  28. # 2020-08-04
  29. # Global var control of number of rooms hit
  30. # This is because my internet sucks sometimes and I am getting caught
  31. # 2020-09-14
  32. # changing to focus on Athletics
  33. # 2020-11-02
  34. # Modifications for eddy
  35. # 2021-03-24
  36. # Comment out blend since I capped stealth
  37. # 2021-04-26
  38. # Failed burgles now send text alerts
  39. # 2021-09-25
  40. # add athletics check since since I capped
  41. # 2021-11-15
  42. # fixed it so I stop keeping vOILe
  43. # 2021-11-19
  44. # searching for a good cowbell
  45. # 2021-12-09
  46. # O2 conversion
  47. # 2022-01-30
  48. # found a rosewood one!
  49. # 2022-09-14
  50. # Can I make this target just the armory for blunt ammo?
  51. # fixing help
  52. # preferring rope
  53. # 2022-11-20
  54. # rel blend logic
  55. # 2022-12-16
  56. # started stowing again, why not?
  57. #debug 5
  58.  
  59. # put #log >SCRIPTCHECK.txt WATCH THIS BURGLE!
  60. # waitfor A good positive attitude
  61.  
  62. ## use me if you don't need input
  63. if matchre("%0", "help|HELP|Help") then {goto help}
  64.  
  65. if matchre("%0", "(\d)? ?rooms? ?(\d)?") then {
  66. put #var BurgleRooms $1
  67. delay 0.2
  68. put #echo >user #990000 >BURGLE: Number of rooms to $BurgleRooms
  69. exit
  70. }
  71.  
  72. #### LOAD VARIABLES ####
  73. eval Scriptname titlecase(%scriptname)
  74. eval SCRIPTNAME tocaps(%scriptname)
  75. timer start
  76. var Kill 0
  77. if ($Athletics.LearningRate <= $Locksmithing.LearningRate) then {
  78. var EntryMethod Athletics
  79. } else {
  80. var EntryMethod Locksmithing
  81. }
  82. if matchre("%0", "(locks|ath)") then {
  83. var EntryMethod $1
  84. if matchre("%EntryMethod", "locks") then {var EntryMethod Locksmithing}
  85. if matchre("%EntryMethod", "ath") then {var EntryMethod Athletics}
  86. if ($Athletics.LearningRate > 17) then {var EntryMethod Locksmithing}
  87. if ($Locksmithing.LearningRate > 17) then {var EntryMethod Athletics}
  88. }
  89. var guard 0
  90. var surface counter
  91. var direction
  92. var otherDirection
  93. var Reverse northeast-southwest northwest-southeast southeast-northwest southwest-northeast east-west west-east north-south south-north
  94. var validDirections out|northeast|northwest|southeast|southwest|east|west|north|south|in
  95. var PathBack
  96. var MoveCounter 0
  97. var zoneid $zoneid
  98. var roomid $roomid
  99. put #var BurgleFailed False
  100. var ArmorySearch False
  101. if matchre("%0", "(armory|ammo)") then {
  102. var ArmorySearch True
  103. var EntryMethod Athletics
  104. }
  105.  
  106. #### LOAD ACTIONS ####
  107. action put #log >BurgledItems-$charactername.csv $date,$time,%zoneid%roomid,%surface,FAIL when "^You rummage around .+, but find nothing that looks valuable\.$"
  108. action put #log >BurgledItems-$charactername.csv $date,$time,%zoneid%roomid,%surface,$1 when "until you find (?:some|an?) (.*)\. It looks valuable, so you decide to take it\.$"
  109. action goto fail when "^A scream shocks you, as the owner discovers you ransacking their home\. You flee, the owner's calls for help following you outside\.$|^Your lack of stealth gives away your criminal intent, attracting the attention of local law enforcement\."
  110. action var guard 1 when "^Footsteps nearby make you wonder if you\'re pushing your luck\."
  111. action var surface counter when "^\[Someone Else's Home, Kitchen\]$"
  112. action var surface bed when "^\[Someone Else's Home, Bedroom\]$"
  113. action var surface table when "^\[Someone Else's Home, Work Room\]$"
  114. action var surface desk when "^\[Someone Else's Home, Sanctum\]$"
  115. action var surface rack when "^\[Someone Else's Home, Armory\]$"
  116. action var surface bookshelf when "^\[Someone Else's Home, Library\]$"
  117.  
  118. #### ABORTS and PREP ####
  119. if ($BurgleTime > $gametime) then {goto end}
  120. put set roomname
  121. waitfor Ok.
  122. if ("$righthand" != "Empty") then {gosub stow right}
  123. if ("$lefthand" != "Empty") then {gosub stow left}
  124.  
  125. top:
  126. if ($roundtime > 0) then {pause $pauseTime}
  127. if (($webbed) || ($stunned)) then {pause 0.1}
  128. matchre top ^\.\.\.wait|^Sorry,|^You are still stun|^You can't do that while entangled
  129. matchre NotYet ^You should wait at least (.+) roisaen for the heat to die down\.
  130. matchre GetReady ^The heat has died down from your last caper\.
  131. put burgle recall
  132. matchwait
  133.  
  134. GetReady:
  135. if ("$charactername" = "Hanryu") then {gosub call blend snap}
  136.  
  137. ChooseEntryMethod:
  138. put #echo >User #FF00FF >BURGLE: Using %EntryMethod
  139. goto %EntryMethod
  140. error:
  141. help:
  142. put #printbox .burgle Athletics/Locksmithing| will specify the method but override if exp dictates|.burgle #| will set the number of rooms to burgle and exit|.burgle ammo| will bum rush the armory then flee
  143. exit
  144.  
  145. Athletics:
  146. gosub get my heavy rope
  147. goto burgle
  148.  
  149. Locksmithing:
  150. gosub get my $lockpickStacker
  151. gosub wear my $lockpickStacker
  152. goto burgle
  153. burgle:
  154. if ((!$hidden) || (!$invisible)) then {gosub hide}
  155. if (!$standing) then {gosub stand}
  156. gosub hide
  157. if ($roundtime > 0) then {pause $pauseTime}
  158. matchre burgle \.\.\.wait|^Sorry,
  159. match badLoc You don't see any likely marks in the area
  160. match InHouse Obvious exits:
  161. put hide;burgle
  162. matchwait
  163.  
  164. InHouse:
  165. if ("$righthand" != "Empty") then {gosub stow right}
  166. if ("$lefthand" != "Empty") then {gosub stow left}
  167. if ((%guard) || ($BurgleRooms < 1)) then {goto leave}
  168. if (%ArmorySearch = True) then {goto ArmorySearch}
  169. if ($BurgleRooms = 1) then {
  170. gosub search
  171. goto leave
  172. }
  173. ArmorySearch:
  174. if ($hidden) then {send shiver}
  175. if contains("$roomexits", ",") then {goto Branched}
  176. else {goto Linear}
  177.  
  178. # Set to search the bedroom and the OTHER room
  179. Branched:
  180. if matchre("$roomexits", "\b(%validDirections)\b, \b(%validDirections)\b\.") then {
  181. var direction $1
  182. var otherDirection $2
  183. gosub walk %direction
  184. if matchre("%Reverse", "\b%direction-(\w+)") then {var PathBack $1|}
  185. if (%guard) then {goto BackToKitchen}
  186. if (!(%ArmorySearch) || matchre("%surface", "rack")) then {gosub search}
  187. gosub walk %PathBack[%MoveCounter]
  188. if (%guard) then {goto leave}
  189. gosub walk %otherDirection
  190. if matchre("%Reverse", "\b%otherDirection-(\w+)") then {var PathBack $1|}
  191. if (%guard) then {goto BackToKitchen}
  192. if (!(%ArmorySearch) || matchre("%surface", "rack")) then {gosub search}
  193. goto BackToKitchen
  194. }
  195.  
  196. Linear:
  197. if matchre("$roomexits", "\b(%validDirections)\b") then {
  198. var direction $1
  199. gosub walk %direction
  200. if matchre("%Reverse", "\b%direction-(\w+)") then {var PathBack $1|}
  201. eval validDirections replacere("%validDirections", "\b%PathBack[0]\|", "")
  202. if (%guard) then {goto BackToKitchen}
  203. if (!(%ArmorySearch) || matchre("%surface", "rack")) then {gosub search}
  204. if (%guard) then {goto BackToKitchen}
  205. }
  206. if matchre("$roomexits", "\b(%validDirections)\b") then {
  207. var direction $1
  208. gosub walk %direction
  209. if matchre("%Reverse", "\b%direction-(\w+)") then {var PathBack %PathBack$1}
  210. math MoveCounter add 1
  211. if (%guard) then {goto BackToKitchen}
  212. if (!(%ArmorySearch) || matchre("%surface", "rack")) then {gosub search}
  213. }
  214.  
  215. BackToKitchen:
  216. gosub walk %PathBack[%MoveCounter]
  217. math MoveCounter subtract 1
  218. if (%MoveCounter >= 0) then {goto BackToKitchen}
  219.  
  220. leave:
  221. match done You take a moment to reflect on the caper you just pulled as you
  222. put go window
  223. matchwait 3
  224. if matchre("$roomobjs", "kitchen window") then {goto leave}
  225. else {goto BackToKitchen}
  226.  
  227. fail:
  228. put #log >SCRIPTCHECK.txt Failed burgling!
  229. stunned:
  230. if ($stunned) then {
  231. eval mytimeout $gametimeupdate + 60
  232. waiteval ($gametimeupdate > %mytimeout) || (!$stunned)
  233. goto stunned
  234. }
  235. put #var BurgleFailed True
  236.  
  237. done:
  238. gosub FoundLoot
  239. put #eval BurgleTime $gametime + 1810
  240. badLoc:
  241. if ("$righthand" = "rope") then {gosub stow my rope}
  242. if ($BurgleLoot!=) then {put #echo >talk #990000 $BurgleLoot}
  243. put set !roomname
  244. waitfor Ok.
  245. if ("$righthand" != "Empty") then {gosub stow right}
  246. if ("$lefthand" != "Empty") then {gosub stow left}
  247. if ("$BurgleFailed" = "True") then {gosub call exit}
  248. if ($SpellTimer.Blend.active) then {gosub release blend}
  249. timer stop
  250. eval seconds round(%t) % 60
  251. if (%seconds < 10) then {var seconds 0%seconds}
  252. eval minutes %t / 60
  253. eval minutes floor(%minutes)
  254. put #echo >User #FF00FF <%SCRIPTNAME: %minutes:%seconds
  255. end:
  256. put #parse ** BURGLE DONE **
  257. exit
  258.  
  259. NotYet:
  260. put #printbox You have not let the heat die down!
  261. goto end
  262.  
  263. #### COMMON SUBROUTINES ####
  264. include commonINC
  265.  
  266. search:
  267. research:
  268. put #echo >talk BURGLE: searching: %surface
  269. if ($roundtime > 0) then {pause $pauseTime}
  270. matchre research \.\.\.wait|^Sorry,|I could not find what you were referring to\.
  271. match return Roundtime
  272. put search %surface
  273. matchwait 7
  274. put #echo #FF6600 DEBUG: search timed out
  275. put #echo >talk #FF6600 [$time]DEBUG: search timed out
  276. return
  277.  
  278. FoundLoot:
  279. if ("$righthand" = "Empty") then {goto checkLeftHand}
  280. gosub portal
  281. var temp $righthand
  282. if matchre("%temp","([\w-']+) \w+( \w+)") then {var temp $1$2}
  283. put #echo >talk #FF0000 BURGLE: found: $righthand
  284. put #var BurgleLoot $BurgleLoot|%temp
  285. if matchre("%temp","memory orb|keepsake box|jewelry box|bolts|arrows|stones") then {
  286. gosub stow my %temp
  287. goto checkLeftHand
  288. }
  289. if matchre("%temp","\b(?:oil|pins)\b") then {
  290. gosub stow my %temp in my $container_crafting in my portal in my eddy
  291. goto checkLeftHand
  292. }
  293. if ("$righthand" != "Empty") then {gosub stow my %temp in my $container_burgle}
  294. checkLeftHand:
  295. if ("$lefthand" = "Empty") then {return}
  296. gosub portal
  297. var temp $lefthand
  298. if matchre("%temp","([\w-']+) \w+( \w+)") then {var temp $1$2}
  299. put #echo >talk #FF0000 BURGLE: found: $lefthand
  300. put #var BurgleLoot $BurgleLoot|%temp
  301. if matchre("%temp","memory orb|keepsake box|jewelry box|bolts|arrows|stones") then {
  302. gosub stow my %temp
  303. return
  304. }
  305. if matchre("%temp","\b(?:oil|pins)\b") then {
  306. gosub stow my %temp in my $container_crafting in my portal
  307. return
  308. }
  309. if ("$leftthand" != "Empty") then {gosub stow my %temp in my $container_burgle}
  310. return
  311.  
  312.  
  313. #### HIDE ####
  314. hide:
  315. if ($roundtime > 0) then {pause $pauseTime}
  316. matchre hide \.\.\.wait|^Sorry,|Are you sure you want to do that\? You'll interrupt your research!
  317. matchre returner You blend in with your surroundings|You're already hidden|You melt into|You look around, but can't see any place to hide yourself\.|^Eh\? But you're already hidden!
  318. put hide
  319. matchwait
  320.  
  321. #### MOVE ####
  322. walk:
  323. var walkVar &0
  324. rewalk:
  325. if ($roundtime > 0) then {pause $pauseTime}
  326. matchre rewalk \.\.\.wait|^Sorry,
  327. match return Obvious
  328. put %walkVar
  329. matchwait
  330.  
  331. ###############
  332. #### This is old code to search the kitchen and the OTHER but not the bedroom
  333. #Branched:
  334. # if matchre("$roomexits","\b(%validDirections)\b, \b(%validDirections)\b\.") then {
  335. # var direction $1
  336. # var otherDirection $2
  337. #
  338. # match bedroom [Someone Else's Home, Bedroom]
  339. # matchre other \[Someone Else's Home, \w+\]
  340. # put peer %direction
  341. # matchwait
  342. #
  343. # other:
  344. # pause 0.1
  345. # gosub walk %direction
  346. # if matchre("%Reverse","\b%direction-(\w+)") then {var PathBack $1}
  347. # gosub search
  348. # goto BackToKitchen
  349. #
  350. # bedroom:
  351. # pause 0.1
  352. # gosub walk %otherDirection
  353. # if matchre("%Reverse","\b%otherDirection-(\w+)") then {var PathBack $1}
  354. # gosub search
  355. # goto BackToKitchen
  356. # }
  357.  
Advertisement
Add Comment
Please, Sign In to add comment