summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-01-21 14:03:28 -0200
committerJesusaves <cpntb1@ymail.com>2019-01-21 14:03:28 -0200
commit3b7c866a6dec40395c3ad0fdc0a9f9ad5edbf5a1 (patch)
tree7ab57d057c7eea6dd77d862a3020844130edbbdf
parenta671627f9434bf38484d68fae59f4626f88f338b (diff)
downloadserverdata-3b7c866a6dec40395c3ad0fdc0a9f9ad5edbf5a1.tar.gz
serverdata-3b7c866a6dec40395c3ad0fdc0a9f9ad5edbf5a1.tar.bz2
serverdata-3b7c866a6dec40395c3ad0fdc0a9f9ad5edbf5a1.tar.xz
serverdata-3b7c866a6dec40395c3ad0fdc0a9f9ad5edbf5a1.zip
Introduce @resyncall per player request (maybe @resync2 would be a better name?)
-rw-r--r--npc/commands/resync.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/npc/commands/resync.txt b/npc/commands/resync.txt
index e95319acd..ec0c146a9 100644
--- a/npc/commands/resync.txt
+++ b/npc/commands/resync.txt
@@ -5,11 +5,15 @@
//
// It'll cast slide to your own position
// Hopefully making client update your real position without causing server warning
-
+//
+// This also introduces @resyncall
+// Which is an alias for @refresh and causes client to reload the whole map,
+// Including yourself and monsters.
- script @resync 32767,{
end;
+// Soft Resync
OnCall:
if (ispcdead()) {
dispbottom l("Impossible to resync: You are dead.");
@@ -22,12 +26,20 @@ OnCall:
getmapxy(.@m$, .@x, .@y, 0);
slide .@x, .@y;
@rsync_delay=gettimetick(2)+rand(4,6);
- /*
+ end;
+
+// Hard Resync
+OnCallRefresh:
+ if (@rsync_delay > gettimetick(2)) {
+ dispbottom l("Not resync'ing to prevent flood.");
+ end;
+ }
+ @rsync_delay=gettimetick(2)+rand(4,6);
atcommand("@refresh");
- */
end;
OnInit:
bindatcmd "resync", "@resync::OnCall", 0, 60, 0;
+ bindatcmd "resyncall", "@resync::OnCallrefresh", 0, 60, 0;
end;
}