Jump to content
  • 0

How to make changing maps behave the same as relogging


johnbond

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

I would like to request for a modification in SRC so that changing maps (maybe on death) of a player will also be the same as relogging but ONLY with regards to the "guild_skill_relog_delay: yes".

 

 

// Activate guild skills delay by relog? (Note 1)
// Official setting is "yes", otherwise allow guild leaders to relog to cancel the 5 minute delay.
guild_skill_relog_delay: yes

 

Meaning if a player reconnects "or changes maps" (lets say in WoE wherein death will warp you back to savepoint), the delay to recast a guild skill will kick in for both conditions.

 

Thank you very much guys!

 

 

 

EDIT: Oops I am sorry, this should have been posted in the Source Source Requests . Kindly move for me to avoid opening multiple posts. Thank you.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Shouldn't you ask this in source request instead ?

http://rathena.org/board/forum/36-source-requests/

 

Otherwise what you want would be in

pc.c::pc_dead:

if( map_flag_gvg(sd->bl.m) ) {
        add_timer(tick+1000, pc_respawn_timer, sd->bl.id, 0);

        if (sd->status.guild_id && sd->state.gmaster_flag && battle_config.guild_skill_relog_delay) //if were dead on gvg map are guildmaster and have the config set the delay on
                guild_block_skill(sd, battle_config.guild_skill_relog_delay);
        return 1|8;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Oh nice!

 

So is this correct? :

	//GvG
	if( map_flag_gvg(sd->bl.m) )
	{
		add_timer(tick+1000, pc_respawn_timer, sd->bl.id, 0);
		+if (sd->status.guild_id && sd->state.gmaster_flag && battle_config.guild_skill_relog_delay) //if were dead on gvg map are guildmaster 
		+guild_block_skill(sd, battle_config.guild_skill_relog_delay);
		return 1|8;
	}

Regarding the wrong section, I apologize its late when I realized I was on the scripts request rather than on the source requests. Maybe sleepy sorry hehe.

 

Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

if that a diff yes, otherwise remove the + before.

note I didn't try it but that should work ye. You didn't mention where the char should be dead from so I assum it was from a gvg map.

But anyway you got the code and the section where that should be more or less so you should be able to manage now =)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

if that a diff yes, otherwise remove the + before.

note I didn't try it but that should work ye. You didn't mention where the char should be dead from so I assum it was from a gvg map.

But anyway you got the code and the section where that should be more or less so you should be able to manage now =)

 

Oh its kinda not working.

 

1. I had set EC coodlown for only 30 secs but when guild_skill_relog_delay: the cooldown is set to 5 mins.

2. On agitstart

3. guild master in castle

4. Killed guild master and guild master respawned to the savepoint

5. guild master can recast emergency call even right after death. It should not be able to cast EC because of the delay on guild skills after recon. (in this case death)

 

WHat I want is that the reconnect and death will both give guild_skill_relog_delays

 

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

I had set EC coodlown for only 30 secs but when guild_skill_relog_delay: the cooldown is set to 5 mins.

Hmm well then you should set guild_skill_relog_delay = 0, but i'm not even sure that will take the cooldown from skill_cast_db.txt (that what you was refering too ye ?)

You'll probably need to do some other src edit to replace

guild_block_skill(g->member[0].sd, battle_config.guild_skill_relog_delay);

by

guild_block_skill(g->member[0].sd, skill_get_cooldown(skillid,skilllv) );

=> but guild_block_skill will set the same delay to all the guildskill so that an issues...

 

Otherwise for the case he's able to recast just after idk, are you sure you have recompiled right ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

I had set EC coodlown for only 30 secs but when guild_skill_relog_delay: the cooldown is set to 5 mins.

Hmm well then you should set guild_skill_relog_delay = 0, but i'm not even sure that will take the cooldown from skill_cast_db.txt (that what you was refering too ye ?)

You'll probably need to do some other src edit to replace

guild_block_skill(g->member[0].sd, battle_config.guild_skill_relog_delay);

by

guild_block_skill(g->member[0].sd, skill_get_cooldown(skillid,skilllv) );

=> but guild_block_skill will set the same delay to all the guildskill so that an issues...

 

Otherwise for the case he's able to recast just after idk, are you sure you have recompiled right ?

 

Actually what I want to achieve is when the guild master does not reconnect or does not die they will have shorter guild skill delays. only 30 secs as set in my skill_cast_db.

 

But when the guild master dies then their delay to recast guild skills will be longer (5mins) which is set at

guild_skill_relog_delay: yes

 

 

 

// Activate guild skills delay by relog? (Note 1)

// Official setting is "yes", otherwise allow guild leaders to relog to cancel the 5 minute delay.

guild_skill_relog_delay: yes

 

 

Sadly the default setting above is only for "relog" and not for "death" or "change map". What I want is the "relog" and "death" and "change map" will all have guild_skill_relog_delays.

 

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

// Activate guild skills delay by relog?
// Official setting is 5 minutes (300000 ms), otherwise allow guild leaders to relog to cancel the 5 minute delay.
guild_skill_relog_delay: 300000

 

That how the config should be in last version, we no longer use yes as value but the amout of millisecond to block the skill.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

// Activate guild skills delay by relog?

// Official setting is 5 minutes (300000 ms), otherwise allow guild leaders to relog to cancel the 5 minute delay.

guild_skill_relog_delay: 300000

 

That how the config should be in last version, we no longer use yes as value but the amout of millisecond to block the skill.

 

 

Yes I understand but what I want is that the relog and the death and the change map will all have the same delays. Because right now the guild_skill_relog_delay only works for the relog but not for the death and change map.

 

How can we make that the death and change map will be like the player relogged with regards to the guild_skill_relog_delay.

 

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

With the code I gave you few post before,

It will wait the player is dead and if he was under a gvg map he will have the delay.

 

If you want to apply the delay everytime a player change map you could look at pc_setpos into the

if( sd->state.changemap ) {

 ...

}

But that would be on everymap change meaning that when you enter the castle since you entering a new map you'll have to wait 5min before casting..

 

If you want to apply the delay for every kind of dead well taht still in pc_dead just found another more suitable location, you could just put if after the

if( map_flag_gvg(sd->bl.m) )
{
}

 

Biw about "Because right now the guild_skill_relog_delay only works for the relog but not for the death and change map." that just a name you could use it for everything you want and that what we're doing right now.

Now the code I had given you probably not work cause you have outdated version and your

lecture of guild_skill_relog_delay in battle.c is probably this

    { "guild_skill_relog_delay",            &battle_config.guild_skill_relog_delay,         1, 0,      1,        },

instead of this :

    { "guild_skill_relog_delay",            &battle_config.guild_skill_relog_delay,         300000, 0,      INT_MAX,        },
right ?

Anyway you could try with this intead:

guild_block_skill(sd, 300000);
       

 

 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Still not working. I have already set this in the battle.c

{ "guild_skill_relog_delay",            &battle_config.guild_skill_relog_delay,         300000, 0,      INT_MAX,        },

But still everytime the guild master changes maps or dies, he still has the fast guild skill delays and not the penalty of 5 mins.

 

Actually what I experienced was, when gm changes maps he has the 30 secs guild skill cooldown as set in skill_cast_db but when the gm dies he can almost re-cast guild skills immediately upon respawn, not even needing to wait for 30 secs. Maybe there is something wrong on our code on pc.c.

 

We can just make it when guild master dies, because if he dies on GVG map he will be kicked out and change map as well.

 

What I want is upon death of a guild master on a gvg map he will get the penalty of 5 min guild skill delay, similar to like relogging.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...