Jump to content

Need a quest with timing spawn of mobs


Recommended Posts

Hi there, 
I just need to make a quest with timing that is 

In a map timer starts 
where regen1.txt or mob set 1.txt will spawn those mobs at required spots and they will be there for (x) mins duration after that all will vanished after (x) mins is over 
saying announcement of " new Monsters will be spawned in 5 secs " 
again new set regen2.txt of mobs will spawned at locations for (y) mins duration and vanished after (y)mins of time 
saying announcement of " new Monsters will be spawned in 5 secs " 

i dont know how to create quest using timer so any help will be appreciated. 
If you want you can pm me here so i provide any other messenger to add me 

Thanks in advance 
 

Link to comment
Share on other sites

  • 2 weeks later...

You need to a trigger for that to start timer in that map. It could be a login or logout or kill or pick up and so on for trigger.

when login with pc.get_map_index() == xx begin
	server_timer("WhatEverYouCall", Number)
end

when WhatEverYouCall.server_timer begin
	regen_in_map(mapindex, path)
end

I just wanted to give a basic simple for you to understand.

Best Regards

Ken

  • Love 1

Do not be sorry, be better.

Link to comment
Share on other sites

On 2017. 05. 17. at 4:34 PM, Human said:

Hi there, 
I just need to make a quest with timing that is 

In a map timer starts 
where regen1.txt or mob set 1.txt will spawn those mobs at required spots and they will be there for (x) mins duration after that all will vanished after (x) mins is over 
saying announcement of " new Monsters will be spawned in 5 secs " 
again new set regen2.txt of mobs will spawned at locations for (y) mins duration and vanished after (y)mins of time 
saying announcement of " new Monsters will be spawned in 5 secs " 

i dont know how to create quest using timer so any help will be appreciated. 
If you want you can pm me here so i provide any other messenger to add me 

Thanks in advance 
 

Hello,
Maybe?
 

Spoiler

quest _.quest_file_name_here begin

    state start begin
        when login with pc.get_map_index() == mapindex begin    --Example:    when login with pc.get_map_index() == 110 begin
            server_timer("Timer_name", Number)    --Example: server_timer("logined", 10) --10 sec and start
            notice("")    --Example:    notice("XY group/monsters are coming!Prepare the battle!10 sec and monsters are comming!")
        end    --when

        when Timer_name.server_timer begin    --Example: when logined.server_timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end    --when

        when fail.server_timer begin
            notice("Failed!10 sec and teleportating XY city/map")
            npc.purge()    --EveryNPC on the map are dissappear / purge
            d.kill_all()    --kill all monster
            timer("warp_all,2")     --warp all to the city
        end    --when


        when boss_id.kill begin OR when XY.use begin
            clear_server_timer('fail') --clear fail timer
            notice("Congratulations! ETC ETC ETC")
            timer("warp_all,10")    --timer: warp all to the city
        end    --when
        when warp_all.timer begin
            d.exit_all()    --warp all to the city
        end    --when
    end    --state
end    --quest

 

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

6 hours ago, Ken said:

You need to a trigger for that to start timer in that map. It could be a login or logout or kill or pick up and so on for trigger.


when login with pc.get_map_index() == xx begin
	server_timer("WhatEverYouCall", Number)
end

when WhatEverYouCall.server_timer begin
	regen_in_map(mapindex, path)
end

I just wanted to give a basic simple for you to understand.

Best Regards

Ken

thanks ken its nice to understand 

 

 

1 hour ago, [007]DawisHU said:

Hello,
Maybe?
 

  Hide contents

quest _.quest_file_name_here begin

    state start begin
        when login with pc.get_map_index() == mapindex begin    --Example:    when login with pc.get_map_index() == 110 begin
            server_timer("Timer_name", Number)    --Example: server_timer("logined", 10) --10 sec and start
            notice("")    --Example:    notice("XY group/monsters are coming!Prepare the battle!10 sec and monsters are comming!")
        end    --when

        when Timer_name.server_timer begin    --Example: when logined.server_timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end    --when

        when fail.server_timer begin
            notice("Failed!10 sec and teleportating XY city/map")
            npc.purge()    --EveryNPC on the map are dissappear / purge
            d.kill_all()    --kill all monster
            timer("warp_all,2")     --warp all to the city
        end    --when


        when boss_id.kill begin OR when XY.use begin
            clear_server_timer('fail') --clear fail timer
            notice("Congratulations! ETC ETC ETC")
            timer("warp_all,10")    --timer: warp all to the city
        end    --when
        when warp_all.timer begin
            d.exit_all()    --warp all to the city
        end    --when
    end    --state
end    --quest

 

 

Thanks Dawishu you explained and fill 75% of my quest request thanks 
Only few questions i got in your quest  sorry for asking
1) when login means if single logs it will start ?

I meant if 1 player logs it start 
again if 2nd player logs it will start again with timer  from 0 ?

2) In this you started the quest and server timer starts with say 4800 secs so within that mobs must be killed 
but my quest is different quest is started like u with server timer says 4800 and 1st set of mobs must be spawned 
After 60 secs it must say New set of mobs will spawned in 5 secs and again server time must be reduced to 4700 old mobs must be purged 
same after 120 secs it must say New sets mobs will be spawned in 5 secs and again server time must be reduced to 4500 
and so and so 
and its good at end if they kill the boss it must clear timer and all must go to town ... even if one killed and someother didnt even touched the mob all just teleported 
and also if timer ends it must teleport to town ..
 

and thanks both of you for this answer 

Link to comment
Share on other sites

1 hour ago, Human said:

thanks ken its nice to understand 

 

 

Thanks Dawishu you explained and fill 75% of my quest request thanks 
Only few questions i got in your quest  sorry for asking
1) when login means if single logs it will start ?

I meant if 1 player logs it start 
again if 2nd player logs it will start again with timer  from 0 ?

2) In this you started the quest and server timer starts with say 4800 secs so within that mobs must be killed 
but my quest is different quest is started like u with server timer says 4800 and 1st set of mobs must be spawned 
After 60 secs it must say New set of mobs will spawned in 5 secs and again server time must be reduced to 4700 old mobs must be purged 
same after 120 secs it must say New sets mobs will be spawned in 5 secs and again server time must be reduced to 4500 
and so and so 
and its good at end if they kill the boss it must clear timer and all must go to town ... even if one killed and someother didnt even touched the mob all just teleported 
and also if timer ends it must teleport to town ..
 

and thanks both of you for this answer 

Spoiler

Like this?
 

or not like?

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

1) when login means if single logs it will start ?
Answer: Yes.
Use server_timer and 2th player logged in not started.

 

Spoiler

In the quest
 

Spoiler

quest _.quest_file_name_here begin

    state start begin
        when XY.chat."Name of run" begin
        when logout begin
            if pc.get_map_index() == mapindex then
                pc.delqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")    --when player logout dell qf (for unbugg)
            end    --if/else
        end    --when

        when login with pc.get_map_index() == mapindex and pc.getqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")==0 begin
            d.exit_all()    --warp all to the city
        end    --when

        when login with pc.get_map_index() == mapindex begin        --Example:    when login with pc.get_map_index() == 110 begin
            pc.setqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")
            server_timer("Timer_name", Number)    --Example: server_timer("logined", 10) --10 sec and start
            notice("")    --Example:    notice("XY group/monsters are coming!Prepare the battle!10 sec and monsters are comming!")
        end    --end

replace whit this
 

Spoiler

quest _.quest_file_name_here begin

    state start begin
       --> --when XY.chat."Name of run" begin DELETE THIS wrong quest ^^ <---
        when logout begin
            if pc.get_map_index() == mapindex then
                pc.delqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")    --when player logout dell qf (for unbugg)
            end    --if/else
        end    --when

        when login with pc.get_map_index() == mapindex begin --Example:    when login with pc.get_map_index() == 110 begin
            if game.get_event_flag("Dawis_metin2dev") >= 1 then
            end
            if game.get_event_flag("Dawis_metin2dev") >= 0
                pc.setqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")
                game.set_event_flag("Dawis_metin2dev,1")
                server_timer("Timer_name", Number)    --Example: server_timer("logined", 10) --10 sec and start
                notice("")    --Example:    notice("XY group/monsters are coming!Prepare the battle!10 sec and monsters are comming!")
        end    --end

 

2.
 

Spoiler

In quest replace
 

