Register for your free account! | Forgot your password?

You last visited: Today at 03:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[MEGA RELEASE]Automatic Ox-Event System

Discussion on [MEGA RELEASE]Automatic Ox-Event System within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
Cool [MEGA RELEASE]Automatic Ox-Event System



PHP Code:
--[[
    -- 
Automatic OX-Event System
    
-- Quest Writer By HaveBeen™
    
-- Thank for help -TÜRKxD
    
-- For E*PVP
]]--
quest oxevents begin
    state start begin
    
    
function open()
        if(
oxevent.open() == 0then
            
return 0
        
elseif(oxevent.open() == 1then
            
return 1
        
else
            return 
2
        end
    end
    
    
function quiz()
        if(
oxevent.quiz(1,30) == 0then
            
return 0
        
elseif(oxevent.quiz(1,30) == 1then
            
return 
        
else
            return 
2
        end
    end
    
    
function check()
        
local gmlist = {"HaveBeen"} -- Enter the names of GameMaster
        
for 1,table.getn(gmlist),do
            if(
gmlist[i] == pc.namethen
                
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(
== 2then 
            
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) == nilthen 
                
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() == 0then
                
print("The competition is already active! ")
            elseif(
oxevents.open() == 1then
                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() == 0then
                
print("The competition is already active! ")
            elseif(
oxevents.open() == 1then
                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() == 113then
            
if(oxevent.get_attender() == 0then
                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() == 113then
            
if(oxevents.quiz() == 0then
                
print("Ox-Event stopped! ")
            elseif(
oxevents.quiz() == 1then
                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() == 0then
            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() == 1then
            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() == 0then
            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() == 1then
            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") == 2then 
            say
("All entries are closed. "
            
say("Now you can go only as a spectator. "
            
local s select(locale.yes,locale.no
            
            if(
== 2then 
                
return 
            
end 
            
            pc
.warp(89630028900
    
        elseif(
game.get_event_flag("automatic_oxevent_status") == 1then 
            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(
== 1then 
                pc
.warp(89650024600
            elseif(
== 3then 
                pc
.warp(89630028900
                
end 
            end 
        end 
    end 
end 
this is code add quest_functions..

PHP Code:
print 
Here is the German Quest ;; Thanks to [SA]Con

Only for epvp

Thank for help -TÜRK-

King Regards !
Mfg HaveBeen™

HaveBeen™ is offline  
Thanks
32 Users
Old 03/17/2013, 09:57   #2
 
thehero09's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 125
Received Thanks: 13
Thanks Mk
thehero09 is offline  
Old 03/17/2013, 09:58   #3
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
Quote:
Originally Posted by thehero09 View Post
Thanks Mk
**** you
HaveBeen™ is offline  
Old 03/17/2013, 10:06   #4
 
-TÜRK-'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 435
Thanks Dude

Bad english but, good quest ..
-TÜRK- is offline  
Thanks
4 Users
Old 03/17/2013, 11:17   #5
 
elite*gold: 0
Join Date: Oct 2011
Posts: 226
Received Thanks: 29
when countdownfive.timer begin
notice_all("<Notice< Closing Ox-Event Entries : 1 mins left.. ")
timer("countdown",60)

it must be ("<Notice>
PrinZDaniieL is offline  
Old 03/17/2013, 11:24   #6
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
Quote:
Originally Posted by lillakilla View Post
when countdownfive.timer begin
notice_all("<Notice< Closing Ox-Event Entries : 1 mins left.. ")
timer("countdown",60)

it must be ("<Notice>
Thanks fixed
HaveBeen™ is offline  
Old 03/17/2013, 11:25   #7
 
[SA]Con's Avatar
 
elite*gold: 150
Join Date: Sep 2010
Posts: 1,071
Received Thanks: 555
Hier mal für die Faulen die Quest auf Deutsch.
Here is the German Quest.


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!
[SA]Con is offline  
Thanks
2 Users
Old 03/17/2013, 11:51   #8
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
Quote:
Originally Posted by -TÜRK- View Post
Thanks Dude

Bad english but, good quest ..
I didn't say anything
HaveBeen™ is offline  
Old 03/17/2013, 11:53   #9
 
-TÜRK-'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 435
Quote:
Originally Posted by HaveBeen™ View Post
I didn't say anything
I fixed strange english
-TÜRK- is offline  
Old 03/17/2013, 12:00   #10
 
[SGA]Jango's Avatar
 
elite*gold: 3
Join Date: Oct 2010
Posts: 390
Received Thanks: 463
Wenn der GM sich ausloggt dann funktioniert der timer nicht! du must server_timer benutzen!
When GM logout, the timer stop! You must use server_timer!
[SGA]Jango is offline  
Thanks
1 User
Old 03/17/2013, 12:07   #11
 
elite*gold: 0
Join Date: Jan 2011
Posts: 22
Received Thanks: 19
Quote:
Originally Posted by [SGA]Jango View Post
Wenn der GM sich ausloggt dann funktioniert der timer nicht! du must server_timer benutzen!
When GM logout, the timer stop! You must use server_timer!
It's not the only one bug. It's deeply bugged yet
Cescoso is offline  
Old 03/17/2013, 12:07   #12
 
-TÜRK-'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 435
Quote:
Originally Posted by [SGA]Jango View Post
Wenn der GM sich ausloggt dann funktioniert der timer nicht! du must server_timer benutzen!
When GM logout, the timer stop! You must use server_timer!
Thanks.

We've got a big bug.
-TÜRK- is offline  
Old 03/17/2013, 12:20   #13
 
αнтιη's Avatar
 
elite*gold: 14
Join Date: Feb 2013
Posts: 223
Received Thanks: 51
Thanks
αнтιη is offline  
Thanks
1 User
Old 03/17/2013, 12:20   #14
 
sermandes's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 69
Received Thanks: 34
Thanks man
sermandes is offline  
Thanks
1 User
Old 03/17/2013, 12:27   #15
 
elite*gold: 0
Join Date: Jan 2011
Posts: 22
Received Thanks: 19
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
Cescoso is offline  
Reply

Tags
automatic, havebeen, oxevent, system


Similar Threads Similar Threads
[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)) {



All times are GMT +2. The time now is 03:42.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.