daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /////////////////////////////////////////////
  2. // UO Steam Recall Skill Buff Trainer
  3. // for Outlands
  4. // by Jewele
  5. //
  6. // !MINOC SYNDICATE ONLY!
  7. //
  8. // Recalls you to a marked location to kill a bird,
  9. // back to a marked training spot, trains, and
  10. // when needed, recalls you to a marked bank rune
  11. // to restock scriptregs.
  12. //
  13. // How to use?
  14. // -----------
  15. // 1) Mark a rune at a bank
  16. // 2) Mark a rune at a bird spawn
  17. // 3) Mark a rune at anacondas at Prevalia Zoo
  18. // 4) Place all 3 runes in your backpack
  19. // 5) Start at -bank-, with banker in sight
  20. // 6) Run script
  21. //
  22. // Version 1.0
  23. // -----------
  24. // First release! yay!
  25. //
  26. // Version 1.1
  27. // -----------
  28. // Added cancel target after trying to kill a bird
  29. //
  30. // Version 1.2
  31. // -----------
  32. // Will ignore a bird it cant kill
  33. //
  34. // Version 1.3
  35. // -----------
  36. // Clears target before spellcast
  37. //
  38. // Version 1.4
  39. // -----------
  40. // Added guards against server save issue
  41. //
  42. // Version 1.5
  43. // -----------
  44. // Bumped recall regs up to 50 from 10
  45. // Added double request for bank
  46. //
  47. // Version 1.6
  48. // -----------
  49. // Will now check bird flag before killing
  50. //
  51. // Version 1.7
  52. // -----------
  53. // Precasts Lightning when killing birds
  54. //
  55. // Version 1.8
  56. // -----------
  57. // Targets anacondas at zoo, rock guars where hopping
  58. //   fence and getting you killed.
  59. // Switched target to find by type as the serial #
  60. //   is prone to changing.
  61. //
  62. // UOSTEAM COPY-PASTE BELOW THIS LINE
  63. /////////////////////////////////////////////
  64. sysmsg "Buff Trainer Script - Flamestrike" 88
  65. sysmsg "Version 1.8" 88
  66. @useobject 'backpack'
  67. pause 1000
  68. if not findalias 'bankrune'
  69.   sysmsg "Select rune for bank access" 88
  70.   promptalias 'bankrune'
  71. endif
  72. if not findalias 'birdrune'
  73.   sysmsg "Select rune for bird killing" 88
  74.   promptalias 'birdrune'
  75. endif
  76. if not findalias 'trainrune'
  77.   sysmsg "Select rune for training location" 88
  78.   promptalias 'trainrune'
  79. endif
  80. if not findalias 'bankbag'
  81.   msg "bank"
  82.   pause 1000
  83.   sysmsg "Select a bag with reagents in your bank" 88
  84.   promptalias 'bankbag'
  85. endif
  86. if not findalias 'banker'
  87.   sysmsg "Select the banker at your bank" 88
  88.   promptalias 'banker'
  89. endif
  90. //
  91. // Actions list
  92. //
  93. @removelist 'actions'
  94. @createlist 'actions'
  95. pushlist 'actions' 'restock'
  96. //
  97. // Script Regs (stocks 10)
  98. //
  99. @removelist 'scriptregs'
  100. @createlist 'scriptregs'
  101. pushlist 'scriptregs' 0xf7a // pearl
  102. pushlist 'scriptregs' 0xf7b // moss
  103. pushlist 'scriptregs' 0xf86 // root
  104. pushlist 'scriptregs' 0xf8c // ash
  105. //
  106. // Train Regs (stocks 200)
  107. //
  108. @removelist 'trainregs'
  109. @createlist 'trainregs'
  110. pushlist 'trainregs' 0xf8c // ash
  111. pushlist 'trainregs' 0xf8d // silk
  112. msg "bank"
  113. pause 1000
  114. msg "bank"
  115. pause 1000
  116. while not dead
  117.   //
  118.   // Reg check
  119.   //
  120.   if not @inlist! 'actions' 'restock'
  121.     // script regs
  122.     for 0 to 'scriptregs'
  123.       if @counttype scriptregs[] 'any' 'backpack' < 5
  124.         @clearlist 'actions'
  125.         pushlist 'actions' 'restock'
  126.         continue
  127.       endif
  128.     endfor
  129.     // train regs
  130.     for 0 to 'trainregs'
  131.       if @counttype trainregs[] 'any' 'backpack' < 10
  132.         @clearlist 'actions'
  133.         pushlist 'actions' 'restock'
  134.         continue
  135.       endif
  136.     endfor
  137.   endif
  138.   //
  139.   // Restock regs
  140.   //
  141.   if @inlist! 'actions' 'restock'
  142.     sysmsg "Checking / restocking regs" 88
  143.     pause 200
  144.     @clearlist 'actions'
  145.     // check if we are at bank
  146.     if not inrange 'banker' 30
  147.       // mana to recall
  148.       while mana < 15
  149.         useskill 'meditation'
  150.         pause 6000
  151.       endwhile
  152.       // recall
  153.       @canceltarget
  154.       cast "Recall"
  155.       waitfortarget 5000
  156.       target! 'bankrune'
  157.       pause 2000
  158.     endif
  159.     // check if we are at bank
  160.     if @inrange 'banker' 30
  161.       resync
  162.       msg "bank"
  163.       pause 1000
  164.       msg "bank"
  165.       pause 1000
  166.       useobject 'bankbag'
  167.       pause 2000
  168.       //
  169.       // Reg restocking is extremely unreliable!
  170.       //
  171.       for 0 to 'scriptregs'
  172.         removetimer 'restock'
  173.         createtimer 'restock'
  174.         while counttype scriptregs[] 'any' 'backpack' < 50
  175.           sysmsg "restocking reagent" 44
  176.           movetype scriptregs[] 'bankbag' 'backpack' 0 0 0 'any' 50
  177.           pause 1500
  178.           if timer 'restock' > 30000
  179.             sysmsg "I cannot restock the script regs" 44
  180.             stop
  181.           endif
  182.         endwhile
  183.       endfor
  184.       for 0 to 'trainregs'
  185.         removetimer 'restock'
  186.         createtimer 'restock'
  187.         while counttype trainregs[] 'any' 'backpack' < 200
  188.           sysmsg "restocking reagent" 44
  189.           movetype trainregs[] 'bankbag' 'backpack' 0 0 0 'any' 200
  190.           pause 1500
  191.           if timer 'restock' > 30000
  192.             sysmsg "I cannot restock the train regs" 44
  193.             stop
  194.           endif
  195.         endwhile
  196.       endfor
  197.       pushlist 'actions' 'recalltrain'
  198.       continue
  199.     else
  200.       sysmsg "ERROR : Either start at bank or start with scriptregs in pack to recall to bank" 88
  201.       stop
  202.     endif
  203.   endif
  204.   //
  205.   // Buff check
  206.   //
  207.   if not @inlist! 'actions' 'buff'
  208.     if not buffexists 'Arcane Empowerment'
  209.       @clearlist 'actions'
  210.       pushlist 'actions' 'buff'
  211.       continue
  212.     endif
  213.   endif
  214.   //
  215.   // Get buff
  216.   //
  217.   if @inlist! 'actions' 'buff'
  218.     sysmsg "Getting skill buff" 88
  219.     pause 200
  220.     @clearlist 'actions'
  221.     // mana to recall
  222.     while mana < 15
  223.       useskill 'meditation'
  224.       pause 6000
  225.     endwhile
  226.     // recall
  227.     @canceltarget
  228.     cast "Recall"
  229.     waitfortarget 5000
  230.     target! 'birdrune'
  231.     pause 2000
  232.     // mana to cast lightning
  233.     while mana < 15
  234.       useskill 'meditation'
  235.       pause 6000
  236.     endwhile
  237.     // get buff
  238.     while not buffexists 'Arcane Empowerment'
  239.       sysmsg "Looking for a bird to kill"
  240.       removelist 'birds'
  241.       createlist 'birds'
  242.       pushlist 'birds' '0x6'
  243.       @canceltarget
  244.       cast 'Lightning'
  245.       waitfortarget 5000
  246.       while @targetexists
  247.         for 0 to 'birds'
  248.           if @findtype birds[] 'any' 'ground' 12
  249.             target! 'found'
  250.             @ignoreobject 'found'
  251.           endif
  252.           pause 100
  253.         endfor
  254.       endwhile
  255.       pause 2000
  256.     endwhile
  257.     // mana to recall
  258.     while mana < 15
  259.       useskill 'meditation'
  260.       pause 6000
  261.     endwhile
  262.     @pushlist 'actions' 'recalltrain'
  263.     continue
  264.   endif
  265.   //
  266.   // Recall train
  267.   //
  268.   if @inlist! 'actions' 'recalltrain'
  269.     sysmsg "Heading to training spot" 88
  270.     pause 200
  271.     @clearlist 'actions'
  272.     // mana to recall
  273.     while mana < 15
  274.       useskill 'meditation'
  275.       pause 6000
  276.     endwhile
  277.     // recall
  278.     @canceltarget
  279.     cast "Recall"
  280.     waitfortarget 5000
  281.     target! 'trainrune'
  282.     pause 2000
  283.     pushlist 'actions' 'train'
  284.     continue
  285.   endif
  286.   //
  287.   // Train
  288.   //
  289.   if @inlist! 'actions' 'train'
  290.     pause 200
  291.     @clearlist 'actions'
  292.     //
  293.     // INSERT TRAINING SEQUENCE HERE
  294.     //
  295.     // START >
  296.     if mana < 40
  297.       useskill 'meditation'
  298.       pause 11000
  299.     endif
  300.     if mana > 40 and hits > 60
  301.       @canceltarget
  302.       cast "Flame Strike"
  303.       waitfortarget 5000
  304.       target! 'self'
  305.     endif
  306.     if hits < 60
  307.       if not timerexists 'Bandage Timer'
  308.         createtimer 'Bandage Timer'
  309.         settimer 'Bandage Timer' 20000
  310.       endif
  311.       // Check the bandage timer to see if enough time has elapsed
  312.       if timer 'Bandage Timer' < 20000
  313.         // Small delay to slow down the loop. 100 milliseconds means we will not miss
  314.         // a bandage.
  315.         pause 100
  316.         // We need to wait for our current bandage to finish so start the while
  317.         // loop from the beginning
  318.         continue
  319.       endif
  320.       // If we are poisoned or don't have full health
  321.       if poisoned 'self' or hits < maxhits
  322.         // Enough time has elapsed lets apply a bandage.
  323.         bandageself
  324.         // Reset the timer.
  325.         settimer 'Bandage Timer' 0
  326.       endif
  327.     endif
  328.     msg "guards"
  329.     // < END
  330.     pushlist 'actions' 'train'
  331.   endif
  332.   pause 200
  333.   //
  334.   // Server save fix
  335.   //
  336.   pushlist 'actions' 'train'
  337. endwhile
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top