Jump to content
  • 0

Script that disables @refresh in PvP?


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Script that disables @refresh in PvP or no @commands.

Edited by Dreamworks
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

try this

on atcommand.c
 

ACMD_FUNC(refresh)
{
    nullpo_retr(-1, sd);

if ( map[m].flag.pvp  ) {
        clif_displaymessage(fd, "Refresh in pvp is not allowed");
        return -1;
}

    clif_refresh(sd);
    return 0;
}
Edited by TrojanWorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Do I just add this anywhere in atcommand

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

No search in atcommand.c

ACMD_FUNC(refresh)

and replace the current function by TrojanWorm's function

 

 

 

 

 

 

 

You also can block @refresh on pvp map with npc script

-	script	refresh_pvp	-1,{
OnInit:
	bindatcmd "refresh",strnpcinfo(0) +"::OnRefresh";
	end;
OnRefresh:
	if( getmapflag( strcharinfo(3),mf_pvp ) )
		message strcharinfo(0),"@refresh is not allowed in pvp map.";
	end;
}
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...