Advertisement
Guest User

quest.lua

a guest
Jul 17th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. ---> Codes by: OrochiElf [www.OTCodes.com] <---
  2.  
  3. local configs = {
  4. Quest_Storage = 19822,
  5.  
  6. Quest_Reward = 2160,
  7. Ammount_Quest_Reward = 10,
  8.  
  9. Need_Item = 2152,
  10. Ammount_Need_Item = 1,
  11. }
  12.  
  13. function onUse(cid)
  14. if getPlayerStorageValue(cid, configs.Quest_Storage) < 1 then
  15. if(doPlayerRemoveItem(cid, configs.Need_Item, configs.Ammount_Need_Item)) then
  16.  
  17. doPlayerAddItem(cid, configs.Quest_Reward, configs.Ammount_Quest_Reward)
  18. doPlayerSendTextMessage(cid, 27, "You have found "..configs.Quest_Reward.." "..configs.Ammount_Quest_Reward)
  19. setPlayerStorageValue(cid, configs.Quest_Storage, 1)
  20. return true
  21. else
  22.  
  23. doPlayerSendTextMessage(cid, 27, "You need "..configs.Ammount_Need_Item.." "..configs.Need_Item)
  24. return true
  25. end
  26.  
  27. doPlayerSendTextMessage(cid, 27, "This chest are empty.")
  28. return true
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement