Guest User

Box Card [1] -- OrochiElf

a guest
Mar 18th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. local card_id = {12599, 12873, 12874, 12875, 12877, 12889, 12890, 12891, 12894, 12896, 12903, 12904, 12907, 12909, 12910, 12912, 12914, 12917, 12918, 12919, 12920, 12923, 12924, 12925, 12927, 12928, 12929, 12933, 12934, 12935, 12936, 12937, 12938, 12941, 12943, 12944} -- joga os id dos card aqui
  2. local lv = 10
  3. function onUse(cid, item, frompos, item2, topos)
  4. if getPlayerLevel(cid) >= lv then
  5. local rand = card_id[math.random(1, #card_id)]
  6.  
  7. doPlayerAddItem(cid, rand)
  8. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You opened the Addon Box Type: strong. And came ["..getItemNameById(rand).."]")
  9. doRemoveItem(item.uid, 1)
  10. else
  11.  
  12. doPlayerSendCancel(cid,"You must be at least level "..lv)
  13. end
  14. return true
  15. end
Advertisement
Add Comment
Please, Sign In to add comment