Advertisement
Guest User

Npc Item

a guest
Jan 10th, 2015
801
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. --**Quest by Luzzo
  2. --**Data: 10/01/2015
  3.  
  4. quest npc_item begin
  5.     state start begin
  6.         when 9003.chat."Npc Item" begin
  7.        
  8.             local item_list = {19,19,19,19,19,19}
  9.             local prezzo = 5000000
  10.            
  11.             say_title("Npc Item")
  12.             say("Avventuriero puoi comprare item")
  13.             say("ad un prezzo stracciato.")
  14.             say("L'oggetto sara' random.")
  15.             say_reward("Vuoi tentare l'azzardo?")
  16.             if select("Si","No Grazie") == 2 then
  17.                 return
  18.             end
  19.             if pc.get_gold() >= prezzo then
  20.                 pc.changegold(-prezzo)
  21.                 pc.give_item2(item_list[number(1,table.getn(item_list))],1)
  22.                 return
  23.             else
  24.                 syschat("Non possiedi abbastanza yang.")
  25.                 return
  26.             end
  27.         end
  28.     end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement