Jump to content
  • 0

Question

Posted
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index 8f072cd70..bbaa74967 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -495,6 +495,8 @@ ACMD_FUNC(mapmove)
 
 	nullpo_retr(-1, sd);
 
+	if (!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) {
+	
 	memset(map_name, '\0', sizeof(map_name));
 
 	if (!message || !*message ||
@@ -537,6 +539,11 @@ ACMD_FUNC(mapmove)
 	}
 
 	clif_displaymessage(fd, msg_txt(sd,0)); // Warped.
+	} else {
+		memset(atcmd_output, '\0', sizeof(atcmd_output));
+		sprintf(atcmd_output, "Please wait %d seconds before warping.", battle_config.prevent_logout/1000);
+		clif_displaymessage(fd, atcmd_output); 
+	}
 	return 0;
 }
 
@@ -1918,6 +1925,8 @@ ACMD_FUNC(go)
 
 	nullpo_retr(-1, sd);
 
+	if (!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) {
+	
 	if( map_getmapflag(sd->bl.m, MF_NOGO) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) {
 		clif_displaymessage(sd->fd,msg_txt(sd,995)); // You cannot use @go on this map.
 		return 0;
@@ -2059,6 +2068,12 @@ ACMD_FUNC(go)
 		return -1;
 	}
 
+	} else {
+		memset(atcmd_output, '\0', sizeof(atcmd_output));
+		sprintf(atcmd_output, "Please wait %d seconds before warping.", battle_config.prevent_logout/1000);
+		clif_displaymessage(fd, atcmd_output); 
+	}
+	
 	return 0;
 }
 
-- 
2.22.0.windows.1

how to make this script works in players & MVP boss only!

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...