Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[TuT] MegaTuT Automatyczny Event OX


Rekomendowane odpowiedzi

Opublikowano

Quest - Wklej.to

 

http://wklej.to/qGZmg

Quest

 

 

 

--[[
    -- Automatic OX-Event System
    -- Quest Writer By : HaveBeen™
    -- Thank for help -TÜRK- 
    -- 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',0.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',0.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',0.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)
            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("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

 

 

quest_functions

 

 

 

print

 

 

Spolszczenie questa, nie 100%

 

 

Źródło

 

http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2481008-mega-release-automatic-ox-event-system.html

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...