Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-24-2013, 10:02 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
GS3 Speedhack Detector

Just got bored and decided to play around with GS3.
It's really quite simple, but it works effectively.
PHP Code:
//#GS3
//#CLIENTSIDE
var op:number;
function 
onCreated():void{
  
op = {player.xplayer.yplayer.level};
  
this.onTimeout();
}
function 
onTimeout():void{
  
//Check the distance between the players last position
  //and their current position.
  
var d:number this.Dist(op[0], player.xop[1], player.y);
  
//d is the distance traveled in the last second
  //if(player.level == op[2] && d > 30){   
  //Set the old position
  
op = {player.xplayer.yplayer.level};
  
this.settimer(1);
}
//Pythagoras, get the distance between two points
function Dist(x1:numberx2:numbery1:numbery2:number):number{
  return (((
x1-x2)^2)+((y1-y2)^2))^0.5;

__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 06-24-2013 at 11:59 AM..
Reply With Quote
 


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 03:17 AM.


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