Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. ;################################## Mainloop ####################################
  2. ;######### Do not edit below here unless you know what you are doing! ###########
  3. gosub Init
  4. gosub Tame
  5. ;############################### End of Mainloop ################################
  6.  
  7. ;############################# Taming Subroutines ###############################
  8. sub TAME
  9. set #TARGCURS 1
  10. waitfortarget:
  11. if #TARGCURS = 0
  12. {
  13. set %TameTarget #ltargetid
  14. gosub Taming
  15. }
  16. else
  17. {
  18. goto waitfortarget
  19. }
  20. return
  21.  
  22. sub Taming
  23. TamingLoop:
  24. event macro 13 35
  25. target
  26. set #ltargetkind 1
  27. set #ltargetid %TameTarget
  28. event macro 22 0
  29. set %_timer #scnt + 15
  30. FollowLoop:
  31. finditem %TameTarget
  32. if #findX > #charPosX + 1 || #findX < #charPosX - 1 || #findY > #charPosY + 1
  33. + || #findY < #charPosY - 1
  34. {
  35. event pathfind #findX #findY #findZ
  36. wait 20
  37. }
  38. for %i 5 1
  39. {
  40. scanjournal %i
  41. if YOU_FAIL_TO_TAME in #journal || TOO_FAR_AWAY in #journal
  42. + || %_timer < #scnt
  43. goto TamingLoop
  44. if SEEMS_TO_ACCEPT_YOU in #journal || THAT_WASN'T_EVEN in #journal
  45. {
  46. exevent popup %TameTarget 10
  47. waitForCont:
  48. wait 5
  49. if #contkind <> OXHD
  50. goto waitForCont
  51. set #contposx 0
  52. set #contposy 0
  53. click 30 90 dmc
  54. set %_timer N/A
  55. goto TamingReturn
  56. }
  57. if THAT_ANIMAL_LOOKS_TAME in #journal
  58. {
  59. exevent popup %TameTarget 10
  60. waitForCont2:
  61. wait 5
  62. if #contkind <> OXHD `
  63. goto waitForCont2
  64. set #contposx 0
  65. set #contposy 0
  66. click 30 90 dmc
  67. goto TamingReturn
  68. }
  69. deletejournal
  70. }
  71. goto FollowLoop
  72. TamingReturn:
  73. return
  74.  
  75. ;########################## End of Taming Subroutines ###########################
  76.  
  77. ;############################## Setup Subroutines ###############################
  78. sub Init
  79. initevents
  80. set %_timer N/A
  81. return
  82.  
  83. ;########################## End of Setup Subroutines ############################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement