Hanryu

herbsteal.cmd

Jun 9th, 2023
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. # If you need herbs, it goes shopping
  2. # You need .herbsort script to set what herbs you need
  3. # You need an herb stacker
  4. #
  5. # written by Hanryu
  6. # Please report any bugs to Hanryu#0052 (Discord) or [email protected]
  7. # This script may be reused in whole or in part as long as credit is given
  8. # This script is designed to use Oulander, http://outlanderapp.com
  9. # 2020-05-07
  10. # Initial release
  11. # 2020-05-20
  12. # Added check to not steal to many things, and if caught abort
  13. # Added check to steal 1 herb each if stealing a lot of herbs so that get them all
  14. #2021-12-08
  15. # remove armor
  16. # Outlander2 conversion
  17. #debug 5
  18.  
  19. #### LOAD VARIABLES ####
  20. #edit this list with what you can steal and stock
  21. if ($zoneid = 1) then {var HerbList aevaes potion,aloe salve,georin salve,hulnik grass,ithor potion,jadice flower,junliar stem,muljin sap,nemoih root,nilos salve,plovik lea,riolur lea,sufil sap,yelith root}
  22. if ($zoneid = 4a) then {var HerbList cebi root,hisan salve}
  23. if ($zoneid = 67) then {var HerbList aevaes potion,aloe salve,cebi root,eghmok potion,georin salve,hisan salve,hulnik grass,ithor potion,jadice flower,junliar stem,muljin sap,nemoih root,nilos salve,plovik lea,riolur lea,sufil sap,yelith root}
  24.  
  25. eval SCRIPTNAME tocaps(%scriptname)
  26. put #echo >User >%SCRIPTNAME: $time
  27. var totaltime $gametime
  28. var herb
  29. var TotalHerbsNeeded 0
  30. var StealCount 0
  31.  
  32. #### Top, Do you need herbs at all? ####
  33. gosub call herbsort
  34. if matchre("$HerbsNeeded", "\$|^$") then {goto done}
  35.  
  36. #### Travel to herb shop, this only works if you are in a town with a shop ####
  37. gosub call travel herb
  38.  
  39. #### What to steal ####
  40. eval HerbsNeeded replacere("$HerbsNeeded", "\|$", "")
  41. eval TotalHerbsNeeded count("$HerbsNeeded", "|")
  42. loop:
  43. if matchre("%HerbList", "(%HerbsNeeded)( \w+)") then {var herb $1$2}
  44. else {goto done}
  45. gosub steal %herb
  46. gosub stow %herb
  47. if (%TotalHerbsNeeded < 5) then {
  48. gosub steal %herb
  49. gosub stow %herb
  50. }
  51. if (%StealCount > 7) then {goto done}
  52. eval HerbList replacere("%HerbList", "%herb", "")
  53. goto loop
  54.  
  55. end:
  56. done:
  57. if (%StealCount > 0) then {gosub call armor normal}
  58. math totaltime subtract $gametime
  59. math totaltime multiply -1
  60. var minutes %totaltime
  61. var seconds %totaltime
  62. math seconds modulus 60
  63. if (%seconds < 10) then {var seconds 0%seconds}
  64. math minutes divide 60
  65. if matchre("%minutes", "(\d+)\.\d*") then {var minutes $1}
  66. put #printbox %SCRIPTNAME took %minutes:%seconds to steal %StealCount herbs
  67. put #echo >user <%SCRIPTNAME: %minutes:%seconds
  68. put #parse ** %SCRIPTNAME DONE **
  69. exit
  70.  
  71. #### LOAD INCLUDES ####
  72. include commonINC
  73.  
Advertisement
Add Comment
Please, Sign In to add comment