Advertisement
Hanryu

turnbook.cmd

Sep 26th, 2024
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. # TurnBook script
  2. #
  3. # Usage
  4. # .turnbook (item)
  5. # .turnbook help
  6. #
  7. #
  8. # written by Hanryu
  9. # Please report any bugs to Hanryu#0052 (Discord) or [email protected]
  10. # This script may be reused in whole or in part as long as credit is given
  11. # This script is designed to use Outlander, http://outlanderapp.com
  12. #2020-10-01
  13. # removeing pauses and cleaning up ...wait handling
  14. # setup to handle all crafting turnbooking
  15. #2020-11-14
  16. # leather handles and cords for shields
  17. #2020-12-01
  18. # leather handles and cords for shields
  19. #2021-03-16
  20. # lazily hard coding thin sewing needles because I don't want to deal with it
  21. #2022-01-03
  22. # Did some adjustment for O2
  23. #debug 5
  24.  
  25. if matchre("%0", "help|HELP|Help|^$") then {
  26. printbox .turnbook Brigandine scale aventail; You need to specify an item to turn the book to.; OR you need to have a script set up and track the global variable $workorder
  27. goto end
  28. }
  29.  
  30. start:
  31. var chapter %1
  32. shift
  33. var item %0
  34. if matchre(%chapter, \d) then {goto rechapter}
  35.  
  36. turn:
  37. if ($roundtime > 0) then {pause $pauseTime}
  38. if (($webbed) || ($stunned)) then {pause 0.1}
  39. matchre turn ^\.\.\.wait|^Sorry,|^You are still stun|^You can't do that while entangled
  40. matchre chapter (?i)Chapter (\d+): .*%chapter
  41. put turn my book to index
  42. put read my book
  43. matchwait
  44. chapter:
  45. var chapter $1
  46. rechapter:
  47. if ($roundtime > 0) then {pause $pauseTime}
  48. if (($webbed) || ($stunned)) then {pause 0.1}
  49. matchre rechapter ^\.\.\.wait|^Sorry,|^You are still stun|^You can't do that while entangled
  50. # matchre page Page (\d+): some %item
  51. matchre page Page (\d+): (?:some |an? )?%item
  52. # matchre page Page (\d+): (?:some |an? )?(?:thin )%item
  53. matchre page Page (\d+): (?:some |an? )?(?:wood |metal |leather )?%item
  54. # matchre page Page (\d+): (?:some |an? )?%adjective (?:cloth )%item
  55. # matchre page Page (\d+): (?:some |an? )?%adjective (?:leather )%item
  56. # matchre page Page (\d+): (?:some |an? )?%adjective (?:leather |cloth )%2
  57. matchre page Page (\d+): (?:some |an? )?%1 (?:leather |cloth )%2
  58. put turn my book to chapter %chapter
  59. put read my book
  60. matchwait
  61. page:
  62. var page $1
  63. repage:
  64. if ($roundtime > 0) then {pause $pauseTime}
  65. if (($webbed) || ($stunned)) then {pause 0.1}
  66. matchre repage ^\.\.\.wait|^Sorry,|^You are still stun|^You can't do that while entangled
  67. match done You turn your book to page
  68. match done You are already on page
  69. put turn my book to page %page
  70. matchwait
  71. done:
  72. put #parse ** TURNBOOK DONE **
  73. end:
  74. exit
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement