summaryrefslogblamecommitdiff
path: root/npc/commands/resync.txt
blob: e95319acd998e0cd35dad1414972e714fba88638 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                   



                                                            
                                        
                                                         

            

                                
                                          
      
                          
      


        
                                                    

        
// TMW2 script
// Author: Jesusalva <admin@tmw2.org>
//
// Introduces @resync
// 
// It'll cast slide to your own position
// Hopefully making client update your real position without causing server warning


-	script	@resync	32767,{
    end;

OnCall:
    if (ispcdead()) {
        dispbottom l("Impossible to resync: You are dead.");
        end;
    }
    if (@rsync_delay > gettimetick(2)) {
        dispbottom l("Not resync'ing to prevent flood.");
        end;
    }
    getmapxy(.@m$, .@x, .@y, 0);
    slide .@x, .@y;
    @rsync_delay=gettimetick(2)+rand(4,6);
    /*
    atcommand("@refresh");
    */
    end;

OnInit:
    bindatcmd "resync", "@resync::OnCall", 0, 60, 0;
    end;
}