View Single Post
  #4  
Old 10-22-2012, 10:34 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
I'd really like to see some functions for the sake of being able to optimise custom systems, under the assumption that native code is much faster than GScript. If Graal is ever going to expand and try to attract a higher number of players, it's important to reduce the lag that can occur around a lot of players.

PHP Code:
getScreenPlayers(); //returns an array of all players visible on your screen
getAreaPlayers(xywh); //returns an array of all players within the specified box
getNicknameNPCs(); //returns an array of all NPCs which have a nickname and are visible
hideAllImages(); //hides all displays, instead of either hideimg(start, end); or multiple hideimg(index);
display.attachToObject(object); //makes a display automatically move along with the specified object, such as a player, similar to attachtoowner
2DBoxIntersect(box array 1box array 2); //returns whether 2 boxes touch edge-on or closer, {x, y, w, h}
2DBoxOverlaps(box array 1box array 2); //returns whether 2 boxes touch beyond their edge, {x, y, w, h}
2DBoxIntersectsPlayer(xywh); //returns if a box touches edge-on or closer with the player's own blocking area, , {x, y, w, h} + {player.x + 0.5, player.y + 1, 2, 2}
2DBoxOverlapsPlayer(xywh); //returns if a box touches beyond the edge of the player's own blocking area, , {x, y, w, h} + {player.x + 0.5, player.y + 1, 2, 2}
pixelRound(number); //rounds the number to the nearest pixel or 0.0625 
Reply With Quote