Advertisement
vitu52452

Untitled

Nov 19th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. local config = {
  2.  
  3. money = 90000000, -- Dinheiro que vai custar
  4.  
  5. item = 12396, -- ID do item que vai vender
  6.  
  7. count = 1, -- Quantidade
  8.  
  9. }
  10.  
  11.  
  12. function onUse(cid, item, fromPosition, itemEx, toPosition)
  13.  
  14. pos = getCreaturePosition(cid)
  15.  
  16.  
  17. if item.itemid == 1945 then
  18.  
  19. if doPlayerRemoveMoney(cid, config.money) == TRUE then
  20.  
  21. doPlayerAddItem(cid, config.item, config.count)
  22.  
  23. doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Você acaba de comprar "..config.count.." "..getItemNameById(config.item)..".")
  24.  
  25. doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
  26.  
  27. else
  28.  
  29. doCreatureSay(cid, "Você não tem 90kk", TALKTYPE_ORANGE_1)
  30.  
  31. doSendMagicEffect(pos, CONST_ME_POFF)
  32.  
  33. end
  34.  
  35. end
  36.  
  37.  
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement