priMELval

trade sign macro

Oct 22nd, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. $${
  2.  
  3. // Bind to onChat and onSendChatMessage
  4.  
  5. STRIP(&chat,%CHAT%)
  6. IF(%KEYNAME%="onSendChatMessage")
  7. IFMATCHES(%&chat%,"^/trade")
  8. IFMATCHES(%&chat%,"^/trade (.*) ([0-9]+)")
  9. MATCH(%&chat%,"^/trade (.*) ([0-9]+)",{@&price,@#amount})
  10. FILTER();
  11. SET(@getiteminfo,1)
  12. ECHO(/dura)
  13. ELSE
  14. LOG(&6[&4Trade Signs&6] &aHold the item you want to sell)
  15. LOG(&6[&4Trade Signs&6] &aUsage: /trade <price> <amount>)
  16. LOG(&6[&4Trade Signs&6] &aYou must have a trade sign in your hotbar.)
  17. ENDIF
  18. FILTER
  19. ENDIF
  20. ELSE
  21. IFMATCHES(%@getiteminfo%,1)
  22. STRIP(&chat,%CHAT%)
  23. IFMATCHES(%&chat%,"^Item:(.*) - ([0-9]+):([0-9]+)")
  24. MATCH(%&chat%,"^Item:(.*) - ([0-9]+):([0-9]+)",{&crap,#itemid,#itemdam})
  25. SET(@getiteminfo,0)
  26. IF(%#itemdam% != 0)
  27. SET(&itemid,"%#itemid%,%#itemdam%")
  28. ELSE
  29. SET(&itemid,"%#itemid%")
  30. ENDIF
  31.  
  32. PLACESIGN("[Trade]","%@&price%","%@#amount% %&itemid%:%@#amount%","",1)
  33. ENDIF
  34. ENDIF
  35. ENDIF
  36. }$$
Advertisement
Add Comment
Please, Sign In to add comment