Can anyone help me on how to prevent usage of Fly Wing, Butterfly Wing and Teleport Skill when attacked by "Player" on a field/dungeon that is PVP On?
But if the player didn't attack/attacked by any player, he/she can use those items/skill and like a normal map.
But if the player attack other player or being attacked by other player, he/she can't use it.
I tried to add this on skill.cpp but it doesn't work.
case AL_TELEPORT:
case ALL_ODINS_RECALL:
if(sd)
{
+ if (!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) {
+ char output[128];
+ sprintf(output, "Please wait %d seconds before warping.", battle_config.prevent_logout/1000);
+ clif_displaymessage(sd->fd, output);
+ break;
+ }
This code is from @Mabuhay's @go/@warp prevents when attacked/attack.
Question
KazumaSatou
Can anyone help me on how to prevent usage of Fly Wing, Butterfly Wing and Teleport Skill when attacked by "Player" on a field/dungeon that is PVP On?
But if the player didn't attack/attacked by any player, he/she can use those items/skill and like a normal map.
But if the player attack other player or being attacked by other player, he/she can't use it.
I tried to add this on skill.cpp but it doesn't work.
case AL_TELEPORT: case ALL_ODINS_RECALL: if(sd) { + if (!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) { + char output[128]; + sprintf(output, "Please wait %d seconds before warping.", battle_config.prevent_logout/1000); + clif_displaymessage(sd->fd, output); + break; + }
This code is from @Mabuhay's @go/@warp prevents when attacked/attack.
Link to comment
Share on other sites
3 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.