PHP Code:
--------------------------------------------------------------
--- For Epvp
--- Erza²
--- Automatic Ox Event
--------------------------------------------------------------
quest automaticoxevent begin
state start begin
-- Dialogue with Uriel
when 20011.chat."GM: Automatic Ox Event" with pc.is_gm() and pc.get_name() == "Erza" begin
say_title(mob_name(npc.get_race())..":")
say("")
say("Do you want to open the Ox Event? ")
say("")
local s = select(locale.yes,locale.no)
if(s == 2) then return end
say_title(mob_name(npc.get_race())..":")
say("")
say("Ox opened the event!. ")
say("Please wait. ")
server_timer("countdown",10)
game.set_event_flag("automatic_oxevent_status",1)
end
--- Start Countdown !.
when countdown.server_timer begin
if(game.get_event_flag("automatic_oxevent_status") == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
else
notice_all("<Automatic-OxEvent> Ox opened the event!. ")
notice_all("<Automatic-OxEvent> 5 Minutes the countdown has begun and Entries will be closed at the end of 5 minutes.. ")
server_timer("countdownone",60)
end
end
--- CountDown 2
when countdownone.server_timer begin
if(game.get_event_flag("automatic_oxevent_status") == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event !. ")
else
notice_all("<Automatic-OxEvent> Ox closing entries : 4 minutes left")
server_timer("countdowntwo",60)
end
end
--- CountDown 3
when countdowntwo.server_timer begin
if(game.get_event_flag("automatic_oxevent_status") == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event !. ")
else
notice_all("<Automatic-OxEvent> Ox closing entries : 3 minutes left")
server_timer("countdownthre",60)
end
end
--- CountDown 4
when countdownthre.server_timer begin
if(game.get_event_flag("automatic_oxevent_status") == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
else
notice_all("<Automatic-OxEvent> Ox closing entries : 2 minutes left")
server_timer("countdownfour",60)
end
end
--- CountDown 5
when countdownfour.server_timer begin
if(game.get_event_flag("automatic_oxevent_status") == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
else
notice_all("<Automatic-OxEvent> Ox closing entries : 1 minutes left")
server_timer("countdownfive",60)
end
end
--- Countdown 6
when countdownfive.server_timer begin
if(game.get_event_flag("automatic_oxevent_status") == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
else
notice_all("<Automatic-OxEvent> Ox entries closed. ")
notice_all("<Automatic-OxEvent> Join as a spectator!. ")
server_timer("playercheck",5)
game.set_event_flag("automatic_oxevent_status",2)
end
end
--- Player Check
when playercheck.server_timer begin
if(oxevent.get_attender() == 0) then
notice_all("<Automatic-OxEvent> Event is closed because ; There's no one inside.. ")
game.set_event_flag("automatic_oxevent_status",0)
else
server_timer("startox",5)
end
end
--- Start Ox Event
when startox.server_timer begin
setskin(NOWINDOW)
quiz = oxevent.quiz(1,30)
if(quiz == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
game.set_event_flag("automatic_oxevent_status",0)
warp_all_to_village()
elseif(quiz == 1) then
if(oxevent.get_attender() == 1) then
game.set_event_flag("automatic_oxevent_status",0)
notice_all("<Automatic-OxEvent> Event is over. See you soon ")
warp_all_to_village()
else
server_timer("startoxone",40)
end
else
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
game.set_event_flag("automatic_oxevent_status",0)
warp_all_to_village()
end
end
--- Start Ox 1
when startoxone.server_timer begin
setskin(NOWINDOW)
quiz = oxevent.quiz(1,30)
if(quiz == 0) then
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
game.set_event_flag("automatic_oxevent_status",0)
warp_all_to_village()
elseif(quiz == 1) then
if(oxevent.get_attender() == 1) then
game.set_event_flag("automatic_oxevent_status",0)
notice_all("<Automatic-OxEvent> Event is over. See you soon ")
warp_all_to_village()
else
server_timer("startox",40)
end
else
notice_all("an unexpected error occurred")
notice_all("closing event!. ")
game.set_event_flag("automatic_oxevent_status",0)
warp_all_to_village()
end
end
when 20011.chat."Ox Event !. " begin
say_title(mob_name(npc.get_race())..":")
say("")
---
if(game.get_event_flag("automatic_oxevent_status") == 1) then
say("Do you want to enter the effectiveness of the Ox")
say("")
local s = select(locale.yes,locale.no)
if(s == 2) then return end
pc.warp(896500, 24600)
elseif(game.get_event_flag("automatic_oxevent_status") == 2) then
say("Do you want to enter the effectiveness of the Ox")
say("")
local s = select(locale.yes,locale.no)
if(s == 2) then return end
pc.warp(896300, 28900)
elseif(game.get_event_flag("automatic_oxevent_status") == 0) then
say("The effectiveness of the Ox now closed")
say("")
end
end
end
end
- There is no time
- If you can't --> Send Private Message
King Regards
Mfg Erza²







