Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. |--------------------------------------------------------|
  2. |- Searches inventory, and banks, for indicated items. -|
  3. |--------------------------------------------------------|
  4. |- Use, /bc Find 'Name', or, /echo Find 'Name'. -|
  5. |--------------------------------------------------------|
  6. |#EVENT FindItemCount "[#1#] Find Item Count #2#"
  7. |#EVENT FindItemCount "<#1#> Find Item Count #2#"
  8. |#EVENT FindItemCount "<#1#> Find Item Count #2# |/|#*#"
  9. #EVENT FindItemCount "[#1#] Count Item #2#"
  10. |#EVENT FindItemCount "<#1#> Count Item #2#"
  11. |#EVENT FindItemCount "<#1#> Count Item #2#|/|#*#"
  12. #EVENT FindItemCount "<#1#> Count Item #2#"
  13. #EVENT FindItemCount "<#1#> Find Item Count #2#"
  14. |#EVENT FindItemCount "<#1#> Find Item Count #2# |/|#*#"
  15. SUB EVENT_FindItemCount(line, ChatSender, eventParams)
  16. /if (${Debug} || ${Debug_Count}) /echo |- EVENT_FindItemCount ==>
  17. /if (${Debug} || ${Debug_Count}) /echo line: ${line}
  18. /if (${Debug} || ${Debug_Count}) /echo ChatSender: ${ChatSender}
  19. /if (${Debug} || ${Debug_Count}) /echo eventParms: ${eventParams}
  20.  
  21. | -Verify the event
  22. /call verifyEvent "${ChatSender}" "${line}"
  23. /if (${Defined[ChatSender]}) /varset ChatSender ${Macro.Return.Arg[1,_]}
  24. | |-----------Valid User----------| |--------Included Bot-----------|
  25. /if (${Bool[${Macro.Return.Arg[2,_]}]} && ${Bool[${Macro.Return.Arg[3,_]}]}) {
  26.  
  27. | -Declare counting variables.
  28. /declare i int local
  29. /declare e int local
  30. /declare itemName string local
  31. /declare ItemToFind string local ${eventParams.Arg[1,-]}
  32. /declare OnlyInventory bool local FALSE
  33.  
  34.  
  35. /if (${line.Find[/Inventory]}) /varset OnlyInventory TRUE
  36.  
  37. | Remove /only /not /otherthings if needed
  38. /if (${ItemToFind.Find[ /]}) /varset ItemToFind ${ItemToFind.Arg[1, /]}
  39. /if (${ItemToFind.Find[/]}) /varset ItemToFind ${ItemToFind.Arg[1,/]}
  40.  
  41. /if (${Debug} || ${Debug_Count}) /echo ItemToFind: [${ItemToFind}] OnlyInventory: ${OnlyInventory}
  42.  
  43. /if (${FindItemCount[${ItemToFind}]} && ${OnlyInventory} ) {
  44. /docommand ${ChatToggle} >>> Found (${Math.Calc[${FindItemCount[${ItemToFind}]}].Int}) examples of [${ItemToFind}] in the following slots ... <<<
  45. } else /if (${FindItemCount[${ItemToFind}]} || ${FindItemBankCount[${ItemToFind}]} || ${Cursor.Name.Equal[${ItemToFind}]}) {
  46. /docommand ${ChatToggle} >>> Found (${Math.Calc[${FindItemCount[${ItemToFind}]} + ${FindItemBankCount[${ItemToFind}]}].Int}) examples of [${ItemToFind}] in the following slots ... <<<
  47. }
  48. }
  49.  
  50. /if (${Debug} || ${Debug_Count}) /echo <== EVENT_FindItems -|
  51. /RETURN
  52.  
  53. |#event YourKill "You have slain #*#!"
  54. #event MyKill "You gain experience!!"
  55. |#event YourKill "You gain party experience!!"
  56. |#event YourKill "You gained raid experience!"
  57. SUB Event_MyKill
  58. /if (${Debug} || ${Debug_Basics}) /echo ==> Event_YourKill -|
  59.  
  60. |/if (${Me.Pet.ID}) {
  61. | /pet hold
  62. |}
  63. /if ( !${Bool[${Group}]} ) {
  64. /bc I KSed the last mob
  65. }
  66.  
  67. /if (${Debug} || ${Debug_Basics}) /echo <== Event_YourKill -|
  68. /RETURN
  69.  
  70. |#EVENT NOLONGERIDLE "You are no longer idle."
  71. |SUB Event_NOLONGERIDLE
  72. | /removebuff Illusion: /ONLY|ME
  73. |/RETURN
  74.  
  75. #EVENT raid_invite "#1# tells you, 'Raid Invite#2#'"
  76. SUB EVENT_raid_invite(line, ChatSender, eventParams)
  77. /if (${Debug}) /echo |- EVENT_raid_invite ==>
  78. | -Verify the event
  79. /call verifyEvent "${ChatSender}" "${line}"
  80. /varset ChatSender ${Macro.Return.Arg[1,_]}
  81. | |-----------Valid User----------| |--------Included Bot-----------| |-----------In Zone-------------| |------------In Range------------|
  82. |/if (${Bool[${Macro.Return.Arg[2,_]}]} && ${Bool[${Macro.Return.Arg[3,_]}]} && ${Bool[${Macro.Return.Arg[4,_]}]} && ${Bool[${Macro.Return.Arg[5,_]}]}) {
  83. |-----------In Zone-------------|
  84. /if ( ${Bool[${Macro.Return.Arg[4,_]}]} ) {
  85. /bc derp raid invite ${ChatSender}
  86. /raidinvite ${ChatSender}
  87. } else {
  88. /tell ${ChatSender} We aren't in the same zone.
  89. }
  90. /if (${Debug}) /echo <== EVENT_raid_invite -|
  91. /return
  92.  
  93. #EVENT SERVER_REBOOT "#1#BROADCASTS, 'The server will be rebooting in 10 minutes. Please get to a safe location.#*#"
  94. SUB EVENT_SERVER_REBOOT(line, ChatSender, eventParms)
  95.  
  96. /if (${Zone.ID} == 344 || ${Zone.ID} == 151 ) {
  97. /echo ${ChatSender} issued a server reboot. Camping toons out.
  98. /camp desk
  99. /end
  100. }
  101. /RETURN
  102.  
  103. #event report_aas "#1# REPORT AAS#*#"
  104. sub event_report_aas(line, ChatSender, eventParms)
  105.  
  106. | /declare myArray[26] local
  107. |/call #CreateArrays string outer CharInfoWithLesson[${counter}] CharInfoNoLesson[${Math.Calc[${ExpCharInfo.Size}-${counter}]}]
  108. |/call #CreateArrays string outer myArray[26]
  109. /call #CreateArrays string outer myArray[${Math.Calc[${NetBots.Client.Count[ ]}+1]}]
  110. /echo ${NetBots.Client}
  111. /echo ${Math.Calc[${NetBots.Client.Count[ ]}+1]}
  112. /declare i int
  113. /for i 1 to ${Math.Calc[1+${NetBots.Client.Count[ ]}]}
  114. |/echo ${NetBots.Client.Arg[${i}, ]}: ${NetBots[${NetBots.Client.Arg[${i}, ]}].TotalAA} - ${NetBots[${NetBots.Client.Arg[${i}, ]}].UsedAA} - ${NetBots[${NetBots.Client.Arg[${i}, ]}].UnusedAA}
  115. |/declare myArray[${i}]
  116. /varset myArray[${i}] ${NetBots.Client.Arg[${i}, ]}|${NetBots[${NetBots.Client.Arg[${i}, ]}].TotalAA}|${NetBots[${NetBots.Client.Arg[${i}, ]}].UsedAA}|${NetBots[${NetBots.Client.Arg[${i}, ]}].UnusedAA}
  117. /next i
  118.  
  119. /call #QuickSort myArray 1 ${myArray.Size} .Arg[2,|]
  120.  
  121. /for i ${myArray.Size} downto 1
  122. /echo ${myArray[${i}]}
  123. /next i
  124. /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement