Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-05-2006, 01:29 AM
Thallen Thallen is offline
Banned
Thallen's Avatar
Join Date: Jun 2003
Location: Florida
Posts: 1,284
Thallen is an unknown quantity at this point
Send a message via ICQ to Thallen Send a message via AIM to Thallen Send a message via MSN to Thallen Send a message via Yahoo to Thallen
TPS Recorder

I think it would be very beneficial to servers with spar tournaments to have a script that recorded a player's tiles per second movement, or some variation of a movement counter. Speed hacking is still very controversial, and I think this, with a norm speed on hand, could help out a lot.
Reply With Quote
  #2  
Old 06-05-2006, 01:45 AM
xshadx xshadx is offline
Development Staff
xshadx's Avatar
Join Date: May 2006
Posts: 161
xshadx is on a distinguished road
I Agree.
__________________

Reply With Quote
  #3  
Old 06-05-2006, 03:54 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Something like this:

PHP Code:
function onActionServerside() {
  if(
params[0] == "distcheck") {
    echo(
"Warning: Player \"" player.account "\" is moving at: " params[1] @ " Tiles/sec.  This is " server.max_tilespersecond params[1] @ " Tiles/sec faster than the defined maximum. (Speedhack?)");
  }
}

//#CLIENTSIDE
function onCreated() {
  
this.player_oldposition = { player.xplayer.}; 
  
setTimer(1);
}

function 
onTimeout() {
  
temp.dx this.player_oldposition[0] - player.x;
  
temp.dy this.player_oldposition[1] - player.y;
  
temp.distmoved = ((temp.dx^2)+(temp.dy^2))^0.05;

  if(
temp.distmoved server.max_tilespersecond) {
    
triggerserver("gui"this.name"distcheck"temp.distmoved);
  }

  
this.player_oldposition = { player.xplayer.};

  
setTimer(1);

?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #4  
Old 06-05-2006, 01:09 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
I'd make the timer stop tho, if it has concluded that it is a possibly speedhacker. Else you get a message inside RC every second? Hmmm.. :P
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #5  
Old 06-05-2006, 01:30 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
There is a speedhack tolerance serveroption already. I am not sure how it works, but it might be on the wiki.
__________________
Skyld
Reply With Quote
  #6  
Old 06-05-2006, 03:11 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
speedhacktolerance=value (default is 90)
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #7  
Old 06-05-2006, 05:09 PM
Thallen Thallen is offline
Banned
Thallen's Avatar
Join Date: Jun 2003
Location: Florida
Posts: 1,284
Thallen is an unknown quantity at this point
Send a message via ICQ to Thallen Send a message via AIM to Thallen Send a message via MSN to Thallen Send a message via Yahoo to Thallen
Quote:
Originally Posted by Skyld
There is a speedhack tolerance serveroption already. I am not sure how it works, but it might be on the wiki.
If you actually played Graal, you'd know that the speedhack tolerance tool is garbage, and sparrers who use speedhacks use minor, but significant enough, amounts of speed that speedhack tolerance sucks versus.
Reply With Quote
  #8  
Old 06-05-2006, 05:26 PM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Most people probably do not equip their speedhacktolerance properly to make it actually do anything at all.

I do not understand how people 'speedhack' anyways unless the movement is not scripted x-x
Reply With Quote
  #9  
Old 06-05-2006, 05:35 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Thallen
If you actually played Graal, you'd know that the speedhack tolerance tool is garbage, and sparrers who use speedhacks use minor, but significant enough, amounts of speed that speedhack tolerance sucks versus.
Most servers probably do not even realise that the speedhack tolerance exists, which probably explains why most servers are victims to it.
__________________
Skyld
Reply With Quote
  #10  
Old 06-05-2006, 06:01 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
The speedhack feature is kick-ass, even to minor, but significant enough, amounts of speed if you put the value low enough.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #11  
Old 06-05-2006, 07:05 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Actually.. Okies script is garbage.. since.. if you speed up the frame rating of the game, also the scripts will go faster (see movement scripts as a proof, players can speed that up also).. so the distance that's traveled every second will be the same for what the game thinks....

Since you are also speeding up the timeout, it will still calculate, and result regular distance that has been traveled...

Appologiez if any spelling is wrong in my little story :P I am dutch and don't talk that proper English all day.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #12  
Old 06-05-2006, 07:22 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by contiga
Actually.. Okies script is garbage.. since.. if you speed up the frame rating of the game, also the scripts will go faster (see movement scripts as a proof, players can speed that up also).. so the distance that's traveled every second will be the same for what the game thinks....
Not all speedhacks speed up the frame rate. (I don't see you contributing a better script, either )
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #13  
Old 06-05-2006, 07:26 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Well, you could do a serverside one.. but it might cause too much lag yeah.. an option would be: recording every player for 10 seconds, then skipping to another one (serverside).. and compare? If you'd do every single player serverside, it'd cause a lot of lag.. so I think skipping between players would be the best.

ps. If I wanted to make one, I'd already done it.. you just were at this thread earlier then me =p
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #14  
Old 06-06-2006, 05:54 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by contiga
Well, you could do a serverside one.. but it might cause too much lag yeah.. an option would be: recording every player for 10 seconds, then skipping to another one (serverside).. and compare? If you'd do every single player serverside, it'd cause a lot of lag.. so I think skipping between players would be the best.
Recording every player for 10 seconds would not work, because not everyone is going to be constantly moving for 10 seconds.

Quote:
Originally Posted by contiga
ps. If I wanted to make one, I'd already done it.. you just were at this thread earlier then me =p
Nah, you'd probably wait until someone else made one and then steal their idea.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #15  
Old 06-06-2006, 09:55 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by xXziroXx
speedhacktolerance=value (default is 90)
Era has it at 0 and we catch 100% of the hackers
Reply With Quote
  #16  
Old 06-06-2006, 02:20 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Quote:
Originally Posted by xAndrewx
Era has it at 0 and we catch 100% of the hackers
Quote:
Originally Posted by Wiki
Speedhack Tolerance
speedhacktolerance=number
This gives the percentage of data packages that clients may send above the expected over without being logged as Trainer users. On Graal Kingdoms, the rather conservative setting of 90 is used. If you set this too low, your server will crash.
Might want to change that?
Reply With Quote
  #17  
Old 06-06-2006, 02:47 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Made one with a serverside test, runs only 5 seconds, every 10 seconds, to make sure no one has their client going faster. I used a lot of the same ideas ApothiX had, would this work better?
PHP Code:
function onActionclientside()
{
  if(
params[0]=="serversidetest")
  {
    
settimer(1);
    function 
onTimeout()
  {
    
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
    
this.curent=(((playerx^2)+(playery^2))^.5);
    
this.dist_value=this.dist-this.current;
    if(
this.control2==5)
    {
      
this.control2==0;
      
settimer(0);
    }
    
this.control2++;
    if(!
playerx==this.oldx && !playery==this.oldy)
    {
      
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
    }
    
settimer(1);
  }

    
}
  if(
params[0]=="report")
  {
    if(
params[1]>server.speedmax)
    {
      echo(
"Warning: Player \"" player.account "\" is moving at: " params[1] @ " Tiles/sec. This is " server.max_tilespersecond params[1] @ " Tiles/sec faster than the defined maximum. (Speedhack?)"); 
      }
  }
}
//#CLIENTSIDE
function onCreated()
{
  
settmer(1);
  
this.oldx=playerx;
  
this.oldy=playery;
}
function 
onTimeout()
{
  
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
  
this.curent=(((playerx^2)+(playery^2))^.5);
  
this.dist_value=this.dist-this.current;
  if(
this.control==10)
  {
    
this.control==0;
    
triggeraction(0,0,"serverside","weaponname","serversidetest",this.dist_value);
  }
  
this.control++;
  if(!
playerx==this.oldx && !playery==this.oldy)
  {
    
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
  }
  
settimer(1);

Reply With Quote
  #18  
Old 06-06-2006, 04:51 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by excaliber7388
Made one with a serverside test, runs only 5 seconds, every 10 seconds, to make sure no one has their client going faster. I used a lot of the same ideas ApothiX had, would this work better?
PHP Code:
function onActionclientside()
{
  if(
params[0]=="serversidetest")
  {
    
settimer(1);
    function 
onTimeout()
  {
    
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
    
this.curent=(((playerx^2)+(playery^2))^.5);
    
this.dist_value=this.dist-this.current;
    if(
this.control2==5)
    {
      
this.control2==0;
      
settimer(0);
    }
    
this.control2++;
    if(!
playerx==this.oldx && !playery==this.oldy)
    {
      
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
    }
    
settimer(1);
  }

    
}
  if(
params[0]=="report")
  {
    if(
params[1]>server.speedmax)
    {
      echo(
"Warning: Player \"" player.account "\" is moving at: " params[1] @ " Tiles/sec. This is " server.max_tilespersecond params[1] @ " Tiles/sec faster than the defined maximum. (Speedhack?)"); 
      }
  }
}
//#CLIENTSIDE
function onCreated()
{
  
settmer(1);
  
this.oldx=playerx;
  
this.oldy=playery;
}
function 
onTimeout()
{
  
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
  
this.curent=(((playerx^2)+(playery^2))^.5);
  
this.dist_value=this.dist-this.current;
  if(
this.control==10)
  {
    
this.control==0;
    
triggeraction(0,0,"serverside","weaponname","serversidetest",this.dist_value);
  }
  
this.control++;
  if(!
playerx==this.oldx && !playery==this.oldy)
  {
    
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
  }
  
settimer(1);

:w-hat: I don't even know what to say about that code. Why the hell do you have a 'function onTimeout()' inside an 'onActionClientside' on the serverside?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #19  
Old 06-06-2006, 05:01 PM
Maniaman Maniaman is offline
Registered User
Join Date: Aug 2005
Posts: 326
Maniaman is on a distinguished road
Quote:
Originally Posted by excaliber7388
Made one with a serverside test, runs only 5 seconds, every 10 seconds, to make sure no one has their client going faster. I used a lot of the same ideas ApothiX had, would this work better?
PHP Code:
function onActionclientside()
{
  if(
params[0]=="serversidetest")
  {
    
settimer(1);
    function 
onTimeout()
  {
    
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
    
this.curent=(((playerx^2)+(playery^2))^.5);
    
this.dist_value=this.dist-this.current;
    if(
this.control2==5)
    {
      
this.control2==0;
      
settimer(0);
    }
    
this.control2++;
    if(!
playerx==this.oldx && !playery==this.oldy)
    {
      
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
    }
    
settimer(1);
  }

    
}
  if(
params[0]=="report")
  {
    if(
params[1]>server.speedmax)
    {
      echo(
"Warning: Player \"" player.account "\" is moving at: " params[1] @ " Tiles/sec. This is " server.max_tilespersecond params[1] @ " Tiles/sec faster than the defined maximum. (Speedhack?)"); 
      }
  }
}
//#CLIENTSIDE
function onCreated()
{
  
settmer(1);
  
this.oldx=playerx;
  
this.oldy=playery;
}
function 
onTimeout()
{
  
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
  
this.curent=(((playerx^2)+(playery^2))^.5);
  
this.dist_value=this.dist-this.current;
  if(
this.control==10)
  {
    
this.control==0;
    
triggeraction(0,0,"serverside","weaponname","serversidetest",this.dist_value);
  }
  
this.control++;
  if(!
playerx==this.oldx && !playery==this.oldy)
  {
    
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
  }
  
settimer(1);

__________________

Current Maloria Event: (click to go to it)
Reply With Quote
  #20  
Old 06-06-2006, 05:09 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Well, okay, what did I do wrong? XD
Reply With Quote
  #21  
Old 06-06-2006, 05:13 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by excaliber7388
Well, okay, what did I do wrong? XD
Everything?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #22  
Old 06-06-2006, 05:33 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by excaliber7388
Made one with a serverside test, runs only 5 seconds, every 10 seconds, to make sure no one has their client going faster. I used a lot of the same ideas ApothiX had, would this work better?
PHP Code:
function onActionclientside()
{
  if(
params[0]=="serversidetest")
  {
    
settimer(1);
    function 
onTimeout()
  {
    
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
    
this.curent=(((playerx^2)+(playery^2))^.5);
    
this.dist_value=this.dist-this.current;
    if(
this.control2==5)
    {
      
this.control2==0;
      
settimer(0);
    }
    
this.control2++;
    if(!
playerx==this.oldx && !playery==this.oldy)
    {
      
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
    }
    
settimer(1);
  }

    
}
  if(
params[0]=="report")
  {
    if(
params[1]>server.speedmax)
    {
      echo(
"Warning: Player \"" player.account "\" is moving at: " params[1] @ " Tiles/sec. This is " server.max_tilespersecond params[1] @ " Tiles/sec faster than the defined maximum. (Speedhack?)"); 
      }
  }
}
//#CLIENTSIDE
function onCreated()
{
  
settmer(1);
  
this.oldx=playerx;
  
this.oldy=playery;
}
function 
onTimeout()
{
  
this.dist=(((this.oldx^2)+(this.oldy^2))^.5);
  
this.curent=(((playerx^2)+(playery^2))^.5);
  
this.dist_value=this.dist-this.current;
  if(
this.control==10)
  {
    
this.control==0;
    
triggeraction(0,0,"serverside","weaponname","serversidetest",this.dist_value);
  }
  
this.control++;
  if(!
playerx==this.oldx && !playery==this.oldy)
  {
    
triggeraction(0,0,"serverside","weaponname","report",this.dist_value);
  }
  
settimer(1);

Hillarious.


Quote:
Originally Posted by Maniaman
Haha, nice one!
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #23  
Old 06-07-2006, 11:01 AM
Snakeandy7 Snakeandy7 is offline
"Member ID=2610"
Snakeandy7's Avatar
Join Date: Mar 2003
Posts: 987
Snakeandy7 is on a distinguished road
Quote:
Originally Posted by excaliber7388
Might want to change that?
Nah, I don't think we should. =]
__________________
"Freedom is best I tell thee
of all things to be won
then never live within the bond
of slavery my son".


Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.