Jump to content
  • 0

Timer dungeon problem


xKnox

Question

Hello there, I'm using this quest for the Razador Purgatory: 

quest BlazingPurgatory_Zone begin
    state start begin
        when login with BlazingPurgatory.isInDungeon() begin
            local data = BlazingPurgatory.ReturnData();
            local outside_coords_l = data["outside_Pos"];
            local FirstBossCoords = data["boss_Posit"];
            
            d.set_warp_location(data["outside_index"], outside_coords_l["x"], outside_coords_l["y"]);
            if (party.is_party() and party.is_leader() or not party.is_party()) then
                d.spawn_mob(data["PurgatoryKing"], FirstBossCoords["x"], FirstBossCoords["y"]);
                d.regen_file(get_locale_base_path().."/quest/dungeon/flame_dungeon/blazingpurgatory_monster_7.txt");
                server_timer("blazingpurgatory_time_out", data["time_until_you_got_kicked"], d.get_map_index());
                
                d.notice(string.format("From now on you will have %s.", get_time_format(data["time_until_you_got_kicked"])))
                d.notice("to complete the dungeon.")
            end
        end
        
        when logout with BlazingPurgatory.isInDungeon() begin
            local data = BlazingPurgatory.ReturnData();
            
            if (data["time_after_you_complete_the_dungeon"] > 0) then
                local party_pids = party_get_member_pids();
                
                BlazingPurgatory.setWatingTime(party_pids);
            end
        end
        
        when kill with BlazingPurgatory.isInDungeon() begin
            local data = BlazingPurgatory.ReturnData();
            
            if npc.get_race() == data["PurgatoryKing"] then
                clear_server_timer("blazingpurgatory_time_out", get_server_timer_arg());
                
                server_timer("blazingpurgatory_time_out", 60, d.get_map_index());
                BlazingPurgatory.ClearDungeon();
                
                d.notice(" Congralutions, Razador was defeated.")
                d.notice(" You will be teleported in 60 seconds.")
            end
        end
        
        when blazingpurgatory_time_out.server_timer begin
            if (d.select(get_server_timer_arg())) then
                d.notice("Time expired, you will be teleported outside.")
                d.exit_all();
            end
        end
        
        when 20394.chat."Enter the BlazingPurgatory" with not BlazingPurgatory.isInDungeon() begin
            say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
            say("Would you like to enter and destroy the Razador?")
            if (select("Yes", "No") == 1) then
                if BlazingPurgatory.CheckInfo() then
                    BlazingPurgatory.EnterInDungeon();
                end
            end
        end
    end
end

The problem is that the timer is not working at all, I can re-enter the dungeon how many times I want, could you please tell me what's wrong or anything that can help me?

Link to post

15 answers to this question

Recommended Posts

  • 0
  • Developer
3 hours ago, WeedHex said:

; in LUA ahaha

Let me clear this up for you: The quest clearly comes from Braxy, and Braxy copied a lot of my old code.

 

";" is one of the little things I use in Lua, like a signature, that helps me determine wether or not that code snippet is mine, cause I'm the only one who does it, and changes virtually nothing, so there's nothing to laugh about.

 

Also could you please not comment unless you wanna try and be helpful? 

Edited by Syreldar
  • Lmao 1

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to post
  • 0
  • Developer
6 hours ago, xKnox said:

Hello there, I'm using this quest for the Razador Purgatory: 

quest BlazingPurgatory_Zone begin
    state start begin
        when login with BlazingPurgatory.isInDungeon() begin
            local data = BlazingPurgatory.ReturnData();
            local outside_coords_l = data["outside_Pos"];
            local FirstBossCoords = data["boss_Posit"];
            
            d.set_warp_location(data["outside_index"], outside_coords_l["x"], outside_coords_l["y"]);
            if (party.is_party() and party.is_leader() or not party.is_party()) then
                d.spawn_mob(data["PurgatoryKing"], FirstBossCoords["x"], FirstBossCoords["y"]);
                d.regen_file(get_locale_base_path().."/quest/dungeon/flame_dungeon/blazingpurgatory_monster_7.txt");
                server_timer("blazingpurgatory_time_out", data["time_until_you_got_kicked"], d.get_map_index());
                
                d.notice(string.format("From now on you will have %s.", get_time_format(data["time_until_you_got_kicked"])))
                d.notice("to complete the dungeon.")
            end
        end
        
        when logout with BlazingPurgatory.isInDungeon() begin
            local data = BlazingPurgatory.ReturnData();
            
            if (data["time_after_you_complete_the_dungeon"] > 0) then
                local party_pids = party_get_member_pids();
                
                BlazingPurgatory.setWatingTime(party_pids);
            end
        end
        
        when kill with BlazingPurgatory.isInDungeon() begin
            local data = BlazingPurgatory.ReturnData();
            
            if npc.get_race() == data["PurgatoryKing"] then
                clear_server_timer("blazingpurgatory_time_out", get_server_timer_arg());
                
                server_timer("blazingpurgatory_time_out", 60, d.get_map_index());
                BlazingPurgatory.ClearDungeon();
                
                d.notice(" Congralutions, Razador was defeated.")
                d.notice(" You will be teleported in 60 seconds.")
            end
        end
        
        when blazingpurgatory_time_out.server_timer begin
            if (d.select(get_server_timer_arg())) then
                d.notice("Time expired, you will be teleported outside.")
                d.exit_all();
            end
        end
        
        when 20394.chat."Enter the BlazingPurgatory" with not BlazingPurgatory.isInDungeon() begin
            say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
            say("Would you like to enter and destroy the Razador?")
            if (select("Yes", "No") == 1) then
                if BlazingPurgatory.CheckInfo() then
                    BlazingPurgatory.EnterInDungeon();
                end
            end
        end
    end
end

The problem is that the timer is not working at all, I can re-enter the dungeon how many times I want, could you please tell me what's wrong or anything that can help me?

Your problem is unclear to me, could you please describe it better and also provide the Library file I'm sure comes with the quest? Thanks.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to post
  • 0
  • Developer
19 minutes ago, WeedHex said:

I knew it xD

QC compiler ignore them, so useless. Btw they stole/copied your codes? It means you're a good LUA boy, dont help them ;) 

Braxy did and sold quests to many, this guy is one of them. 

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to post
  • 0
  • VIP
7 hours ago, Syreldar said:

Braxy did and sold quests to many, this guy is one of them. 

This is one of my "creations" from 2018, a shit quest tbh. I was still learning back then and it was not sold for too many people, i sold it to like two people and it got spread everywhere. I don't really care about these quests anymore that's why i don't said anything.

As long as I'll be a threat for you , i will always be your target :3

Link to post
  • 0
7 hours ago, WeedHex said:

I knew it xD

QC compiler ignore them, so useless. Btw they stole/copied your codes? It means you're a good LUA boy, dont help them ;) 

I didn't stole anything, I paid for this quest. This one was sold by another guy, I couldn't know if he was the original author, I'm sorry.

6 hours ago, Syreldar said:

Braxy did and sold quests to many, this guy is one of them. 

I'm really sorry about this situation, I really didn't know, there was another guy that sold me this quest, not Braxy, and he's not responding to anything, the irony :). The quest didn't come with any lib files, he told me this is all I need so I can get to the Razador directly without doing the run and that's what I needed. The timer is completely fucked up basically, I can enter the dungeon, kill Razador but I can do it for how many times I want because the timer is not working, so if I killed the Razador now after I'm being teleported outside I can do it again at the same time..

This is what I receive in sysser:

 

SYSERR: Dec 6 22:59:29 :: RunState: LUA_ERROR: [string "BlazingPurgatory_Zone"]:3: attempt to call global `party_get_member_pids' (a nil value) SYSERR: Dec 6 22:59:29 :: WriteRunningStateToSyserr: LUA_ERROR: quest BlazingPurgatory_Zone.start click

 

I have party_get_member_pids in quest_function and questlua_party.cpp

I'm really stuck here, I don't know what should I do..

Link to post
  • 0
  • VIP
1 minute ago, xKnox said:

I didn't stole anything, I paid for this quest. This one was sold by another guy, I couldn't know if he was the original author, I'm sorry.

I'm really sorry about this situation, I really didn't know, there was another guy that sold me this quest, not Braxy, and he's not responding to anything, the irony :). The quest didn't come with any lib files, he told me this is all I need so I can get to the Razador directly without doing the run and that's what I needed. The timer is completely fucked up basically, I can enter the dungeon, kill Razador but I can do it for how many times I want because the timer is not working, so if I killed the Razador now after I'm being teleported outside I can do it again at the same time..

This is what I receive in sysser:

 

SYSERR: Dec 6 22:59:29 :: RunState: LUA_ERROR: [string "BlazingPurgatory_Zone"]:3: attempt to call global `party_get_member_pids' (a nil value) SYSERR: Dec 6 22:59:29 :: WriteRunningStateToSyserr: LUA_ERROR: quest BlazingPurgatory_Zone.start click

 

I have party_get_member_pids in quest_function and questlua_party.cpp

I'm really stuck here, I don't know what should I do..

As i said, these quests were spread everywhere. The problem comes because you don't have a func that returns the player pids from party.

party_get_member_pids = function()
    local pids = {party.get_member_pids()};
    return pids;
end

add this in questlib

  • Good 1

As long as I'll be a threat for you , i will always be your target :3

Link to post
  • 0
47 minutes ago, Braxy said:

As i said, these quests were spread everywhere. The problem comes because you don't have a func that returns the player pids from party.

party_get_member_pids = function()
    local pids = {party.get_member_pids()};
    return pids;
end

add this in questlib

I see, didn't know anything about this, sorry

Yes, now it's working, thank you!

But there's another issue, after I killed the Razador I'm being teleported to the same map: http://prntscr.com/vxflyj and it's something like this .

235 metin2_map_n_flame_dungeon_01
And that's the index, I think it doesn't change it after I'm being teleported, how could I change this?

Link to post
  • 0
  • Developer
2 hours ago, xKnox said:

I see, didn't know anything about this, sorry

Yes, now it's working, thank you!

But there's another issue, after I killed the Razador I'm being teleported to the same map: http://prntscr.com/vxflyj and it's something like this .

235 metin2_map_n_flame_dungeon_01
And that's the index, I think it doesn't change it after I'm being teleported, how could I change this?

The lib is there, it's the file that contains the functions like "BlazingPurgatory.ReturnData()" provide it if possible.

 

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to post
  • 0
  • Developer
Quote

d.set_warp_location(data["outside_index"], outside_coords_l["x"], outside_coords_l["y"]);

use

Quote

pc.set_warp_location(data["outside_index"], outside_coords_l["x"], outside_coords_l["y"]);

 

make sure ["outside_Pos"] are correct.

Edited by Syreldar

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to post
  • 0
  • Developer

The only 2 other errors i see in the quest are the usage of game.get_event_flags to assign a personal flag to a player and deleting a clear_server_timer using get_server_timer_arg() outside of server_timer scope, but the error you're getting depends solely on you, the set_warp_location snippet is fine.

Edited by Syreldar

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to post
  • 0
1 hour ago, Syreldar said:

The only 2 other errors i see in the quest are the usage of game.get_event_flags to assign a personal flag to a player and deleting a clear_server_timer using get_server_timer_arg() outside of server_timer scope, but the error you're getting depends solely on you, the set_warp_location snippet is fine.

Well, I have no idea, the mapindex is good, the coordonates are good, but it's still teleporting me to the same mapindex as the razador out of no where..

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • 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.