Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- // Save as count.txt
- // Bind to onSendChatMessage
- IF(%KEYNAME%="onSendChatMessage")
- IFMATCHES(%CHAT%,"^/count$")
- EXEC(count.txt)
- FILTER
- ENDIF
- ELSE
- MATCH(%ITEMIDDMG%,"(.*):([0-9]+)",{&item,#dmg})
- UNSET(#totalamount)
- UNSAFE(0)
- GUI(INVENTORY)
- FOR(#slotnum,9,45)
- GETSLOTITEM(%#slotnum%,&itema,#amount,#dmga)
- IF((%&itema%==%&item%) && ((%#dmga%==%&dmg%)
- INC(#totalamount,%#amount%)
- ENDIF
- NEXT
- GUI()
- LOG(&eYou have %#totalamount% %ITEMNAME%)
- ENDUNSAFE
- ENDIF
- }$$
Advertisement
Add Comment
Please, Sign In to add comment