Spoiler

        when Timer_name.server_timer begin    --Example: when logined.server_timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end    --end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave,5")
        end
        
        when next_wave.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave1,5")
        end
        
        when next_wave1.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave2,5")
        end
        
        when next_wave2.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

            
        when fail.server_timer begin
            notice("Failed!10 sec and teleportating XY city/map")
            npc.purge()    --EveryNPC on the map are dissappear / purge
            d.kill_all()    --kill all monster
            d.exit_all()    --Warp all to the city
        end    --end


        when boss_id.kill begin OR when XY.use begin
            clear_server_timer('fail') --clear fail timer
            notice("Congratulations! ETC ETC ETC")
            timer("warp_all,10")    --timer: warp all to the city
        end    --end
        when warp_all.timer begin
            d.exit_all()    --warp all to the city
            game.set_event_flag("Dawis_metin2dev,0")
        end    --end
    end    --state
end    --quest

 

Or full edited quest (COPY PASTE READY)
 

Spoiler

quest _.quest_file_name_here begin

    state start begin

        when logout begin
            if pc.get_map_index() == mapindex then
                pc.delqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")    --when player logout dell qf (for unbugg)
            end    --if/else
        end    --when

        when login with pc.get_map_index() == mapindex begin --Example:    when login with pc.get_map_index() == 110 begin
            if game.get_event_flag("Dawis_metin2dev") >= 1 then
            end
            if game.get_event_flag("Dawis_metin2dev") >= 0
                pc.setqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")
                game.set_event_flag("Dawis_metin2dev,1")
                server_timer("Timer_name", Number)    --Example: server_timer("logined", 10) --10 sec and start
                notice("")    --Example:    notice("XY group/monsters are coming!Prepare the battle!10 sec and monsters are comming!")
        end    --end

        when Timer_name.server_timer begin    --Example: when logined.server_timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end    --end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave,5")
        end
        
        when next_wave.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave1,5")
        end
        
        when next_wave1.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave2,5")
        end
        
        when next_wave2.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

            
        when fail.server_timer begin
            notice("Failed!10 sec and teleportating XY city/map")
            npc.purge()    --EveryNPC on the map are dissappear / purge
            d.kill_all()    --kill all monster
            d.exit_all()    --Warp all to the city
        end    --end


        when boss_id.kill begin OR when XY.use begin
            clear_server_timer('fail') --clear fail timer
            notice("Congratulations! ETC ETC ETC")
            timer("warp_all,10")    --timer: warp all to the city
        end    --end
        when warp_all.timer begin
            d.exit_all()    --warp all to the city
            game.set_event_flag("Dawis_metin2dev,0")
            pc.delqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")
        end    --end
    end    --state
end    --quest

 

 

 

  • Love 1

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

11 hours ago, [007]DawisHU said:

 

  Hide contents

 

  Hide contents

 

  Hide contents

quest _.quest_file_name_here begin

    state start begin

        when logout begin
            if pc.get_map_index() == mapindex then
                pc.delqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")    --when player logout dell qf (for unbugg)
            end    --if/else
        end    --when

        when login with pc.get_map_index() == mapindex begin --Example:    when login with pc.get_map_index() == 110 begin
            if game.get_event_flag("Dawis_metin2dev") >= 1 then
            end
            if game.get_event_flag("Dawis_metin2dev") >= 0
                pc.setqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")
                game.set_event_flag("Dawis_metin2dev,1")
                server_timer("Timer_name", Number)    --Example: server_timer("logined", 10) --10 sec and start
                notice("")    --Example:    notice("XY group/monsters are coming!Prepare the battle!10 sec and monsters are comming!")
        end    --end

        when Timer_name.server_timer begin    --Example: when logined.server_timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end    --end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave,5")
        end
        
        when next_wave.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave1,5")
        end
        
        when next_wave1.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

        when XY.kill begin
            clear_server_timer('fail') --clear fail timer
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            timer("next_wave2,5")
        end
        
        when next_wave2.timer begin
            regen_in_map(mapindex, path) --Example:    regen_in_map(110, d.regen_file("dawis_work/elite_dungeon/hard_base_attack/last_rowregen.txt")(add 1 boss or item)
            notice("")    --Example: notice("Monster are spawned,Kill them all!")
            server_timer("fail", 4800)    --4800 sec and failed
        end

            
        when fail.server_timer begin
            notice("Failed!10 sec and teleportating XY city/map")
            npc.purge()    --EveryNPC on the map are dissappear / purge
            d.kill_all()    --kill all monster
            d.exit_all()    --Warp all to the city
        end    --end


        when boss_id.kill begin OR when XY.use begin
            clear_server_timer('fail') --clear fail timer
            notice("Congratulations! ETC ETC ETC")
            timer("warp_all,10")    --timer: warp all to the city
        end    --end
        when warp_all.timer begin
            d.exit_all()    --warp all to the city
            game.set_event_flag("Dawis_metin2dev,0")
            pc.delqf("ENTER_HERE_UNIQUE_OPTION_OR_NAME")
        end    --end
    end    --state
end    --quest

 

 

 

Excellent !!!  Dawis You are great quest maker 
Just what i thought u did :)


and only this is the change i have to make 

1) when login means if single logs it will start ?
Answer: Yes.
Use server_timer and 2th player logged in not started.

I may be wrong in describing it .. Let me clear it  I want all to be entered not like one person entering or password .. when event start all players can enter and kill the mobs there is no unique in this ... i made some quest with starting of event 
 

Spoiler

 

quest xxx_event begin
    state start begin
        when 20338.chat."xxxevent" with pc.is_gm() begin
            --Variable
            local filename = "xxx1"
            local filename1 = "xxx2"            
            local map_index = 245
            local announcement = "xxx Event Started"
            --
            say_title("xxxevent")
            say("Activate xxx Event?")
            local s= select("Yes, with Announcement", "No, Deactivate the event", "Cancel ")    
            if s==1 then
                notice_all(announcement)
                regen_in_map(map_index, "data/dungeon/"..filename..".txt")
                game.set_event_flag("xxx_event", 1)
            elseif s==2 then
                notice_all("xxx Event is Over.All will be teleported to town.")
                game.set_event_flag("xxx_event", 0)
            else
                return 
            end
        end

######
main quest  ( your quest content )


######

        
        when 20418.chat."Wonder Land" begin
                    say_title("Arya:")
                    say("")
                    say("Wanna have some Adventures ?")
                    say("I take to the Land of trouble.")
                    say("Let me see if you are prepared to endure the journey there.")
                    say("")
                    wait()
                    if game.get_event_flag("xxx_event") == 0 then
                        say_title("Arya:")
                        say("")
                        ----"111111222222333333444444555555666666777777888888999999000000"
                        say("Sorry, you can't access the xxx land at the moment.")
                        say("")
                        return
                    elseif game.get_event_flag("xxx_event") == 1 then
                    
                        say_title("Arya:")
                        say("")
                        say("You are allowed to join.")
                        say("Off to the xxxland we go...")
                        say("")
                        wait()
                        pc.warp(xxx, yyyy)
                    end
        end        
    end
end 

 

can you finish this in an complete set 

thanks for your timely help  for this timer quest :)

Link to comment
Share on other sites

On 2017. 06. 08. at 6:48 AM, Human said:

Excellent !!!  Dawis You are great quest maker 
Just what i thought u did :)


and only this is the change i have to make 

1) when login means if single logs it will start ?
Answer: Yes.
Use server_timer and 2th player logged in not started.

I may be wrong in describing it .. Let me clear it  I want all to be entered not like one person entering or password .. when event start all players can enter and kill the mobs there is no unique in this ... i made some quest with starting of event 
 

  Hide contents

 

quest xxx_event begin
    state start begin
        when 20338.chat."xxxevent" with pc.is_gm() begin
            --Variable
            local filename = "xxx1"
            local filename1 = "xxx2"            
            local map_index = 245
            local announcement = "xxx Event Started"
            --
            say_title("xxxevent")
            say("Activate xxx Event?")
            local s= select("Yes, with Announcement", "No, Deactivate the event", "Cancel ")    
            if s==1 then
                notice_all(announcement)
                regen_in_map(map_index, "data/dungeon/"..filename..".txt")
                game.set_event_flag("xxx_event", 1)
            elseif s==2 then
                notice_all("xxx Event is Over.All will be teleported to town.")
                game.set_event_flag("xxx_event", 0)
            else
                return 
            end
        end

######
main quest  ( your quest content )


######

        
        when 20418.chat."Wonder Land" begin
                    say_title("Arya:")
                    say("")
                    say("Wanna have some Adventures ?")
                    say("I take to the Land of trouble.")
                    say("Let me see if you are prepared to endure the journey there.")
                    say("")
                    wait()
                    if game.get_event_flag("xxx_event") == 0 then
                        say_title("Arya:")
                        say("")
                        ----"111111222222333333444444555555666666777777888888999999000000"
                        say("Sorry, you can't access the xxx land at the moment.")
                        say("")
                        return
                    elseif game.get_event_flag("xxx_event") == 1 then
                    
                        say_title("Arya:")
                        say("")
                        say("You are allowed to join.")
                        say("Off to the xxxland we go...")
                        say("")
                        wait()
                        pc.warp(xxx, yyyy)
                    end
        end        
    end
end 

 

can you finish this in an complete set 

thanks for your timely help  for this timer quest :)

Spoiler

Thank you,Give me 15 min (eating + writting ^^) and i send u the regionaly event :)
+ tell me timing regionally quest?  example u click activate quest in npc  and 2 hour later automatically stopped ??

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

Spoiler

quest xxx_event begin

    state start begin
        when 20338.chat."xxx_event" with pc.is_gm() begin
            --Variable
            local filename = xxx1
            local filename1 = xxx2        
            local map_index = 245
            local announcement = "xxx Event Started"
            --
            if game.get_event_flag("xxx_event") == 0 then
                say_title("xxxevent")
                say("Activate xxx Event?")
                local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                    if s == 3 then
                        return
                    end
                    if s == 2 then
                        notice_all(""..announcement.." by "..pc.get_name().."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
                    if s == 1 then
                        notice_all(""..Announcement.."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
            end
            if game.get_event_flag("xxx_event") == 1 then
                say_title("xxxevent")
                say("De-activate xxx Event?")
                local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                    if ss == 3 then
                        return
                    end
                    if ss == 2 then
                        notice_all("xxx Event is Over.All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
                    if ss == 1 then
                        notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
            end
        end
        --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 40")
            --timer("xxx_event1",60*20)
        --end
        --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 20")
            --timer("xxx_event2",60*20)
        --end
        --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Time is over !Thank you for particulate in event.")
            --timer("xxx_event_closer",1)
        --end
        when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
            say_title("Arya:")
            say("")
            say("Wanna have some Adventures ?")
            say("I take to the Land of trouble.")
            say("Let me see if you are prepared to endure the journey there.")
            say("")
            wait("Next")
            say_title("Arya:")
            say("")
            say_reward("You're ready?")
            local sss = select("Yes!","No")
                if sss == 2 then
                    return
                end
                if sss == 1 then
                    say_title("Arya:")
                    say("")
                    say("You are allowed to join.")
                    say("Off to the xxxland we go...")
                    say("")
                    wait("Okey,Let's go")
                    pc.setqf("xxx_event_signup", 1)
                    pc.warp(xxx,yyyy)
                end
        end
        when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
            notice("xxx Event is Over.You will be teleported to the town.")
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            timer("xxx_event_closer",1)
        end
        when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
            pc.setqf("xxx_event_signup", 1)
        end
        when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
        d.exit_all
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
    end
end

 

 

  • Love 1

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

I really appreciate your help and thanks for spending time for my quest 
just a doubt once the event is over the timer will be cleared right? 

like this i meant            clear_server_timer(" xxx_event") 

or don't need?

edit 
and when i compile the quest with necessary stuffs 
I get this error 
xxx_event.quest:112:syntax error : [string "startpc . getqf ( "xxx_event_signup" ) == 1"]:1: `=' expected near `pc'
 

Link to comment
Share on other sites

5 hours ago, Human said:

I really appreciate your help and thanks for spending time for my quest 
just a doubt once the event is over the timer will be cleared right? 

like this i meant            clear_server_timer(" xxx_event") 

or don't need?

edit 
and when i compile the quest with necessary stuffs 
I get this error 
xxx_event.quest:112:syntax error : [string "startpc . getqf ( "xxx_event_signup" ) == 1"]:1: `=' expected near `pc'
 

Spoiler

like this i meant            clear_server_timer(" xxx_event") 
 

Spoiler

Don't need if u want to add

Search this:

Spoiler

                    if s == 2 then
                        notice_all(""..announcement.." by "..pc.get_name().."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end

change to this
 

Spoiler

                    if s == 2 then
                        notice_all(""..announcement.." by "..pc.get_name().."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end

Spoiler

Search this
 

Spoiler

                    if s == 1 then
                        notice_all(""..Announcement.."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end

Change to this
 

Spoiler

                    if s == 1 then
                        notice_all(""..Announcement.."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end

Add new when :
 

Spoiler

        when xxx_event.server_timer begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        clear_server_timer("xxx_event")
        end

 

Search this
 

Spoiler

        when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
        d.exit_all
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
    end
end

Replace to:
 

Spoiler


        when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        clear_server_timer("xxx_event")
        end
    end
end

 

 

 

Or Fixed file with server_timer
 

Spoiler

 quest xxx_event begin

    state start begin
        when 20338.chat."xxx_event" with pc.is_gm() begin
            --Variable
            local filename = xxx1
            local filename1 = xxx2        
            local map_index = 245
            local announcement = "xxx Event Started"
            --
            if game.get_event_flag("xxx_event") == 0 then
                say_title("xxxevent")
                say("Activate xxx Event?")
                local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                    if s == 3 then
                        return
                    end
                    if s == 2 then
                        notice_all(""..announcement.." by "..pc.get_name().."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
                    if s == 1 then
                        notice_all(""..Announcement.."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
            end
            if game.get_event_flag("xxx_event") == 1 then
                say_title("xxxevent")
                say("De-activate xxx Event?")
                local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                    if ss == 3 then
                        return
                    end
                    if ss == 2 then
                        notice_all("xxx Event is Over.All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
                    if ss == 1 then
                        notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
            end
        end
        --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 40")
            --timer("xxx_event1",60*20)
        --end
        --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 20")
            --timer("xxx_event2",60*20)
        --end
        --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Time is over !Thank you for particulate in event.")
            --timer("xxx_event_closer",1)
        --end
        when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
            say_title("Arya:")
            say("")
            say("Wanna have some Adventures ?")
            say("I take to the Land of trouble.")
            say("Let me see if you are prepared to endure the journey there.")
            say("")
            wait("Next")
            say_title("Arya:")
            say("")
            say_reward("You're ready?")
            local sss = select("Yes!","No")
                if sss == 2 then
                    return
                end
                if sss == 1 then
                    say_title("Arya:")
                    say("")
                    say("You are allowed to join.")
                    say("Off to the xxxland we go...")
                    say("")
                    wait("Okey,Let's go")
                    pc.setqf("xxx_event_signup", 1)
                    pc.warp(xxx,yyyy)
                end
        end
        when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
            notice("xxx Event is Over.You will be teleported to the town.")
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            timer("xxx_event_closer",1)
        end
        when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
            pc.setqf("xxx_event_signup", 1)
        end
        when xxx_event.server_timer begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        clear_server_timer("xxx_event")
        end

        when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        clear_server_timer("xxx_event")
        end
    end
end

 

 

Without server_timer
 

Spoiler

 quest xxx_event begin

    state start begin
        when 20338.chat."xxx_event" with pc.is_gm() begin
            --Variable
            local filename = xxx1
            local filename1 = xxx2        
            local map_index = 245
            local announcement = "xxx Event Started"
            --
            if game.get_event_flag("xxx_event") == 0 then
                say_title("xxxevent")
                say("Activate xxx Event?")
                local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                    if s == 3 then
                        return
                    end
                    if s == 2 then
                        notice_all(""..announcement.." by "..pc.get_name().."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
                    if s == 1 then
                        notice_all(""..Announcement.."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
            end
            if game.get_event_flag("xxx_event") == 1 then
                say_title("xxxevent")
                say("De-activate xxx Event?")
                local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                    if ss == 3 then
                        return
                    end
                    if ss == 2 then
                        notice_all("xxx Event is Over.All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
                    if ss == 1 then
                        notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
            end
        end
        --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 40")
            --timer("xxx_event1",60*20)
        --end
        --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 20")
            --timer("xxx_event2",60*20)
        --end
        --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Time is over !Thank you for particulate in event.")
            --timer("xxx_event_closer",1)
        --end
        when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
            say_title("Arya:")
            say("")
            say("Wanna have some Adventures ?")
            say("I take to the Land of trouble.")
            say("Let me see if you are prepared to endure the journey there.")
            say("")
            wait("Next")
            say_title("Arya:")
            say("")
            say_reward("You're ready?")
            local sss = select("Yes!","No")
                if sss == 2 then
                    return
                end
                if sss == 1 then
                    say_title("Arya:")
                    say("")
                    say("You are allowed to join.")
                    say("Off to the xxxland we go...")
                    say("")
                    wait("Okey,Let's go")
                    pc.setqf("xxx_event_signup", 1)
                    pc.warp(xxx,yyyy)
                end
        end
        when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
            notice("xxx Event is Over.You will be teleported to the town.")
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            timer("xxx_event_closer",1)
        end
        when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
            pc.setqf("xxx_event_signup", 1)
        end
        when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        end
    end
end

 

 

Problem is : i forget writte () after d.exit_all ^^ sorry for this....
Old:
 

Spoiler

d.exit_all

Fixed
 

Spoiler

        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------

 

Spoiler

Here no need clear_server_timer

timer automatically jumping to
when xxx_event_closer.timer begin
and whit this when i replaced
clear_server_timer(xxx_event)
Don't worry :D
 

Spoiler


            if game.get_event_flag("xxx_event") == 1 then
                say_title("xxxevent")
                say("De-activate xxx Event?")
                local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                    if ss == 3 then
                        return
                    end
                    if ss == 2 then
                        notice_all("xxx Event is Over.All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
                    if ss == 1 then
                        notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
            end

In the end i added this:
 

Spoiler

            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            clear_server_timer("xxx_event")

Spoiler

pc.setqf("xxx_event_signup", 0)
and
pc.delqf("xxx_event_signup")
all 2 function= pc.getqf("xxx_event_signup") == 0 :D

After i changed to
 

Spoiler

pc.setqf("xxx_event_signup", 0)

 

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

Ahh thank you so much i really like this 

 and i forgot or something wrong in editing my post 

i made 2 questions 

1) was with clear timer - you fixed it thanks
 
2)  that is when any player kills the boss within 1 hour or running time he will announced as winner and all must warp to town and event close .. and server time is cleared ... 

but i dont know where is my 2nd question went sorry for trouble you again and again.. 

and thanks in advance 

Link to comment
Share on other sites

1 hour ago, Human said:

Ahh thank you so much i really like this 

 and i forgot or something wrong in editing my post 

i made 2 questions 

1) was with clear timer - you fixed it thanks
 
2)  that is when any player kills the boss within 1 hour or running time he will announced as winner and all must warp to town and event close .. and server time is cleared ... 

but i dont know where is my 2nd question went sorry for trouble you again and again.. 

and thanks in advance 

2 replaced 2 spawner timer etc...
first row monster spawned (tier/rank 1-2-3-4 regen in map when killed XY number monster  Boss are spawned ! second row again tier/rank 1-2-3-4 monster spawned when killed again XY number monster
last boss appeared
Automatically ending :D
and clearing every flag every qf

Quote
Spoiler

quest xxx_event begin

    state start begin
        when 20338.chat."xxx_event" with pc.is_gm() begin
            --Variable
            local filename = xxx1
            local filename1 = xxx2        
            local map_index = 245
            local announcement = "xxx Event Started"
            --
            if game.get_event_flag("xxx_event") == 0 then
                say_title("xxxevent")
                say("Activate xxx Event?")
                local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                    if s == 3 then
                        return
                    end
                    if s == 2 then
                        notice_all(""..announcement.." by "..pc.get_name().."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
                    if s == 1 then
                        notice_all(""..Announcement.."")
                        regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        --notice_all("Event is over in 1 hour.")
                        --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval
                        ----------------------------------------
                    end
            end
            if game.get_event_flag("xxx_event") == 1 then
                say_title("xxxevent")
                say("De-activate xxx Event?")
                local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                    if ss == 3 then
                        return
                    end
                    if ss == 2 then
                        notice_all("xxx Event is Over.All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
                    if ss == 1 then
                        notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                        game.set_event_flag("xxx_event",0)
                        timer("xxx_event_closer",1)
                    end
            end
        end
        --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 40")
            --timer("xxx_event1",60*20)
        --end
        --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Remaining minutes number : 20")
            --timer("xxx_event2",60*20)
        --end
        --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
            --notice_all("Time is over !Thank you for particulate in event.")
            --timer("xxx_event_closer",1)
        --end
        when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
            say_title("Arya:")
            say("")
            say("Wanna have some Adventures ?")
            say("I take to the Land of trouble.")
            say("Let me see if you are prepared to endure the journey there.")
            say("")
            wait("Next")
            say_title("Arya:")
            say("")
            say_reward("You're ready?")
            local sss = select("Yes!","No")
                if sss == 2 then
                    return
                end
                if sss == 1 then
                    say_title("Arya:")
                    say("")
                    say("You are allowed to join.")
                    say("Off to the xxxland we go...")
                    say("")
                    wait("Okey,Let's go")
                    pc.setqf("xxx_event_signup", 1)
                    pc.warp(xxx,yyyy)
                end
        end
        when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
            notice("xxx Event is Over.You will be teleported to the town.")
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            timer("xxx_event_closer",1)
        end
        when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
            pc.setqf("xxx_event_signup", 1)
        end

        when XY.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin    --replace here monster's ID example when 101.kill or 102.kill etc...etc... etc... begin
            if game.get_event_flag("xxx_event") == 1 then
                if game.get_event_flag("killed_first_row") == 0 then
                    game.set_event_flag("Killed_troop_monster",game.get_event_flag("Killed_troop_monster")+1)
                    timer("killer",1)
                end
            end
        end
        when killer.timer begin
            if game.get_event_flag("Killed_troop_monster") == NUMBER_HERE then    --replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
                regen_in_map("..map_index..","data/dungeon/FILE_NAME_HERE.txt")    --create new txt whit name whatever_u_want replace here first boss or stone
            end
            if game.get_event_flag("Killed_troop_monster") < NUMBER_HERE then    --replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
            end
        end
        when XY.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin    --replace here first stone or Boss ID
            notice_all(""..pc.getname().." Killed the first boss/stones !")
            notice_all("Last row is incomming! 5 second and the bloody monster are spawned !Get ready!")
            timer("spawner",6)
            game.set_event_flag("killed_first_row",1)
        end
        when xy.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
            if game.get_event_flag("xxx_event") == 1 then
                if game.get_event_flag("killed_first_row") == 1 then
                    game.set_event_flag("Killed_troop_monsterz",game.get_event_flag("Killed_troop_monsterz")+1)
                    timer("killerz",1)
                end
            end
        end
        when killerz.timer begin
            if game.get_event_flag("Killed_troop_monsterz") == NUMBER_HERE then    --again replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
                regen_in_map("..map_index..","data/dungeon/FILE_NAME_HERE.txt")    --again create new txt whit name whatever_u_want replace here second boss or stone
            end
            if game.get_event_flag("Killed_troop_monsterz") < NUMBER_HERE then    --replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
            end
        end
        when XY.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin    --again replace here second stone or Boss ID
            if game.get_event_flag("xxx_event") == 1 then
                if game.get_event_flag("killed_first_row") == 1 then
                    notice_all(""..pc.getname().." Killed the last boss/stones !")
                    notice_all("Thank for particulate,")
                    timer("xxx_event_closer",1)
                end
            end
        end
        when spawner.timer begin
            notice_all("Monster's are spawned ! kill them' all!")
            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
        end
        when xxx_event.server_timer begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        clear_server_timer("xxx_event")
        end

        when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
        d.exit_all()
        --if not work with d.exit_all() replace whit this:
        ------------------------------------
        --warp_all_to_village()
        ------------------------------------
        pc.delqf("xxx_event_signup")
        pc.setqf("xxx_event_signup", 0)
        game.set_event_flag("xxx_event",0)
        clear_server_timer("xxx_event")
        game.set_event_flag("Killed_troop_monsterz",0)
        game.set_event_flag("Killed_troop_monster",0)
        game.set_event_flag("killed_first_row",0)
        end
    end
end

 

 

 

 

  • Love 1

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

Thanks for this i really appreciate you for spending time with me 
and i get this error when i compile it 
RunState: LUA_ERROR: [string "trail_event"]:14: attempt to concatenate local `filename' (a nil value)
SYSERR: Jun 12 18:51:22 :: WriteRunningStateToSyserr: LUA_ERROR: quest trail_event.start click

Link to comment
Share on other sites

I solved that 

On 6/13/2017 at 8:28 AM, Human said:

Thanks for this i really appreciate you for spending time with me 
and i get this error when i compile it 
RunState: LUA_ERROR: [string "trail_event"]:14: attempt to concatenate local `filename' (a nil value)
SYSERR: Jun 12 18:51:22 :: WriteRunningStateToSyserr: LUA_ERROR: quest trail_event.start click

I solved this but timer is not running 

                        game.set_event_flag("xxx_event",1)
                        server_timer("xxx_event",60*60)
                        ----------------------------------------
                        notice_all("Event is over in 1 hour.")
                        timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                        --Timer function.Be activation remove " -- "
                        --Default i set 1 hour time interval

not working
timer is not running 

Link to comment
Share on other sites

  • 1 month later...
  • Premium
16 hours ago, [007]DawisHU said:

Hello i again active i see u problem try this :D
 

server_timer("xxx_event",60*60)  remove " , "  --> server_timer("xxx_event"60*60)

 

  • Love 2

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 1 month later...
  • Premium

I don't know wether you have a problem with me, but i don't care much, just don't spread false informations, i work daily for everybody, and anyone an confirm i'm always up for more works or bugfixes.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.