Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2007, 07:50 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Request: test function(funcName);

Built-in Function:

Request: testfunction(funcName)
Usage: testfunction("onwall2");
Returns: true if function exists, false if it doesn't.

Why? Cheat Engine and other memory editors that can pass through the cheat windows check, and rename functions by searching for text.

Usage in script:
PHP Code:
function onActionServerSide(actionargs) {
  switch (
action) {
    case 
"hacker":
      
temp.report format("%s has renamed function %s!"player.accountargs[0]);
      
      echo(
"[ Hack-Control ]: " temp.report);
      
savelog2("functionlog.txt"temp.report);
    break;
  }
}
//#CLIENTSIDE
function onCreated() {
  
this.check = {"onactionprojectile""onactionprojectile2""onwall""onwall2"};
  
  
this.onTimeout();
}

function 
onTimeout() {
  for (
temp.var : this.check) {
    if (
this.tes[t]function(temp.var)) continue;
    
    
// Hacker Found!
    
triggerserver("gui"this.name"hacker", {temp.var});
    
    
player.serverwarp(this.getservername()); // warps player back to server, if cheat engine, it will normally report to the rc that a player was using cheat engine ( mostly used to avoid the windows check )
    
    
break;
  }
  
  
this.setTimer(300); // check every 5 minutes

__________________
- Zidane / Zidaya
Reply With Quote
  #2  
Old 05-06-2007, 07:59 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
They could just as easily disable those checks...
Reply With Quote
  #3  
Old 05-06-2007, 08:10 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
This seems quite useful Deadly_Killer, it should be implemented.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #4  
Old 05-06-2007, 08:17 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by killerogue View Post
This seems quite useful Deadly_Killer, it should be implemented.
If you ask me, it shouldnt. It wont stop hackers/cheaters. This is kind of a hardcoded issue, nothing to do with commands there.
Reply With Quote
  #5  
Old 05-06-2007, 08:41 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Stop the use of malicious applications whilst Graal is operating.
Reply With Quote
  #6  
Old 05-06-2007, 08:53 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by Crow View Post
If you ask me, it shouldnt. It wont stop hackers/cheaters. This is kind of a hardcoded issue, nothing to do with commands there.
Explain yourself?

Though, I think I just came into another problem.

I noticed that this wouldn't exactly solve it if people don't rename the onwall2 function, but rename the use of the function.

Quote:
Originally Posted by Twinny View Post
They could just as easily disable those checks...
I don't think you can rename hardcoded functions.
__________________
- Zidane / Zidaya
Reply With Quote
  #7  
Old 05-06-2007, 09:21 AM
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 clientsided part of scripts can be edit any way they want, so they would just disable the trigger. Duh.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 05-06-2007, 09:45 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by xXziroXx View Post
The clientsided part of scripts can be edit any way they want, so they would just disable the trigger. Duh.
They would be required to know what the trigger is..?
__________________
- Zidane / Zidaya
Reply With Quote
  #9  
Old 05-06-2007, 09:52 AM
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 Deadly_Killer View Post
They would be required to know what the trigger is..?
The clientsided part of scripts can be viewed and edited by some programs.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #10  
Old 05-06-2007, 10:00 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by xXziroXx View Post
The clientsided part of scripts can be viewed and edited by some programs.
Maybe sometime I'll make a small 3 line script and you could find out what it is, yes?
__________________
- Zidane / Zidaya
Reply With Quote
  #11  
Old 05-06-2007, 12:05 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
PHP Code:
function magicFunction()
{
  echo(
"Hello!");
}

function 
onCreated()
{
  if (
"magicFunction".lower() in this.getfunctions())
  {
    
this.magicFunction();
  }
    else
  {
    
// The function is not present
  
}

__________________
Skyld
Reply With Quote
  #12  
Old 05-14-2007, 12:50 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The next Graal version will have hasfunction() as well, until then use getfunctions() like Skyld said
Reply With Quote
  #13  
Old 05-14-2007, 03:39 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
PHP Code:
obj.hasFunction(); 
yes?
__________________
- Zidane / Zidaya
Reply With Quote
  #14  
Old 05-14-2007, 05:47 PM
sam_is_me sam_is_me is offline
Registered User
Join Date: Sep 2004
Posts: 195
sam_is_me is on a distinguished road
What the heck is magicFunction()?
__________________
Aim: xxspazmxx929


Reply With Quote
  #15  
Old 05-14-2007, 06:00 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by sam_is_me View Post
What the heck is magicFunction()?
it was an example..
__________________
Reply With Quote
  #16  
Old 05-14-2007, 06:32 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
The next Graal version will have hasfunction() as well, until then use getfunctions() like Skyld said
Yay!
Reply With Quote
  #17  
Old 05-14-2007, 06:45 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Oh, so we need to make our own system NPC to check if the functions exist? fun... o_o
Reply With Quote
  #18  
Old 05-14-2007, 07:08 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 Chandler View Post
Oh, so we need to make our own system NPC to check if the functions exist? fun... o_o
Why on Earth would you make a system NPC just to perform "magicFunction".lower() in this.getfunctions()?
__________________
Skyld
Reply With Quote
  #19  
Old 05-14-2007, 07:32 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Because functions can be edited, isn't that why Stefan created this...?
Reply With Quote
  #20  
Old 05-14-2007, 07:36 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 Chandler View Post
Because functions can be edited, isn't that why Stefan created this...?
I'm confused, and I am not sure where you are going with that.

if ("magicFunction".lower() in this.getfunctions()) tells you if the function magicFunction() has been defined somewhere on the current object (normally the script/NPC). Change the this. to some other object to check if the function is defined in that object instead.

It's only one line, and it certainly does not need a system NPC creating to use it.
__________________
Skyld
Reply With Quote
  #21  
Old 05-14-2007, 07:40 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
However, we need to add this to each of our system npcs.
Reply With Quote
  #22  
Old 05-14-2007, 07:42 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 Chandler View Post
However, we need to add this to each of our system.
What, why?
__________________
Skyld
Reply With Quote
  #23  
Old 05-14-2007, 07:46 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
To check if the functions actually exist.
If people can edit function names via memory editing, we are checking to see if they exist.
Correct me if I have perceived this thread totally wrong...
Reply With Quote
  #24  
Old 05-14-2007, 07:48 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 Chandler View Post
To check if the functions actually exist.
If people can edit function names via memory editing, we are checking to see if they exist.
Correct me if I have perceived this thread totally wrong...
There is no real reason to add this to every function call, because the function won't get called anyway if someone has "edited" it by memory editing.

The main use for it I guess is checking if functions are present from joined classes or so.
__________________
Skyld
Reply With Quote
  #25  
Old 05-14-2007, 07:48 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 Chandler View Post
To check if the functions actually exist.
If people can edit function names via memory editing, we are checking to see if they exist.
Correct me if I have perceived this thread totally wrong...
Please do correct me if I'm wrong, but I've always been told EVERYTHING clientsided can be edited with memory editing - not just function names.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #26  
Old 05-14-2007, 07:50 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Skyld, I see. object.isinclass isn't good enough

xXZiroXx, kind of, not all.
Reply With Quote
  #27  
Old 05-14-2007, 08:03 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Chandler View Post
Skyld, I see. object.isinclass isn't good enough

xXZiroXx, kind of, not all.
Clientside = in memory = editable, some things are just harder.
Reply With Quote
  #28  
Old 05-14-2007, 09:14 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by sam_is_me View Post
What the heck is magicFunction()?
If you have something stupid to say.. don't say it.

--

Anyway:

Changing onwall/2 makes it so you can walk on walls because it will return false ( no longer exists )

Would be cool if non-existing functions returned like -1.
__________________
- Zidane / Zidaya
Reply With Quote
  #29  
Old 05-26-2007, 12:23 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by sam_is_me View Post
What the heck is magicFunction()?
Quote:
Originally Posted by Skyld View Post
PHP Code:
function magicFunction()
{
  echo(
"Hello!");

In that example, it was that!
__________________
Do it with a DON!
Reply With Quote
  #30  
Old 06-18-2007, 07:11 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
TGraalVar.hasFunction(functionname);

Stefan has granted your wish, and screwed up getVarNames() in the process.
__________________
Reply With Quote
  #31  
Old 06-19-2007, 08:13 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Inverness View Post
TGraalVar.hasFunction(functionname);

Stefan has granted your wish, and screwed up getVarNames() in the process.
Over the inclusion of function names? Annoying, yes, but functions/events are variables now... I normally sift them out straight up out of any search. I also noticed you coule wipe the vars and the NPC would still work
Reply With Quote
  #32  
Old 06-19-2007, 01:28 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
PHP Code:
function hasFunctionfuncName )
{
  return ( 
funcName.lower() in this.getFunctions() );

For those who didn't find it out by reading.
Reply With Quote
  #33  
Old 06-19-2007, 11:43 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Novo View Post
PHP Code:
function hasFunctionfuncName )
{
  return ( 
funcName.lower() in this.getFunctions() );

For those who didn't find it out by reading.
The function names are returned in the same case they're declared, why have funcName.lower()? And about functions, could we at least get a different GraalVar type for them? I don't want them confused with objects.

And a second thought, why are you even showing this to us? hasfunction() already exists for all objects now.
__________________
Reply With Quote
Reply


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 06:32 AM.


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