Advertisement
sorvani

zone.mac

Mar 12th, 2012
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. #turbo 10
  2.  
  3. Sub Main
  4. /if (${Defined[Param0]}) {
  5. /if (${Param0.Equal[szone]}) {
  6. /if (${Param6.Length}>0) {
  7. /call SayZone "${Param1}" "${Param2} ${Param3} ${Param4} ${Param5} ${Param6}"
  8. } else /if (${Param5.Length}>0) {
  9. /call SayZone "${Param1}" "${Param2} ${Param3} ${Param4} ${Param5}"
  10. } else /if (${Param4.Length}>0) {
  11. /call SayZone "${Param1}" "${Param2} ${Param3} ${Param4}"
  12. } else /if (${Param3.Length}>0) {
  13. /call SayZone "${Param1}" "${Param2} ${Param3}"
  14. } else /if (${Param2.Length}>0) {
  15. /call SayZone "${Param1}" "${Param2}"
  16. }
  17. } else {
  18. /call ClickZone "${Param0}"
  19. }
  20. } else {
  21. /call ClickZone
  22. }
  23. /return
  24.  
  25.  
  26. Sub SayZone(ZonerName,ZoneToPhrase)
  27. /if (${Target.ID}) /squelch /target clear
  28. /if (${Stick.Status.Equal[ON]}) /stick off
  29. /if (${NetAdvPath.Status}==1) /netfollow off
  30. /declare ZonerID int local ${Spawn[npc ${ZonerName}].ID}
  31. /target id ${ZonerID}
  32. /delay 1s ${Target.ID} == ${ZonerID}
  33. /if (${Target.ID} == ${ZonerID}) {
  34. /moveto ID ${Target.ID}
  35. /delay 5s !${MoveTo.Moving}
  36. /say ${ZoneToPhrase}
  37. } else {
  38. /bc I was unable to target ${ZonerName}.
  39. }
  40. /return
  41.  
  42. Sub ClickZone(ZoneToName)
  43. /declare thisdoor string local
  44. /if (${Defined[ZoneToName]}) {
  45. /if (${ZoneToName.Equal[uqua]}) {
  46. /if (${Zone.ShortName.NotEqual[yxtta]}) /return
  47. | the actual statue is NIHALTAR801 but by dropping the 1,
  48. | the character will target whichever one they are next to.
  49. /varset thisdoor NIHALTAR80
  50. } else /if (${ZoneToName.Equal[potactics]} || ${Param0.Equal[tactics]}) {
  51. /if (${Zone.ShortName.NotEqual[potranquility]}) /return
  52. /varset thisdoor TACTICPORT500
  53. } else /if (${ZoneToName.Equal[povalor]} || ${Param0.Equal[valor]}) {
  54. /if (${Zone.ShortName.NotEqual[potranquility]}) /return
  55. | HOH and POVALOR are named backwards in the DB
  56. /varset thisdoor HONORPORT500
  57. } else /if (${ZoneToName.Equal[solrotower]} || ${Param0.Equal[solro]}) {
  58. /if (${Zone.ShortName.NotEqual[potranquility]}) /return
  59. /varset thisdoor SOLROPORT500
  60. } else /if (${ZoneToName.Equal[hohonora]} || ${Param0.Equal[hoh]}) {
  61. /if (${Zone.ShortName.NotEqual[potranquility]}) /return
  62. | HOH and POVALOR are named backwards in the DB
  63. /varset thisdoor VALORPORT500
  64. }
  65. }
  66. /declare OldZoneID int local ${Zone.ID}
  67. /if (${Target.ID}) /squelch /target clear
  68. /if (${Stick.Status.Equal[ON]}) /stick off
  69. /if (${NetAdvPath.Status}==1) /netfollow off
  70. /squelch /doortarget ${thisdoor}
  71. /nomodkey /keypress Insert
  72. :MoveToDoor
  73. /if (${OldZoneID}==${Zone.ID}) {
  74. /if (${DoorTarget.Distance}<75) {
  75. /squelch /face fast door
  76. /nomodkey /keypress u
  77. /if (${DoorTarget.Distance}>=12) {
  78. /nomodkey /keypress forward hold
  79. /delay 1
  80. /nomodkey /keypress forward
  81. } else {
  82. /nomodkey /keypress back hold
  83. /delay 1
  84. /nomodkey /keypress back
  85. }
  86. /nomodkey /keypress Home
  87. /nomodkey /keypress u
  88. /goto :MoveToDoor
  89. } else {
  90. /return
  91. }
  92. }
  93. /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement