Advertisement
Guest User

Untitled

a guest
Jul 21st, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.22 KB | None | 0 0
  1. quest testevent begin
  2.     state start begin
  3.         when x.chat."start x event" with pc.is_gm() begin
  4.             say_reward(string.format('The current event state is %d',game.get_event_flag('velikonoce')))
  5.             if select('Turn it on','Turn it off') == 1 then
  6.                 game.set_event_flag('velikonoce', 1)
  7.             else
  8.                 game.set_event_flag('velikonoce', 0)
  9.             end
  10.         end
  11.        
  12.         when x.chat."Disable my drop event" begin
  13.             local s = select('Disable the event only for me','Enable the event only for me','Exit')
  14.             if s >= 1 and s <= 2 then
  15.                 pc.setqf("velikonoce",tonumber(s-1))
  16.             else
  17.                 say('cya again')
  18.             end
  19.         end
  20.        
  21.         when kill with pc.getqf("velikonoce") == 1 and not npc.is_pc() and pc.getqf("velikonoce") == 1 begin
  22.             local s = number(1, 1000)
  23.             if s == 1 then
  24.                 game.drop_item(50160,1)
  25.             elseif s == 2 then
  26.                 game.drop_item(50161,1)
  27.             elseif s == 3 then
  28.                 game.drop_item(50162,1)
  29.             elseif s == 4 then
  30.                 game.drop_item(50163,1)
  31.             elseif s == 5 then
  32.                 game.drop_item(50164,1)
  33.             elseif s == 6 then
  34.                 game.drop_item(50165,1)
  35.             elseif s == 7 then
  36.                 game.drop_item(50166,1)
  37.             elseif s == 8 then
  38.                 game.drop_item(50167,1)
  39.             elseif s == 9 then
  40.                 game.drop_item(50168,1)
  41.             elseif s == 10 then
  42.                 game.drop_item(50169,1)
  43.             elseif s == 11 then
  44.                 game.drop_item(50170,1)
  45.             elseif s == 12 then
  46.                 game.drop_item(50171,1)
  47.             elseif s == 13 then
  48.                 game.drop_item(50172,1)
  49.             elseif s == 14 then
  50.                 game.drop_item(50173,1)
  51.             elseif s == 15 then
  52.                 game.drop_item(50174,1)
  53.             elseif s == 16 then
  54.                 game.drop_item(50175,1)
  55.             elseif s == 17 then
  56.                 game.drop_item(50176,1)
  57.             elseif s == 18 then
  58.                 game.drop_item(50177,1)
  59.             elseif s == 19 then
  60.                 game.drop_item(50178,1)
  61.             elseif s == 20 then
  62.                 game.drop_item(50179,1)
  63.             end
  64.         end    
  65.     end
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement