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
  #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
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
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
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
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!
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
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 04:01 AM.


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