Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 06-24-2013, 10:50 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
Since d is as constant as op, isn't it more efficient to declare d over the scope of the entire script as well?
__________________
Quote:
Originally Posted by Crono View Post
No look at it, Stefan is totally trolling Thor. Calling Classic a "playerworld" (something it's not supposed to be) is the ultimate subtle insult to a true fan.

It's genius.
Reply With Quote
  #3  
Old 06-24-2013, 11:07 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
But d is only used once, where as op needs to be stored? It's like doing temp. When it's inside a method, but possibly.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #4  
Old 06-24-2013, 11:54 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
This doesn't take into account if I enter a new level

Also, now days stuff like speed hacking gets insta-reported
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #5  
Old 06-24-2013, 11:56 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Oh wow, I completely missed that o_o
Added it in.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #6  
Old 06-24-2013, 12:02 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by BlueMelon View Post
Also, now days stuff like speed hacking gets insta-reported
Still doesn't hurt if there's detection, sometimes a player won't catch it quickly enough.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #7  
Old 06-24-2013, 01:28 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
What if a player is summoned?? either by staff, or script.. nice to see people trying to adpoted GS3 so early. I plan on learning it myself and have enabled it on my server for testing.
Reply With Quote
  #8  
Old 06-24-2013, 02:47 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Just use vectordist({ox, oy, oz}, {fx, fy, fz}) instead of re-creating your own.
__________________
Quote:
Reply With Quote
  #9  
Old 06-24-2013, 11:14 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Re-created it to be more efficient though, no need to do extra operations on z.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #10  
Old 06-25-2013, 01:48 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Gunderak View Post
PHP Code:
var op:number;
// ...
op = {player.xplayer.yplayer.level}; 
How is this legal...?
__________________
Reply With Quote
  #11  
Old 06-25-2013, 02:37 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
I don't even know, I tried var op:number[]; but it errored.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #12  
Old 06-25-2013, 03:16 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Gunderak View Post
I don't even know, I tried var op:number[]; but it errored.
player.level is a TServerLevel, not a number. Does the client even implement GS3 yet? I very much doubt it since they're still pushing very basic updates to the server with regularity. My guess is it's just ignoring that syntax (as it has been for years in GS2), meaning that your script is not actually valid GS3 (but instead valid GS2). Not positive on that though.
__________________
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 03:35 PM.


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