Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.11 KB | None | 0 0
  1. quest metinologia_080 begin
  2.     state start begin
  3.         when login or levelup with pc.level >= 80 begin
  4.             set_state(wybors)
  5.         end
  6.     end
  7.  
  8.  
  9.     state wybors begin
  10.         when letter begin
  11.             send_letter("Wstęp: Górnictwo I")
  12.         end
  13.  
  14.         when button or info begin
  15.             say_title("Wstęp: Górnictwo I")
  16.             say("Witaj!")
  17.             say("przynieś bla bla")
  18.             say("Powodzenia!")
  19.             set_state(oddawanie)
  20.         end
  21.     end
  22.  
  23.     state oddawanie begin
  24.         when letter begin
  25.             send_letter("Górnictwo I")
  26.             local v = find_npc_by_vnum(30028)
  27.                 if v != 0 then
  28.                     target.vid("__TARGET__", v, "Górnictwo I")
  29.             end
  30.         end
  31.        
  32.         when info or button begin
  33.             if pc.count_item(24002) == 200 and pc.count_item(24003) == 200 then
  34.                 say_title("Górnictwo I:")
  35.                 say("Sprawdzę stan ")
  36.                 say("")
  37.                 pc.removeitem(24002, 200)
  38.                 pc.removeitem(24003, 200)
  39.                 set_state(powrot)
  40.             elseif pc.count_item(24002) <= 199 and pc.count_item(24003) <= 199 then
  41.                 say_title("Górnictwo I:")
  42.                 say("Wróć gdy zdobędziesz wszystkie rudy. ")
  43.                 say("")
  44.                 return
  45.             --  set_state(oddawanie)
  46.             end
  47.         end
  48.     end
  49.  
  50.     state powrot begin
  51.         when letter begin
  52.             send_letter("Metinologia I Łatwa")
  53.             local v = find_npc_by_vnum(30028)
  54.                 if v != 0 then
  55.                     target.vid("__TARGET__", v, "Metinologia I Łatwa")
  56.             end
  57.         end
  58.    
  59.         when info or button begin
  60.             say_title("Metinologia I Łatwa:")
  61.             say("Oto Twoja nagroda: ")
  62.             say("Nagroda 1")
  63.             say("Nagroda 2")
  64.             say("Nagroda 3")
  65.             say("")
  66.             say("")
  67.             say("Gratulacje!!! ")
  68.             pc.give_item2(10,1)
  69.             pc.give_item2(85004,1)
  70.             safe_give_exp(99000000)
  71.             clear_letter()
  72.             --set_quest_state("metinologia_100", "run")
  73.             set_state(__complete)
  74.         end
  75.     end
  76.    
  77.     state __complete begin
  78.    
  79.     end
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement