Jump to content
  • 0

about anti disguise in pvp


Question

Posted (edited)

prontera,51,67,5 script pvp 730,{
set .@mapcount_1,getmapusers("guild_vs3");
set .@mapcount_2,getmapusers("final_dest");
set .@mapcount_3,getmapusers("guild_vs2");
set .@mapcount_4,getmapusers("guild_vs1");
while(1) {
switch(select("["+.@mapcount_1+"/128] Pvp Arena:["+.@mapcount_2+"/128] Pvp Arena 2:["+.@mapcount_3+"/128] Solo PVP:["+.@mapcount_4+"/128] Baby Job PVP:Cancel")){
case 1:
if(Disguised == 1) goto L_disguised;
callsub S_CheckPVPRoom,@mapcount_1,"guild_vs3.gat";
break;
case 2:
if(Disguised == 1) goto L_disguised;
callsub S_CheckPVPRoom,@mapcount_2,"guild_vs5.gat";
break;
case 3:
if(Disguised == 1) goto L_disguised;
callsub S_CheckPVPRoom,@mapcount_3,"guild_vs2.gat";
break;
case 4:
if(Disguised == 1) goto L_disguised;
callsub S_CheckPVPRoom,@mapcount_4,"guild_vs1.gat";
break;
case 5:
close;

}

L_disguised:
mes "[PvP Arena]";
mes "Sorry but disguised players are not allowed to enter the pvp room.";
close;

OnInit:
  waitingroom "PVP Arena",0;
  end;

}
S_CheckPVPRoom:
if (getarg(0) >= 128) {
mes "[PVP Fight Square Reception Staff]";
mes "This map is currently full.";
next;
return;
}
else {
warp getarg(1),0,0;
announce ""+ strcharinfo(0) +" has entered the PvP Room.",bc_all,0x99ff00;
end;
}
}

Why player with disguised can join pvp room?? anyone can fix?

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.

8 answers to this question

Recommended Posts

Posted (edited)

Because some other gm will use @disguise commands to player.. ^_^

Because of @disguise commands, no other disguise npc or script.

Edited by domon99
Posted (edited)
Because some other gm will use @disguise commands to player.. ^_^

Because of @disguise commands, no other disguise npc or script.

in atcommand.c

change this:

ACMD_FUNC(disguise)
{
int id = 0;
nullpo_retr(-1, sd);
if (!message || !*message) {
 clif_displaymessage(fd, "Please, enter a Monster/NPC name/id (usage: @disguise <monster_name_or_monster_ID>).");
 return -1;
}

to this:

ACMD_FUNC(disguise)
{
int id = 0;
nullpo_retr(-1, sd);
// For PVP
if ((map[sd->bl.m].flag.pvp) && (pc_isGM(sd) < 99)) {
 clif_displaymessage(sd->fd,"You can not use this command on pvp map.");
 return -1;
}
// For GVG
if ((map[sd->bl.m].flag.gvg) && (pc_isGM(sd) < 99)) {
 clif_displaymessage(sd->fd,"You can not use this command on gvg map.");
 return -1;
}
if (!message || !*message) {
 clif_displaymessage(fd, "Please, enter a Monster/NPC name/id (usage: @disguise <monster_name_or_monster_ID>).");
 return -1;
}

recomplie your server, use both your script and my fix

Edited by Gennosuke Kouga
  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...