Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- // Bind to onChat and onSendChatMessage
- STRIP(&chat,%CHAT%)
- IF(%KEYNAME%="onSendChatMessage")
- IFMATCHES(%&chat%,"^/trade")
- IFMATCHES(%&chat%,"^/trade (.*) ([0-9]+)")
- MATCH(%&chat%,"^/trade (.*) ([0-9]+)",{@&price,@#amount})
- FILTER();
- SET(@getiteminfo,1)
- ECHO(/dura)
- ELSE
- LOG(&6[&4Trade Signs&6] &aHold the item you want to sell)
- LOG(&6[&4Trade Signs&6] &aUsage: /trade <price> <amount>)
- LOG(&6[&4Trade Signs&6] &aYou must have a trade sign in your hotbar.)
- ENDIF
- FILTER
- ENDIF
- ELSE
- IFMATCHES(%@getiteminfo%,1)
- STRIP(&chat,%CHAT%)
- IFMATCHES(%&chat%,"^Item:(.*) - ([0-9]+):([0-9]+)")
- MATCH(%&chat%,"^Item:(.*) - ([0-9]+):([0-9]+)",{&crap,#itemid,#itemdam})
- SET(@getiteminfo,0)
- IF(%#itemdam% != 0)
- SET(&itemid,"%#itemid%,%#itemdam%")
- ELSE
- SET(&itemid,"%#itemid%")
- ENDIF
- PLACESIGN("[Trade]","%@&price%","%@#amount% %&itemid%:%@#amount%","",1)
- ENDIF
- ENDIF
- ENDIF
- }$$
Advertisement
Add Comment
Please, Sign In to add comment