Guest User

Box Card [2] -- OrochiElf

a guest
Mar 18th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. local card_id = {12599, 12731, 12743, 12870, 12871, 12876, 12878, 12880, 12881, 12882, 12883, 12884, 12885, 12886, 12887, 12888, 12892, 12893, 12895, 12897, 12898, 12899, 12900, 12901, 12902, 12905, 12906, 12911, 12913, 12915, 12916, 12921, 12922, 12926, 12930, 12931, 12932, 12939, 12940, 12942, 12979}
  2. local lv = 20
  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