Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.92 KB | None | 0 0
  1. if game.get_event_flag("nationalon") == 0 then
  2.                                         say_title("Activer National War")
  3.                                         say_reward("Tu veux activer la National War ?")
  4.                                         x = select("Oui", "Non")
  5.                                         if x == 2 then
  6.                                                 return
  7.                                         else
  8.                                                 say_title("Activer la National War")
  9.                                                 say("National War activée..")
  10.                                                 notice_all("La National War a commencé ! Durée de l'event : 1h00")
  11.                                                 notice_all("L'accès à la National War est disponible sur votre anneau de téléportation page 2.")
  12.                                                 game.set_event_flag("nationalon", 1)
  13.                                                 server_timer("nationaloff", 3600)
  14.                                                server_timer("nationalpoints", 600)
  15.                                         end
  16.                                 else
  17.                                         say_title("Désactiver la National War")
  18.                                         say_reward("Tu veux désactiver la National War ?")
  19.                                         z = select("Oui", "Non")
  20.                                         if z == 2 then
  21.                                                 return
  22.                                         else
  23.                                                 say_title("Désactiver National War")
  24.                                                 say("National War désactivés.")
  25.                                                 notice_all("La National War est terminée !")
  26.                                                 game.set_event_flag("nationalon", 0)
  27.                                                 warp_all_to_village(103, 6)
  28.                                                 clear_server_timer("nationalpoints2")
  29.                                                 clear_server_timer("nationaloff")
  30.                                                 clear_server_timer("nationalpoints")
  31.                                         end
  32.                                 end
  33.                         end
  34.                 end
  35.                 when nationalpoints.server_timer begin
  36.                         notice_all("National War nombre de Kills par Empire :")
  37.                         notice_all("Jinno : "..locale.empire_kill[3].." kills  |  Chunjo : "..locale.empire_kill[2].." kills  |  Shinsoo : "..locale.empire_kill[1].." kills")
  38.                         server_timer("nationalpoints2", 600)
  39.                 end
  40.                 when nationalpoints2.server_timer begin
  41.                         notice_all("National War nombre de Kills par Empire :")
  42.                         notice_all("Jinno : "..locale.empire_kill[3].." kills  |  Chunjo : "..locale.empire_kill[2].." kills  |  Shinsoo : "..locale.empire_kill[1].." kills")
  43.                         server_timer("nationalpoints", 600)
  44.                 end
  45.                 when nationaloff.server_timer begin
  46.                         notice_all("La National War est terminée !")
  47.                         warp_all_to_village(103, 6)                    
  48.                         game.set_event_flag("nationalon", 0)
  49.                         clear_server_timer("nationalpoints2")
  50.                         clear_server_timer("nationaloff")
  51.                         clear_server_timer("nationalpoints")
  52.                 end
  53.                 when login or logout with pc.get_map_index() != 103 and game.get_event_flag("nationalon") ==0 begin
  54.                         if (locale.empire_kill[pc.get_empire()] != 0) then
  55.                                 locale.empire_kill[pc.get_empire()] = 0
  56.                         end
  57.                 end
  58.         end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement