--[[ -- Automatic OX-Event System -- Quest Writer By : HaveBeen™ -- Thank for help -TÜRK- xD -- For E*PVP ]]-- quest oxevents begin state start begin
function open() if(oxevent.open() == 0) then return 0 elseif(oxevent.open() == 1) then return 1 else return 2 end end
function quiz() if(oxevent.quiz(1,30) == 0) then return 0 elseif(oxevent.quiz(1,30) == 1) then return 1 else return 2 end end
function check() local gmlist = {"HaveBeen"} -- Enter the names of GameMaster for i = 1,table.getn(gmlist),1 do if(gmlist[i] == pc.name) then return true else return false end end end
when 20011.chat."GM: Ox Event" with pc.is_gm() and oxevents.check() == true and game.get_event_flag("automatic_oxevent_status") == 0 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_reward("Note : Actual Ox Event Time (H) : "..os.date("%H")) say("") say("How much do you want to open Ox Event?")
local times = tonumber(input())
if(times == "" or tonumber(times) == nil) then return end game.set_event_flag("automatic_oxevent_opentime",times)
say_title(mob_name(npc.get_race())..":") say("")
--- say("Thank you the system has been activated! ") say("Open after "..times.." hours! ") game.set_event_flag("automatic_oxevent_status",1) server_timer('check',5) end
when check.server_timer begin if(os.date("%H") == game.get_event_flag("automatic_oxevent_opentime")) then if(oxevents.open() == 0) then print("The competition is already active! ") elseif(oxevents.open() == 1) then notice_all("<Notice> Ox-Event is opened! ") notice_all("<Notice> Show your knowledge.. ") server_timer('countdownone',300) else print("An Error has occurred.. ") end else server_timer('checktwo',5) end end
when checktwo.server_timer begin if(os.date("%H") == game.get_event_flag("automatic_oxevent_opentime")) then if(oxevents.open() == 0) then print("The competition is already active! ") elseif(oxevents.open() == 1) then notice_all("<Notice> Ox-Event is opened! ") notice_all("<Notice> Show your knowledge.. ") server_timer('countdownone',300) else print("An Error has occurred.. ") end else server_timer('check',5) end end
when countdownone.server_timer begin notice_all("<Notice> Closing Ox-Event Entries : 5 mins left.. ") server_timer("countdowntwo",60) end
when countdowntwo.server_timer begin notice_all("<Notice> Closing Ox-Event Entries : 4 mins left.. ") server_timer("countdownthree",60) end
when countdownthree.server_timer begin notice_all("<Notice> Closing Ox-Event Entries : 3 mins left.. ") server_timer("countdownfour",60) end
when countdownfour.server_timer begin notice_all("<Notice> Closing Ox-Event Entries : 2 mins left.. ") server_timer("countdownfive",60) end
when countdownfive.server_timer begin notice_all("<Notice< Closing Ox-Event Entries : 1 mins left.. ") server_timer("countdown",60) end
when countdown.server_timer begin notice_all("<Ox-Event> All Ox-Event entries are closed. ") notice_all("<Ox-Event> No longer you can enter as a competitor. ") notice_all("<Ox-Event> Now you can enter only as a spectator. ") game.set_event_flag("automatic_oxevent_status",2) server_timer('playercheck',10) game.set_event_flag("automatic_oxevent_opentime",0) end
when playercheck.server_timer begin if(pc.get_map_index() == 113) then if(oxevent.get_attender() == 0) then notice_all("<Ox-Event> There is no one in the Ox-Event. ") notice_all("<Ox-Event> Ox-Event is automatically closing. ") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() else server_timer('oxeventstart',10) end end end
when oxeventstart.server_timer begin if(pc.get_map_index() == 113) then if(oxevents.quiz() == 0) then print("Ox-Event stopped! ") elseif(oxevents.quiz() == 1) then notice_in_map("A question asked.") server_timer("goon",30) else print("A question has already been asked. ") end else return end end
when goon.server_timer begin -- Check if(oxevent.get_attender() == 0) then notice_in_map("There is no one in the Ox-Event. ") notice_in_map("Ox-Event is ended automatically. ") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() elseif(oxevent.get_attender() == 1) then notice_in_map("Ox-Event is successfully finished. ") notice_in_map("The last remaining player are awarded. ") local itemlist = {11299,11499,11699,11899} game.drop_item(itemlist[number(1,table.getn(itemlist))],1) game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) server_timer("over",20) else server_timer("goontwo",30) end end
when over.server_timer begin warp_all_to_village() end
when goontwo.server_timer begin -- Check if(oxevent.get_attender() == 0) then notice_in_map("There is no one in the Ox-Event. ") notice_in_map("Ox-Event is ended automatically. ") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() elseif(oxevent.get_attender() == 1) then notice_in_map("Ox-Event is successfully finished. ") notice_in_map("The last remaining player are awarded. ") local itemlist = {11299,11499,11699,11899} game.drop_item(itemlist[number(1,table.getn(itemlist))],1) game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) server_timer("over",20) else server_timer("goon",30) end end
when 20011.chat."Ox-Event" begin if(game.get_event_flag("automatic_oxevent_status") == 2) then say("All entries are closed. ") say("Now you can go only as a spectator. ") 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") == 1) then say("Now all Ox-Event entries are open. ") say("Do you want to go as a competitor? ")
local s = select("Yes, As A Competitor.","No, As A Spectator.")
if(s == 1) then pc.warp(896500, 24600) elseif(s == 3) then pc.warp(896300, 28900) end end end end end
function open() if(oxevent.open() == 0) then return 0 elseif(oxevent.open() == 1) then return 1 else return 2 end end
function quiz() if(oxevent.quiz(1,30) == 0) then return 0 elseif(oxevent.quiz(1,30) == 1) then return 1 else return 2 end end
function check() local gmlist = {"[SA]Con"} -- Enter the names of GameMaster for i = 1,table.getn(gmlist),1 do if(gmlist[i] == pc.name) then return true else return false end end end
when 20011.chat."Der OX-Wettbewerb" with pc.is_gm() and oxevents.check() == true and game.get_event_flag("automatic_oxevent_status") == 0 begin say_title(mob_name(npc.get_race())..":") say("") --- say("Möchtest du den Wettbewerb starten? ") say("") local s = select(locale.yes,locale.no) if(s == 2) then return end say_title(mob_name(npc.get_race())..":") say("") --- say_reward("Info: Uhrzeit: "..os.date("%H")) say("") say("Um wie viel Uhr soll der Wettbewerb starten? ") local times = tonumber(input() ) if(times == "" or tonumber(times) == nil) then return end say_title(mob_name(npc.get_race())..":") say("") --- game.set_event_flag("automatic_oxevent_opentime",times) say("Der Wettbewerb wurde gestartet!") say("Wird in "..times.." Stunden geöffnet! ") game.set_event_flag("automatic_oxevent_status",1) server_timer('check',5) end
when check.server_timer begin if(os.date("%H") == game.get_event_flag("automatic_oxevent_opentime")) then if(oxevents.open() == 0) then print("Der Wettbewerb wurde bereits Gestartet!") elseif(oxevents.open() == 1) then notice_all("Der OX-Wettbewerb hat soeben begonnen!") notice_all("Um daran Teilzunehmen, begebt euch zu Uriel.") server_timer('countdownone',300) else print("Es ist ein Fehler aufgetreten!") end else server_timer('checktwo',5) end end
when checktwo.server_timer begin if(os.date("%H") == game.get_event_flag("automatic_oxevent_opentime")) then if(oxevents.open() == 0) then print("Der Wettbewerb wurde bereits Gestartet!") elseif(oxevents.open() == 1) then notice_all("Der OX-Wettbewerb hat soeben begonnen!") notice_all("Um daran Teilzunehmen, begebt euch zu Uriel.") server_timer('countdownone',300) else print("Es ist ein Fehler aufgetreten!") end else server_timer('check',5) end end
when countdownone.server_timer begin notice_all("Die Tore zum OX-Wettbewer werden in 5 Minuten geschlossen!") server_timer("countdowntwo",60) end
when countdowntwo.server_timer begin notice_all("Die Tore zum OX-Wettbewer werden in 4 Minuten geschlossen!") server_timer("countdownthree",60) end
when countdownthree.server_timer begin notice_all("Die Tore zum OX-Wettbewer werden in 3 Minuten geschlossen!") server_timer("countdownfour",60) end
when countdownfour.server_timer begin notice_all("Die Tore zum OX-Wettbewer werden in 2 Minuten geschlossen!") server_timer("countdownfive",60) end
when countdownfive.server_timer begin notice_all("Die Tore zum OX-Wettbewer werden in 1 Minute geschlossen!") server_timer("countdown",60) end
when countdown.server_timer begin notice_all("Die Tore zum OX-Wettbewerb wurden geschlossen!") notice_all("Es können nur noch Zuschauer beitreten!") game.set_event_flag("automatic_oxevent_status",2) server_timer('playercheck',10) game.set_event_flag("automatic_oxevent_opentime",0) end
when playercheck.server_timer begin if(pc.get_map_index() == 113) then if(oxevent.get_attender() == 0) then notice_all("Der OX-Wettbewerb hat keine Teilnehmer und wird") notice_all("deshalb automatisch beendet!") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) else return end else server_timer("oxeventstart",10) end end
when oxeventstart.server_timer begin if(pc.get_map_index() == 113) then if(oxevents.quiz() == 0) then print("Der Wettbewerb wurde beendet!") elseif(oxevents.quiz() == 1) then notice_in_map("Frage wurde gestellt...") server_timer("goon",30) else print("Seit ihr bereit für die nächste Frage?") end else return end end
when goon.server_timer begin -- Check if(oxevent.get_attender() == 0) then notice_in_map("Es ist keiner mehr dabei.") notice_in_map("Der Wettbewerb wurde beendet!") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() elseif(oxevent.get_attender() == 1) then notice_in_map("Der Wettbewerb ist vorbei!") notice_in_map("Es wird nun ein Zuffäliges Item auf den Boden fallen.") local itemlist = {11299,11499,11699,11899} game.drop_item(itemlist[number(1,table.getn(itemlist))],1) game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) server_timer("over",20) else server_timer("goontwo",30) end end
when over.server_timer begin warp_all_to_village() end
when goontwo.server_timer begin -- Check if(oxevent.get_attender() == 0) then notice_in_map("Es ist keiner mehr dabei.") notice_in_map("Der Wettbewerb wurde beendet!") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() elseif(oxevent.get_attender() == 1) then notice_in_map("Der Wettbewerb ist vorbei!") notice_in_map("Es wird nun ein Zuffäliges Item auf den Boden fallen.") local itemlist = {11299,11499,11699,11899} game.drop_item(itemlist[number(1,table.getn(itemlist))],1) game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) server_timer("over",20) else server_timer("goon",30) end end
when 20011.chat."Der OX-Wettbewerb" begin say_title(mob_name(npc.get_race())..":") say("") --- if(game.get_event_flag("automatic_oxevent_status") == 2) then say("Der OX-Wettbwerb läuft bereits, du kannst") say("nur noch als Zuschauer beitreten!") say_reward("Möchtest du Zuschauen?") 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") == 1) then say("Der OX-Wettbewerb ist noch Offen.") say("Möchtest du beitreten?") local s = select(locale.yes,locale.no,"Nur Zuschauen") if(s == 1) then pc.warp(896500, 24600) elseif(s == 3) then pc.warp(896300, 28900) end end end end end
Fals ich etwas falsch Übersetzt habe, sagt es mir bitte und ich werde es Korrigieren!
BTW: Thanks to -TÜRK- and HaveBeen for this Quest!
function open() if(oxevent.open() == 0) then return 0 elseif(oxevent.open() == 1) then return 1 else return 2 end end
function quiz() if(oxevent.quiz(1,30) == 0) then return 0 elseif(oxevent.quiz(1,30) == 1) then return 1 else return 2 end end
function check() local gmlist = {"[SA]Con"} -- Enter the names of GameMaster for i = 1,table.getn(gmlist),1 do if(gmlist[i] == pc.name) then return true else return false end end end
when 20011.chat."Der OX-Wettbewerb" with pc.is_gm() and oxevents.check() == true and game.get_event_flag("automatic_oxevent_status") == 0 begin say_title(mob_name(npc.get_race())..":") say("") --- say("Möchtest du den Wettbewerb starten? ") say("") local s = select(locale.yes,locale.no) if(s == 2) then return end say_title(mob_name(npc.get_race())..":") say("") --- say_reward("Info: Uhrzeit: "..os.date("%H")) say("") say("Um wie viel Uhr soll der Wettbewerb starten? ") local times = input() if(times == "" or times == nil) then return end say_title(mob_name(npc.get_race())..":") say("") --- game.set_event_flag("automatic_oxevent_opentime",times) say("Der Wettbewerb wurde gestartet!") say("Wird in "..times.." Stunden geöffnet! ") game.set_event_flag("automatic_oxevent_status",1) loop_timer('check',0.5) end
when check.timer begin if(os.date("%H") == game.get_event_flag("automatic_oxevent_opentime")) then if(oxevents.open() == 0) then print("Der Wettbewerb wurde bereits Gestartet!") elseif(oxevents.open() == 1) then notice_all("Der OX-Wettbewerb hat soeben begonnen!") notice_all("Um daran Teilzunehmen, begebt euch zu Uriel.") timer('countdownone',300) else print("Es ist ein Fehler aufgetreten!") end else loop_timer('checktwo',0.5) end end
whne checktwo.timer begin if(os.date("%H") == game.get_event_flag("automatic_oxevent_opentime")) then if(oxevents.open() == 0) then print("Der Wettbewerb wurde bereits Gestartet!") elseif(oxevents.open() == 1) then notice_all("Der OX-Wettbewerb hat soeben begonnen!") notice_all("Um daran Teilzunehmen, begebt euch zu Uriel.") timer('countdownone',300) else print("Es ist ein Fehler aufgetreten!") end else loop_timer('check',0.5) end end
when countdownone.timer begin notice_all("Die Tore zum OX-Wettbewer werden in 5 Minuten geschlossen!") timer("countdowntwo",300) end
when countdowntwo.timer begin notice_all("Die Tore zum OX-Wettbewer werden in 4 Minuten geschlossen!") timer("countdownthree",300) end
when countdownthree.timer begin notice_all("Die Tore zum OX-Wettbewer werden in 3 Minuten geschlossen!") timer("countdownfour",300) end
when countdownfour.timer begin notice_all("Die Tore zum OX-Wettbewer werden in 2 Minuten geschlossen!") timer("countdownfive",300) end
when countdownfive.timer begin notice_all("Die Tore zum OX-Wettbewer werden in 1 Minute geschlossen!") timer("countdown",300) end
when countdown.timer begin notice_all("Die Tore zum OX-Wettbewerb wurden geschlossen!") notice_all("Es können nur noch Zuschauer beitreten!") game.set_event_flag("automatic_oxevent_status",2) timer('playercheck',10) game.set_event_flag("automatic_oxevent_opentime",0) end
when playercheck.timer begin if(pc.get_map_index() == 113) then if(oxevent.get_attender() == 0) then notice_all("Der OX-Wettbewerb hat keine Teilnehmer und wird") notice_all("deshalb automatisch beendet!") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) else return end else timer("oxeventstart",10) end end
when oxeventstart.timer begin if(pc.get_map_index() == 113) then if(oxevents.quiz() == 0) then print("Der Wettbewerb wurde beendet!") elseif(oxevents.quiz() == 1) then notice_in_map("Frage wurde gestellt...") timer("goon",30) else print("Seit ihr bereit für die nächste Frage?") end else return end end
when goon.timer begin -- Check if(oxevent.get_attender() == 0) then notice_in_map("Es ist keiner mehr dabei.") notice_in_map("Der Wettbewerb wurde beendet!") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() elseif(oxevent.get_attender() == 1) then notice_in_map("Der Wettbewerb ist vorbei!") notice_in_map("Es wird nun ein Zuffäliges Item auf den Boden fallen.") local itemlist = {11299,11499,11699,11899} game.drop_item(itemlist[number(1,table.getn(itemlist))],1) game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) timer("over",20) else timer("goontwo",30) end end
when over.timer begin warp_all_to_village() end
when goontwo.timer begin -- Check if(oxevent.get_attender() == 0) then notice_in_map("Es ist keiner mehr dabei.") notice_in_map("Der Wettbewerb wurde beendet!") game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) warp_all_to_village() elseif(oxevent.get_attender() == 1) then notice_in_map("Der Wettbewerb ist vorbei!") notice_in_map("Es wird nun ein Zuffäliges Item auf den Boden fallen.") local itemlist = {11299,11499,11699,11899} game.drop_item(itemlist[number(1,table.getn(itemlist))],1) game.set_event_flag("automatic_oxevent_status",0) game.set_event_flag("automatic_oxevent_opentime",0) timer("over",20) else timer("goon",30) end end
when 20011.chat."Der OX-Wettbewerb" begin say_title(mob_name(npc.get_race())..":") say("") --- if(game.get_event_flag("automatic_oxevent_status") == 2) then say("Der OX-Wettbwerb läuft bereits, du kannst") say("nur noch als Zuschauer beitreten!") say_reward("Möchtest du Zuschauen?") 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") == 1) then say("Der OX-Wettbewerb ist noch Offen.") say("Möchtest du beitreten?") local s = select(locale.yes,locale.no,"Nur Zuschauen") if(s == 1) then pc.warp(896500, 24600) elseif(s == 3) then pc.warp(896300, 28900) end end end end end
Fals ich etwas falsch Übersetzt habe, sagt es mir bitte und ich werde es Korrigieren!
BTW: Thanks to -TÜRK- and HaveBeen for this Quest!
I've to inform you that this script won't work in any possible situation.
There're a couple of ways to stuck/block/bug it, using server_timer will help you fixing some of them, in any case it's a buggy ox event. Test and trust.
I think i'll release my stable version (more than 6 test month), i'll make you know.
Acqua
[Release]Paygol Automatic System 04/18/2013 - Metin2 PServer Guides & Strategies - 26 Replies Hi epvp,
I created a IPN (Instant Payment Notification) system.
Creates a file named "teste.php" (example) - this is a IPN system...:
<?php
//ligação à base de dados
$ligacao = mysql_connect("hostname", "user", "pass") ;
mysql_select_db("account", $ligacao);
[NEED]Automatic Payment System 01/21/2013 - Metin2 Private Server - 2 Replies Hello Epvp
Are there any automatic payment system for metin2 servers? I wanna use one for my P.Server so when someone donate automatic take the coins and i am taking the money to an account!
If Someone knows plzz tell me.!
[Release]New Guild War event system 01/20/2012 - CO2 PServer Guides & Releases - 4 Replies Hi
This event will allow Heads Guilds can enroll their paying 25.000 cps at a Sand Type Groups. Now that by entering the guild that wins more damage haga.Cuando The Battle Ends (10min) The 50,000 CPS are divided between the number of participants winning clan.
Note: 25.000 and 50.000 Total Mind CPS are editable Canvio entrance fee and / or Taste Award Of The Admin Server.
Here some pictures of the event that Javier and ChInOx!!.
...
[Automatic] Ox-Event // Umfrage 07/29/2011 - Metin2 Private Server - 8 Replies Hallöchen,
da irgendwer in dem Thread
-> release-besserer-ox-manage-quest-mit-o ex-verlassen-quest-usw.html schrieb die Quest sei nicht wirklich besonders er hätte sich über eine automatisch ablaufende Quest mehr gefreut
hab cih den Grund satz der questes da mal genommen und sie automatisiert
so das sie alleine ablaufen mann muss lediglich nur noch sagen okay start das teil dann wartet man bis welche drinn sind schließt den zugang er bleibt für 3 minuten noch offen geht dann automatisch...
[Release] event handler / system message for 5165 source 05/01/2010 - CO2 PServer Guides & Releases - 10 Replies i was partially made this and completed by pringle, i dont know if pringle is in here in this forum. but still credit to him.
Go to Program.cs and find:public static Random Rnd = new Random();
Above this add:public static DateTime SystemMsgTime = new DateTime();
scroll down and you found this static void ServerStuff_Execute()
{
try
{
if (World.BroadCastCount > 0 && DateTime.Now > World.LastBroadCast.AddMinutes(1))
{