check macroing players
Posted: Sun Mar 09, 2008 5:26 am
is there a script that checks whether a use is away popping a window ?
https://www.forums.polserver.com/
Code: Select all
use uo;
use os;
use util;
use basic;
program unattended( who )
var gflayout := {
"noclose",
"nodispose",
"nomove",
"page 0",
"resizepic 10 10 2600 300 150",
"text 70 25 32 0",
"text 70 40 32 1",
"text 70 55 32 2",
"text 70 70 32 3",
"text 70 85 32 4",
"button 130 115 249 248 1 1 1"
};
var gfdata := {
"You have been suspected",
"of unattended macroing.",
"Use the command ",
".macropass PASSWORD"
};
var targ := target(who);
if (!targ.acct)
sendsysmessage(who,"That is not a player. Choose again wise guy.");
return(0);
elseif(GetObjProperty(targ, "macroPW"))
sendsysmessage(who,"That player is already marked for Macroing.");
return(0);
endif
var size;
var SRV := randomInt(30000);
size := len(gfdata);
gfdata[size+1] := "Your password is: "+SRV+".";
SetObjProperty(targ, "macroPW", SRV);
start_script("misc/timeout", targ);
SendDialogGump( targ, gflayout, gfdata );
endprogramCode: Select all
use uo;
use os;
use util;
use basic;
include "include/damage";
program timeout(targ)
var times := 0;
for(times := 0; times < 30; times := times + 1)
if(GetObjProperty(targ, "macroPW"))
SendSysMessage(targ, "" + CInt(300 - CInt(times * 10)) + " seconds left");
sleep(10);
else
return;
endif
endfor
if(GetObjProperty(targ, "macroPW"))
EraseObjProperty(targ, "macroPW");
ApplyRawDamage_Modified(targ, targ, "macroing", 32000);
DisconnectClient(targ);
endif
endprogramCode: Select all
use uo;
use os;
use util;
use basic;
program macropass( who, password )
if(!GetObjProperty(who, "macroPW"))
sendsysmessage(who,"You have not been suspected of macroing.");
return(0);
endif
var pw := CInt(GetObjProperty(who, "macroPW"));
password := CInt(password);
if(pw == password)
sendsysmessage(who, "You have entered a correct password, you are saved.");
EraseObjProperty(who, "macroPW");
else
sendsysmessage(who, "You have entered a incorrect password.");
endif
endprogramCode: Select all
". Is it really that hard to do?
(Yeah, I know that a system that requires just a button pressing is way easier than the above version. I'm just curious.)