// Evol scripts. // Author: // Jesusalva // Description: // No sitting or standing on Prsm 008-1,0,0,0 script #PrsmGuard NPC_HIDDEN,0,0,{ OnInit: .accid=0; .active=false; end; OnPCLogin: if (strcharinfo(0) == "Prsm") { initnpctimer; .accid=getcharid(3); } end; OnTimer5000: if (!attachrid(.accid)) { stopnpctimer; .accid=0; .active=false; end; } // Prsm is attached getmapxy(.@m$, .@x, .@y ,0); if (.@m$ != "008-1" && .active) { movenpc .name$, .@x, .@y; .active=false; } else if (.@m$ == "008-1") { .active=true; movenpc .name$, .@x, .@y; } end; OnTouch: // GMs can stand/sit on Prsm because they might be Prsm >.> if (getgroupid()) end; // Start timer (in case player just passed by, and is not trying to annoy Prsm) addtimer 2000, "#PrsmGuard::OnWarning"; end; OnUnTouch: deltimer("#PrsmGuard::OnWarning"); end; OnWarning: switch (@prsm_warning) { case 0: case 3: dispbottom l("Sitting or standing in Prsm is prohibted. Please move peacefully."); break; case 1: case 4: case 7: dispbottom l("Sitting or standing in Prsm is prohibted. YOU HAVE BEEN WARNED!"); break; case 2: case 5: case 8: dispbottom l("Moving player preventively."); getmapxy(.@m$, .@x, .@y, 0); slide .@x+any(1,-1), .@y+any(1,-1); break; case 6: case 9: dispbottom l("Moving and killing player preventively."); getmapxy(.@m$, .@x, .@y, 0); slide .@x+any(1,-1), .@y+any(1,-1); percentheal -100, -100; break; case 10: default: dispbottom l("Preventively banning annoying player so Prsm can rest in peace."); getmapxy(.@m$, .@x, .@y, 0); slide .@x+any(1,-1), .@y+any(1,-1); atcommand "@ban 10mn "+strcharinfo(0); // This is half sane, half insane break; } @prsm_warning+=1; addtimer rand(3800, 4800), "#PrsmGuard::OnWarning"; end; }