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 02-03-2010, 10:21 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Movement/Wall Detection for Variable sizes

A small script I threw together to show how you can create a movement system with various speeds(without skipping over walls), and more importantly: various sizes. This means you can shrink your player down to 1 tile and squeeze through cracks, or apply a better wall detection to larger players. What it is lacking is detail to anything else but those two things. It initially started as an experiment with onwall2 for a solid wall detection(instead of lots of onwall()'s), and I decided to add size support later. Lacks important things like sliding around corners, but that's not what this is focused on.

PHP Code:
function onCreated() {
  
clientr.movementSpeed .5;
  
clientr.movementSize 2;
}
//#CLIENTSIDE
function onCreated() {
  
showstats(1024);
  
disabledefmovement();
  
clientr.movementSpeed .5;
  
clientr.movementSize 2;
  
player.int(player.x)+.5;
  
player.int(player.y);

  
setTimer(0.05);
}

function 
onTimeout() {
  
temp.speed clientr.movementSpeed;
  
temp.size clientr.movementSize;
  
player.zoom size/2;
  for (
temp.k=0;k<4;k++) {
    if (
keydown(k)) {
      
player.dir k;

      
temp.cx = (player.x+.5)-((size 2)/2);
      
temp.cy = (player.y+1)-((size 2)/2);

      
temp.horizontalwall onwall2(cx vecx(k)*speed,cy,size-1/16,size-1/16);
      
temp.verticalwall onwall2(cx,cy vecy(k)*speed,size-1/16,size-1/16);

      if (
horizontalwall == 0player.+= vecx(k)*speed;
      else {
        for (
i=0;i<(speed client.size speed size);i+=1/16) {
          if (
onwall2(cx+vecx(k)*i,cy,size-1/16,size-1/16)) {
            
player.+= vecx(k)*i;
            
player.int(playerx+((size%== 1)*.5))+((size%== 0)*.5);
            break;
          }
        }
      }
      if (
verticalwall == 0player.+= vecy(k)*speed;
      else {
        for (
i=0;i<(speed size speed size);i+=1/16) {
          if (
onwall2(cx,cy+vecy(k)*i,size-1/16,size-1/16)) {
            
player.+= vecy(k)*i;
            
player.int(playery+((size%== 0)*.5))+((size%== 1)*.5);
            break;
          }
        }
      }
    }
  }
  
showpoly 200,{
    (
player.x+.5)-((size 2)/2),(player.y+1)-((size 2)/2),
    (
player.x+.5)-((size 2)/2)+size,(player.y+1)-((size-2)/2),
    (
player.x+.5)-((size 2)/2)+size,(player.y+1)-((size-2)/2)+size,
    (
player.x+.5)-((size 2)/2),(player.y+1)-((size 2)/2)+size,
    (
player.x+.5)-((size 2)/2),(player.y+1)-((size 2)/2),
    (
player.x+.5)-((size 2)/2),(player.y+1)-((size 2)/2)+(1/16),
    (
player.x+.5)-((size 2)/2)+size-(1/16),(player.y+1)-((size 2)/2)+(1/16),
    (
player.x+.5)-((size 2)/2)+size-(1/16),(player.y+1)-((size 2)/2)+size-(1/16),
    (
player.x+.5)-((size 2)/2)+(1/16),(player.y+1)-((size 2)/2)+size-(1/16),
    (
player.x+.5)-((size 2)/2)+(1/16),(player.y+1)-((size 2)/2)+(1/16)
  };
  
setTimer(0.05);
}

function 
onPlayerChats() {
  if (
player.chat.starts("size")) {
    
temp.newsize player.chat.substring(5);
    if (
newsize >= && newsize <= 20clientr.movementSize newsize;
    else if (
newsize 20player.chat "Seriously, are you nuts?";
    else 
player.chat "Not a compatible size!";
  } else if (
player.chat.starts("speed")) {
    
temp.newspeed player.chat.substring(6);
    if (
newspeed 0clientr.movementSpeed newspeed;
  }

Video as soon as I can get it uploaded without my internet timing out.
Attached Thumbnails
Click image for larger version

Name:	graal_1265184469.png
Views:	298
Size:	8.2 KB
ID:	50361   Click image for larger version

Name:	graal_1265184454.png
Views:	338
Size:	6.8 KB
ID:	50362   Click image for larger version

Name:	graal_1265184445.png
Views:	330
Size:	6.6 KB
ID:	50363  

Last edited by DustyPorViva; 02-04-2010 at 08:00 AM..
Reply With Quote
  #2  
Old 02-03-2010, 03:42 PM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
please donate this script to UN, they need it.

Anyways great job dusty, I'm loving the work lately.
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
  #3  
Old 02-03-2010, 04:18 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 Imperialistic View Post
please donate this script to UN, they need it.

Anyways great job dusty, I'm loving the work lately.
Why just UN? Placing this in the code gallery would help many, instead of just one server. UN can just get the script from the code gallery, so that's not a problem if they need it.

Great script Dusty, could have an awesome use for server having interesting quests, like drinking an elixir to become smaller or something like that.
__________________
Reply With Quote
  #4  
Old 02-03-2010, 10:10 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Oh, this should be moved to the code gallery, my bad!
Reply With Quote
  #5  
Old 02-04-2010, 12:01 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
How I did the movement on Classic was by having a function that works a long a "primary axis". That could be x-axis, y-axis, or say 45deg.

Then it moves along that access, then when it encounters a wall in its path, it will slide perpendicular to the primary axis.

I made it even more complex (for the sake of efficiency), by doing a conquer-and-divide algorithm along the movement path. With built-in onwall() and onwall2() it literally had 0% impact on CPU. With our scripted onwall (i.e., loop through every player, npc, blocking tile and check if they are blocking & intersect), it matched default performance.

Getting it pixel perfect was a little annoying, but the script came out nicely in the end (probably about 200 lines if all the extra documentation and lines were removed). It supports variable speeds and sizes as well.

I might release it in Code Gallery at some point, but it'd require some cleaning up so it wouldn't rely on some of the other systems we have on Classic, so that is a project for when I have free time.
Reply With Quote
  #6  
Old 02-04-2010, 12:10 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well making sliding isn't that hard, especially in GS2 since I can use passing parameters to simply make a function that checks for a wall in a given direction, making it much simpler to do accurate wall sliding. Maybe I'll add that later.
Reply With Quote
  #7  
Old 02-04-2010, 07:27 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
I <3 you Dusty....saved me a hell of alot of effort.

p.s.
PHP Code:
     else if (newsize 20player.chat "Seriously, are you nuts?" 
needs a semicolon

p.p.s

If you do add sliding, I will love you even more =)

p.p.p.s

On further usage, it doesn't seem very smooth. I also found it suffered the same problem I had whereby faster speeds can cause you to jump obstacles... it was this problem that caused me to delay working on it since it was either efficiency or accuracy

Last edited by Twinny; 02-04-2010 at 07:38 AM..
Reply With Quote
  #8  
Old 02-04-2010, 07:59 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Twinny View Post
I <3 you Dusty....saved me a hell of alot of effort.

p.s.
PHP Code:
     else if (newsize 20player.chat "Seriously, are you nuts?" 
needs a semicolon

p.p.s

If you do add sliding, I will love you even more =)

p.p.p.s

On further usage, it doesn't seem very smooth. I also found it suffered the same problem I had whereby faster speeds can cause you to jump obstacles... it was this problem that caused me to delay working on it since it was either efficiency or accuracy
I just tested it at size 2, speed 5 and didn't even jump over a 1 tile thick wall. Though I suppose circumstance has a lot to do with it. The wall check is checking the desired position, instead of the space BETWEEN the player and the desired position. So at the speed of 10, at the size of 2, the new position is ahead 10 spaces, and the size is 2 so that's 8 tiles not being checked.

It's a fairly easy fix though, which just involves adding the speed to the size of the onwall2.
Reply With Quote
  #9  
Old 02-04-2010, 01:42 PM
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 DustyPorViva View Post
I just tested it at size 2, speed 5 and didn't even jump over a 1 tile thick wall. Though I suppose circumstance has a lot to do with it. The wall check is checking the desired position, instead of the space BETWEEN the player and the desired position. So at the speed of 10, at the size of 2, the new position is ahead 10 spaces, and the size is 2 so that's 8 tiles not being checked.

It's a fairly easy fix though, which just involves adding the speed to the size of the onwall2.
I found I was able to jump over a tree line whilst moving diagonally but yeah it's exactly the same problem I've had before...I eventually went insane trying to create a method which would check for a wall within your speed, move you right before that wall but still allow for the other axis movement and sliding....it's beyond me
Reply With Quote
  #10  
Old 02-04-2010, 11:37 PM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Quote:
Originally Posted by Twinny View Post
I found I was able to jump over a tree line whilst moving diagonally but yeah it's exactly the same problem I've had before...I eventually went insane trying to create a method which would check for a wall within your speed, move you right before that wall but still allow for the other axis movement and sliding....it's beyond me
Perhaps you're going so fast that you slide under and around the tree in a single frame?
Reply With Quote
  #11  
Old 02-05-2010, 02:01 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 12171217 View Post
Perhaps you're going so fast that you slide under and around the tree in a single frame?
The area I eventually got into was enclosed
Reply With Quote
  #12  
Old 02-07-2010, 12:10 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I'm rescripting this from scratch right now. I'm instead breaking the wall detection into 4 quadrants and basing wall collisions off of that. This will make it easier to implement sliding, and easier to handle the wall data.
Reply With Quote
  #13  
Old 02-12-2010, 11:13 AM
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
Must say, very impressed. Tho size doesn't show for other players, so I came up with this. Maybe you could impliment something to show size properly in your next rescript?

PHP Code:
function onActionServerside() {
  if ( 
params[0] == "size" ) {
    
clientr.movementSpeed .5;
    
clientr.movementSize 2;
  }
  if ( 
params[0] == "getsize" ) {
    
temp.var = findplayerbycommunityname(params[1]).clientr.movementSize;
    
triggerClient("gui"this.name"gotsize"params[1], temp.var);
  }
}
//#CLIENTSIDE
function onCreated() {
  
player.int(player.x)+.5;
  
player.int(player.y);
  
triggerserver"gui"this.name"size"null );
  
setTimer(0.05);
}

function 
onActionClientSide() {
  if ( 
params[0] == "gotsize" ) {
    
findplayerbycommunityname(params[1]).zoom params[2]/2;
  }
}

function 
onTimeout() {
  
temp.speed clientr.movementSpeed;
  
temp.size clientr.movementSize;
  
triggerserver"gui"this.name"getsize" );
  for( 
temp.pl allplayers ) {
    
triggerserver"gui"this.name"getsize"pl.communityname );
  }
  
player.zoom temp.size/2;
  for (
temp.k=0;k<4;k++) {
    if (
keydown(k)) {
      
player.dir k;

      
temp.cx = (player.x+.5)-((size 2)/2);
      
temp.cy = (player.y+1)-((size 2)/2);

      
temp.horizontalwall onwall2(cx vecx(k)*speed,cy,size-1/16,size-1/16);
      
temp.verticalwall onwall2(cx,cy vecy(k)*speed,size-1/16,size-1/16);

      if (
horizontalwall == 0player.+= vecx(k)*speed;
      else {
        for (
i=0;i<(speed client.size speed size);i+=1/16) {
          if (
onwall2(cx+vecx(k)*i,cy,size-1/16,size-1/16)) {
            
player.+= vecx(k)*i;
            
player.int(playerx+((size%== 1)*.5))+((size%== 0)*.5);
            break;
          }
        }
      }
      if (
verticalwall == 0player.+= vecy(k)*speed;
      else {
        for (
i=0;i<(speed size speed size);i+=1/16) {
          if (
onwall2(cx,cy+vecy(k)*i,size-1/16,size-1/16)) {
            
player.+= vecy(k)*i;
            
player.int(playery+((size%== 0)*.5))+((size%== 1)*.5);
            break;
          }
        }
      }
    }
  }
  
setTimer(0.05);

Would love to see some updates/addons to this
Reply With Quote
  #14  
Old 02-12-2010, 02:07 PM
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 scriptless View Post
Must say, very impressed. Tho size doesn't show for other players, so I came up with this. Maybe you could impliment something to show size properly in your next rescript?

PHP Code:
 triggerserver"gui"this.name"getsize" ); 
  for( 
temp.pl allplayers ) { 
    
triggerserver"gui"this.name"getsize"pl.communityname ); 
  } 
Would love to see some updates/addons to this
You have suggested that the weapon should trigger the server every 0.05 seconds for the size of allplayers clientside... Imagine Zodiac with 100 people on the server. You would be triggering the server 1 + 100 + amount of people on your buddy list every 0.05 seconds.... bad....

A better way would be to put the players size in an attr[] and simply update the local (someone in a different gmap won't care how the player is being drawn afterall) player's size via some method clientside script (weapon/gani)....

Last edited by Twinny; 02-12-2010 at 02:20 PM.. Reason: further detail!
Reply With Quote
  #15  
Old 02-12-2010, 02:11 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Typically you will use a gani as an attr, with ganiscript in it to handle zoom. You set the script in to one attr, then the size of your player(and other visual aspects like alpha and such, if you'd like) to another attr. Use the ganiscript to parse the other attr and then set the player's effects.

However, it was not my responsibility to do this, as that's not what the script was about
Reply With Quote
  #16  
Old 02-12-2010, 10:17 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
I normally stay AWAY from ganiscripts. Most people dont fully understand, ganis are downloaded from the server. If you have the gani it usually ignores it (or has in the past). And you can use scripts in ganis maliciously. I saw people do it on N-Pulse, UN, and gk. =/

Yah I really don't recoment doing it the way I showed but I was just showing a example of something that worked. o_o

It would be alot easier if we could just use findplayer("player").clientr.value =/ but that doesnt work clientside. and I thought cleintr. was readable by client and server?
Reply With Quote
  #17  
Old 02-12-2010, 10:23 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by scriptless View Post
I normally stay AWAY from ganiscripts. Most people dont fully understand, ganis are downloaded from the server. If you have the gani it usually ignores it (or has in the past). And you can use scripts in ganis maliciously. I saw people do it on N-Pulse, UN, and gk. =/

Yah I really don't recoment doing it the way I showed but I was just showing a example of something that worked. o_o

It would be alot easier if we could just use findplayer("player").clientr.value =/ but that doesnt work clientside. and I thought cleintr. was readable by client and server?
Err... what? Ganiscripts haven't been abused since they were first released. That was quickly patched up. Gani's with scripts downloaded don't even use the gani files, they use encrypted .code files.

If they were that dangerous, all you'd have to do is input ganiscript into any gani like idle or walk, and have it run. Whether or not you have a ganiscript has no bearing on how available the function is.

Also, client vars are readable by server/client, but it's not data sent to other players. Data shared between players is a very specific set of vars, as to not chew up a lot of bandwidth.
Reply With Quote
  #18  
Old 02-12-2010, 10:55 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
Quote:
If they were that dangerous, all you'd have to do is input ganiscript into any gani like idle or walk, and have it run. Whether or not you have a ganiscript has no bearing on how available the function is.
That is what I ment. Foogles showed me this a few years back. It seems to work for a very long time, so long that I was unaware it was even patched. And I assume the .code files are the .code files I see on my computer? Wonder how long it takes for someone to break the encryption :o Graal v2-5 have already had there packet encryption broken (several times).

Thanks for informing me on the client vars. so player.attr[] vars would be the best way? I was just wondering cuz if a noob opened a memory editing tool and changed there attr, would this effect show for all other players? seems unfair if 1 player changes his size to 20+ and just stomps you to peices.
Reply With Quote
  #19  
Old 02-12-2010, 11:03 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by scriptless View Post
That is what I ment. Foogles showed me this a few years back. It seems to work for a very long time, so long that I was unaware it was even patched. And I assume the .code files are the .code files I see on my computer? Wonder how long it takes for someone to break the encryption :o Graal v2-5 have already had there packet encryption broken (several times).

Thanks for informing me on the client vars. so player.attr[] vars would be the best way? I was just wondering cuz if a noob opened a memory editing tool and changed there attr, would this effect show for all other players? seems unfair if 1 player changes his size to 20+ and just stomps you to peices.
I doubt the encryption is the only form of security backing them up. It probably checks modification time as well.

As for player.attr[]'s, even if a hacker were to change the attr of another player it'd all be clientside. That means the only person who would see the change is the player doing the hacking. Also, there's a reason my system is not dependent on zoom. I use a separate, more secure(ideally, though I mainly leave that up to whomever uses it to implement) variables and zoom is only a visual representation. In fact, the zoom was the last thing I added.
Reply With Quote
  #20  
Old 02-12-2010, 11:41 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
Quote:
Originally Posted by DustyPorViva View Post
I doubt the encryption is the only form of security backing them up. It probably checks modification time as well.

As for player.attr[]'s, even if a hacker were to change the attr of another player it'd all be clientside. That means the only person who would see the change is the player doing the hacking. Also, there's a reason my system is not dependent on zoom. I use a separate, more secure(ideally, though I mainly leave that up to whomever uses it to implement) variables and zoom is only a visual representation. In fact, the zoom was the last thing I added.
Correct me if im wrong but you set your clientr. variables twice on the oncreated() for serverside and clientside. I thought only client. variables could be set clientside, and clientr. was read-only on clientside.

This is all good information to know then. We should all hope that graal checks other forums of security. Altho modification time would be useless as I can modify those dates from Borland Delphi 2005 (yes i use outdated version).

Checksum of the files might work. Tho collisions are easy to generate now
Reply With Quote
  #21  
Old 02-12-2010, 11:44 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
Checksum of the files might work. Tho collisions are easy to generate now
I'd like to see you generate a collision on any random given file without a large array of GPUs and serious programming knowledge. Also, why in the world would anyone go to those lengths for Graal?

Also, sorry for derailing. :P
Reply With Quote
  #22  
Old 02-12-2010, 11:51 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Scriptless, I think you're over analyzing security a bit lol
Reply With Quote
  #23  
Old 02-13-2010, 12:39 AM
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
Quote:
Originally Posted by WhiteDragon View Post
I'd like to see you generate a collision on any random given file without a large array of GPUs and serious programming knowledge. Also, why in the world would anyone go to those lengths for Graal?

Also, sorry for derailing. :P
Sure? I recommend google tho. There are freely available programs to do so. There is a good example (if you have source) to make 2 programs (1 good, and 1 malicious) and they bot have the same filezise, checksum, and what not but do completly different tasks. And this information was easily avalible in 2007 when I tested it. Work has been done with standards and I believe a new SHA algorihtm is already in production to address the flaws in the current hashing algorithms.

Erm, I am not overanyalising security at all. I will fully admit, I am iwir3d. I have been playing graal since 2002 and I have been responsible for several trainers being released. My best trainer I made allowed 2.220 and priror to go form offline mode to online mode and inject scripts onto a server. Here I will link you to some damage I did on GK back in 2005.

http://forums.graalonline.com/forums...light=bloodpet (pictures at bottom and top of 2nd page)

I have since then tried to move my abilities to more productive things but having this knowledge that allows me to do this helps me acheive a greater understanding on BOTH sides of scripting in the efforts for better security.

If you guys want you can do a full search on me
Here are my other names I have gone by: mewtoo18, toybox, dbug, shadow_deathstorm, bloodpet, scriptless, nibnub. And I think that may be it. Oh and ofcourse "iwir3d".

I once read in a book that you should never assume that a bug will not be exploited and you should never assume that any small bug does not esculate into a even bigger bug (as my unethical work has clearly shown).

*sorry for going off topic a little (needed to show how critical security can be).
Reply With Quote
  #24  
Old 02-13-2010, 03:49 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
There is a good example (if you have source) to make 2 programs (1 good, and 1 malicious) and they bot have the same filezise, checksum, and what not but do completly different tasks.
Sure, if you have the source you can compile the program down with junk data to match the MD5 checksum, but the point in this case is that would be entirely impossible with format that is binary-encoded and can't be easily reverse-engineered.

The complexity of an MD5 collision is still 2^32, and with the added complexity of the format you are trying to engineer a hack into, I stand by my original statement.
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 12:59 AM.


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