I have a server with a working PK mode which enables the user to enter a mode where it can attack and be attacked by others users only if they also have the PK mode turned on.
This affects the entire server to have all maps with PvP flags.
Everything was fine until Quagmire and traps such as Claymore Trap also affects the caster, in which cases, leads to the user not even wanting to use the skill since it's a huge risk when leveling.
We have made some changes so skills such as Quagmire and Claymore Trap does not affect the caster, this may also happen within WoE/BG.
Problem is, Shadow Chaser-users who wish to use Manhole > Shadow Form > proceed to lay multiple Claymore Traps and step on them to deal damage to the target in the Manhole, won't be able to trigger the Claymore Traps with this protection.
What I would like to have is to change the code so the mines/quagmire can affect you, regardless if you are inside or outside of WoE/BG maps, only if you activate the PK mode. Meaning, if you have PK mode OFF, these traps/claymore won't affect you if you step on them.
Another alternative which can also work, is to change the code so it always affect you if you are in WoE/BG maps.
Code within skill.c
...
case HT_CLAYMORETRAP:
case HT_LANDMINE:
case MA_LANDMINE:
...
case RA_ICEBOUNDTRAP:
case RL_B_TRAP:
{
struct skill_condition req = skill_get_requirement(sd,skill_id,skill_lv);
ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_TRAP || req.itemid[i] == ITEMID_TRAP_ALLOY));
if( i != MAX_SKILL_ITEM_REQUIRE && req.itemid[i] )
req_item = req.itemid[i];
if( map_flag_gvg(src->m) || map[src->m].flag.battleground )
limit *= 4; // longer trap times in WOE [celest]
//if( battle_config.vs_traps_bctall && map_flag_vs(src->m) && (src->type&battle_config.vs_traps_bctall) )
// target = BCT_ALL;
}
break;
As you can see, there are two commented lines so the casters won't get affected by these skills. How can I change this so casters can affect themselves only in WoE/BG maps or only if PK mode is enabled?
Question
OscarScorp
Hello everyone,
I have a server with a working PK mode which enables the user to enter a mode where it can attack and be attacked by others users only if they also have the PK mode turned on.
This affects the entire server to have all maps with PvP flags.
Everything was fine until Quagmire and traps such as Claymore Trap also affects the caster, in which cases, leads to the user not even wanting to use the skill since it's a huge risk when leveling.
We have made some changes so skills such as Quagmire and Claymore Trap does not affect the caster, this may also happen within WoE/BG.
Problem is, Shadow Chaser-users who wish to use Manhole > Shadow Form > proceed to lay multiple Claymore Traps and step on them to deal damage to the target in the Manhole, won't be able to trigger the Claymore Traps with this protection.
What I would like to have is to change the code so the mines/quagmire can affect you, regardless if you are inside or outside of WoE/BG maps, only if you activate the PK mode. Meaning, if you have PK mode OFF, these traps/claymore won't affect you if you step on them.
Another alternative which can also work, is to change the code so it always affect you if you are in WoE/BG maps.
Code within skill.c
As you can see, there are two commented lines so the casters won't get affected by these skills. How can I change this so casters can affect themselves only in WoE/BG maps or only if PK mode is enabled?
This is my PK mode in my atcommand.c, taken from https://rathena.org/board/topic/65606-pk-mode-onoff/
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.