Advertisement
Guest User

Untitled

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