From: pyroryan
I think our player_getName is technically player_getDisplayName. Cbf to check.
I just looked for the hook first, then found the name after.
Also, the php is a mess. If it says triarray[a] I couldn't find the hook on tribot.
[php]
<?
$version = file_get_contents('
http://rs-hacking.com/resources/rsversion');
if (!(file_exists($version.'.txt'))){
$tritxt = file_get_contents('
http://tribot.org/gethooks.php?revision='.$version);
function str_between( $string, $start, $end ){//by Ron
$string = " " . $string;
$ini = strpos( $string, $start );
if ( $ini == 0 ) return "";
$ini += strlen( $start );
$len = strpos( $string, $end, $ini ) - $ini;
return substr( $string, $ini, $len );
}
function Organise($raw){
$temparray = explode('<br/>', $raw);
$lulul = sizeof($temparray);
for ($i = 0; $i <= $lulul; $i++) {
$temparrays[$i] = explode(' ', $temparray[$i]);
}
$lulul = sizeof($temparrays);
for ($i = 0; $i <= $lulul; $i++) {
$settingarray = explode('.', $temparrays[$i][0]);
if (!($Section == $settingarray[0])){
$finalarray[$settingarray[0]][root] = str_between('|'.$temparrays[$i][1], '|', '.');
$Section = $settingarray[0];
}
if ($settingarray[0] == 'client'){
$finalarray[str_between($settingarray[1], 'get', '()')] = $temparrays[$i][1];
} else {
$finalarray[$settingarray[0]][str_between($settingarray[1], 'get', '()')] = str_between($temparrays[$i][1].'|', '.', '|');
}
}
return $finalarray;
}
$triarray = Organise($tritxt);
$hooks = "{**
* Copyright 2010 by Benjamin J. Land (a.k.a. BenLand100)
*
* This file is part of the SMART Minimizing Autoing Resource Thing (SMART)
*
* SMART is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SMART is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SMART. If not, see <
http://www.gnu.org/licenses/>.
*}
const
ClientVersion = " . $version . ";
HookRev = 3;
{Static Hooks}
hook_static_LoginIndex = '".$triarray[LoginIndex]."';
hook_static_MyPlayer = '".$triarray[MyPlayer]."';
hook_static_BaseX = '".$triarray[BaseX]."';
hook_static_BaseY = '".$triarray[BaseY]."';
hook_static_NPCIndexArray = '".$triarray[NpcIndices]."';
hook_static_NPCNodes = '".$triarray[NpcNodes]."';
hook_static_NPCCount = '".$triarray[NpcCount]."';
hook_static_GroundSettingsArray = '".$triarray[a]."';
hook_static_LoadedPlane = '".$triarray[a]."';
hook_static_PlaneArray = '".$triarray[Planes]."';
hook_static_Toolkit = '".$triarray[MainToolkit]."';
hook_static_MapAngle = '".$triarray[MinimapOffset]."';
hook_static_DestX = '".$triarray[DestX]."';
hook_static_DestY = '".$triarray[DestY]."';
hook_static_MenuOptionCount = '".$triarray[MenuOptionCount]."';
hook_static_MenuX = '".$triarray[MenuX]."';
hook_static_MenuY = '".$triarray[MenuY]."';
hook_static_MenuWidth = '".$triarray[MenuWidth]."';
hook_static_MenuHeight = '".$triarray[MenuHeight]."';
hook_static_MenuX2 = '".$triarray[a]."';
hook_static_MenuY2 = '".$triarray[a]."';
hook_static_MenuWidth2 = '".$triarray[a]."';
hook_static_MenuHeight2 = '".$triarray[a]."';
hook_static_MenuOpen = '".$triarray[IsMenuOpen]."';
hook_static_MenuNodeList = '".$triarray[MenuNodeList]."';
hook_static_LoopCycle = '".$triarray[LoopCycle]."';
hook_static_PlayerCount = '".$triarray[PlayerCount]."';
hook_static_PlayerIndexArray = '".$triarray[PlayerIndices]."';
hook_static_GetPlayers = '".$triarray[Players]."';
hook_static_GetSkillLevels = '".$triarray[SkillLevels]."';
hook_static_GetSkillExperiences = '".$triarray[SkillExperiences]."';
hook_static_GroundTiles = '".$triarray[GroundTiles]."';
hook_static_GetInterfaces = '".$triarray[Interfaces]."';
hook_static_ValidInterfaces = '".$triarray[ValidInterfaces]."';
hook_static_GetSettings = '".$triarray[Settings]."';
hook_static_GroundItemCache = '".$triarray[ItemNodeCache]."';
hook_static_CamPosX = '".$triarray[a]."';
hook_static_CamPosY = '".$triarray[a]."';
hook_static_GetCrossHairColor = '".$triarray[a]."';
{Class Animable}
class_Animable = '".$triarray[animable][root]."';
hook_animable_PixelX = '".$triarray[animable][LocalX]."';
hook_animable_PixelY = '".$triarray[animable][LocalY]."';
hook_animable_Plane = '".$triarray[a]."';
{Class Player}
class_Player = '".$triarray[player][root]."';
hook_player_GetLevel = '".$triarray[player][Level]."';
hook_player_GetName = '".$triarray[player][Name]."';
hook_player_PlayerDef = '".$triarray[a]."';
hook_player_GetTeam = '".$triarray[player][Team]."';
{Class Character}
class_Character = '".$triarray[character][root]."';
hook_character_GetHitDamges = '".$triarray[a]."';
hook_character_Animation = '".$triarray[character][Animation]."';
hook_character_Motion = '".$triarray[character][MovementSpeed]."';
hook_character_WalkQueueX = '".$triarray[character][WalkingX]."';
hook_character_WalkQueueY = '".$triarray[character][WalkingY]."';
hook_character_GetHeight = '".$triarray[character][Height]."';
hook_character_LoopCycleStatus = '".$triarray[character][LoopCycleStatus]."';
hook_character_HPRatio = '".$triarray[character][HPRatio]."';
hook_character_GetInteracting = '".$triarray[character][Interacting]."';
hook_character_Orientation = '".$triarray[character][Orientation]."';
{Class NPC}
class_NPC = '".$triarray[npc][root]."';
hook_npc_NPCDef = '".$triarray[npc][Def]."';
{Class NPCDef}
class_NPCDef = '".$triarray[npcdef][root]."';
hook_npcdef_GetActions = '".$triarray[npcdef][Actions]."';
hook_npcdef_GetName = '".$triarray[npcdef][Name]."';
hook_npcdef_GetLevel = '".$triarray[npcdef][Level]."';
hook_npcdef_GetID = '".$triarray[npcdef][Id]."';
{Class NPCNode}
class_NPCNode = '".$triarray[npcnode][root]."';
hook_npcnode_GetNPC = '".$triarray[npcnode][Npc]."';
{Class GroundTile}
class_GroundTile = '".$triarray[groundtile][root]."';
{Class Plane}
class_Plane = '".$triarray[plane][root]."';
{Class RSInteractable}
class_RSInteractable = '".$triarray[a]."';
{Class Toolkit}
class_Toolkit = '".$triarray[graphicstoolkit][root]."';
{Class Viewport}
class_Viewport = '".$triarray[a]."';
{Class SDViewport}
class_SDViewport = '".$triarray[sdviewport][root]."';
hook_sdviewport_xOff = '".$triarray[sdviewport][XOff]."';
hook_sdviewport_xX = '".$triarray[sdviewport][XX]."';
hook_sdviewport_xY = '".$triarray[sdviewport][XY]."';
hook_sdviewport_xZ = '".$triarray[sdviewport][XZ]."';
hook_sdviewport_yOff = '".$triarray[sdviewport][YOff]."';
hook_sdviewport_yX = '".$triarray[sdviewport][YX]."';
hook_sdviewport_yY = '".$triarray[sdviewport][YY]."';
hook_sdviewport_yZ = '".$triarray[sdviewport][YZ]."';
hook_sdviewport_zOff = '".$triarray[sdviewport][ZOff]."';
hook_sdviewport_zX = '".$triarray[sdviewport][ZX]."';
hook_sdviewport_zY = '".$triarray[sdviewport][ZY]."';
hook_sdviewport_zZ = '".$triarray[sdviewport][ZZ]."';
{Class SDToolkit}
class_SDToolkit = '".$triarray[sdtoolkit][root]."';
hook_sdtoolkit_Viewport = '".$triarray[sdtoolkit][Viewport]."';
hook_sdtoolkit_xMin = '".$triarray[sdtoolkit][XMin]."';
hook_sdtoolkit_xMax = '".$triarray[sdtoolkit][XMax]."';
hook_sdtoolkit_yMin = '".$triarray[sdtoolkit][YMin]."';
hook_sdtoolkit_yMax = '".$triarray[sdtoolkit][YMax]."';
hook_sdtoolkit_zMin = '".$triarray[sdtoolkit][ZMin]."';
hook_sdtoolkit_zMax = '".$triarray[sdtoolkit][ZMax]."';
hook_sdtoolkit_xScale = '".$triarray[sdtoolkit][XScale]."';
hook_sdtoolkit_yScale = '".$triarray[sdtoolkit][YScale]."';
{Class SDModel}
class_SDModel = '".$triarray[sdmodel][root]."';
hook_sdmodel_getIndices1 = '".$triarray[sdmodel][Indices1]."';
hook_sdmodel_getIndices2 = '".$triarray[sdmodel][Indices2]."';
hook_sdmodel_getIndices3 = '".$triarray[sdmodel][Indices3]."';
hook_sdmodel_getPointsX = '".$triarray[sdmodel][PointsX]."';
hook_sdmodel_getPointsY = '".$triarray[sdmodel][PointsY]."';
hook_sdmodel_getPointsZ = '".$triarray[sdmodel][PointsZ]."';
{Class SDPlane}
class_SDPlane = '".$triarray[plane][root]."';
hook_sdplane_TileHeights = '".$triarray[plane][TileHeights]."';
{Class NodeList}
class_NodeList = '".$triarray[nodelist][root]."';
hook_nodelist_Current = '".$triarray[a]."';
hook_nodelist_Head = '".$triarray[a]."';
{Class Node}
class_Node = '".$triarray[node][root]."';
hook_node_Next = '".$triarray[node][Next]."';
hook_node_GetID = '".$triarray[node][ID]."';
hook_node_Previous = '".$triarray[node][Previous]."';
{Class Menu}
class_Menu = '".$triarray[menunode][root]."';
hook_menu_Action = '".$triarray[menunode][Action]."';
hook_menu_Option = '".$triarray[menunode][Option]."';
{Class PlayerDef}
class_PlayerDef = '".$triarray[a]."';
hook_playerdef_GetEquipment = '".$triarray[a]."';
{Class AnimableNode}
class_AnimableNode = '".$triarray[animablenode][root]."';
hook_AnimableNode_GetAnimable = '".$triarray[animablenode][Animable]."';
hook_AnimableNode_GetNext = '".$triarray[animablenode][Next]."';
{Class ObjectInterface}
class_ObjectInterface = '".$triarray['interface'][root]."';
hook_interface_GetActions = '".$triarray['interface'][Actions]."';
hook_interface_GetX = '".$triarray['interface'][X]."';
hook_interface_GetY = '".$triarray['interface'][Y]."';
hook_interface_GetWidth = '".$triarray['interface'][Width]."';
hook_interface_GetHeight = '".$triarray['interface'][Height]."';
hook_interface_GetText = '".$triarray['interface'][Text]."';
hook_interface_GetTextureID = '".$triarray['interface'][TextureID]."';
hook_interface_GetTextColor = '".$triarray['interface'][TextColor]."';
hook_interface_GetModelID = '".$triarray['interface'][ModelID]."';
hook_interface_GetModelZoom = '".$triarray[a]."';
hook_interface_GetName = '".$triarray['interface'][Name]."';
hook_interface_GetChildren = '".$triarray['interface'][Children]."';
hook_interface_GetID = '".$triarray['interface'][ComponentID]."';
hook_interface_GetStack = '".$triarray['interface'][StackSize]."';
hook_interface_GetParentID = '".$triarray['interface'][ParentID]."';
hook_interface_IsHidden = '".$triarray['interface'][IsHidden]."';
{Class Ground}
class_Ground = '".$triarray[groundtile][root]."';
hook_ground_AnimableList = '".$triarray[groundtile][AnimableList]."';
hook_ground_WallObject1 = '".$triarray[groundtile][WallObject1]."';
hook_ground_WallObject2 = '".$triarray[groundtile][WallObject2]."';
hook_ground_WallDecoration1 = '".$triarray[groundtile][WallDecoration1]."';
hook_ground_WallDecoration2 = '".$triarray[groundtile][WallDecoration2]."';
hook_ground_FloorDecoration = '".$triarray[groundtile][FloorDecoration]."';
{Class NodeCache}
class_NodeCache = '".$triarray[nodecache][root]."';
hook_nodecache_GetNodes = '".$triarray[nodecache][Cache]."';
{Class Item}
class_Item = '".$triarray[rsitem][root]."';
hook_item_GetID = '".$triarray[rsitem][ID]."';
hook_item_GetStack = '".$triarray[a]."'; *
{Class NodeListCache}
class_NodeListCache = '".$triarray[nodelistcache][root]."';
hook_nodelistcache_GetNodeList = '".$triarray[nodelistcache][NodeList]."';
{Class SettingArray}
class_SettingArray = '".$triarray[settings][root]."';
hook_settingarray_GetData = '".$triarray[settings][Settings]."';
{Class InteractiveObject}
class_InteractiveObject = '".$triarray[interactiveobject1][root]."';
hook_interactiveobject_GetID = '".$triarray[interactiveobject1][Id]."';
hook_interactiveobject_GetModel = '".$triarray[interactiveobject1][Model]."';
{Class InteractiveObject2}
class_InteractiveObject2 = '".$triarray[interactiveobject2][root]."';
hook_interactiveobject2_GetObjectData = '".$triarray[interactiveobject2][Data]."';
{Class SecondLevelObject}
class_SecondLevelObject = '".$triarray[objectdata][root]."';
hook_secondlevelobject_GetID = '".$triarray[objectdata][Id]."';
hook_secondlevelobject_GetModel = '".$triarray[objectdata][Model]."';
{Class WallObjectData}
class_WallObjectData = '".$triarray[wallobjectdata][root]."';
hook_WallObjectData_GetID = '".$triarray[wallobjectdata][Id]."';
hook_WallObjectData_GetModel = '".$triarray[wallobjectdata][Model]."';
hook_WallObjectData_GetOrientation = '".$triarray[a]."';
{Class WallDecorationData}
class_WallDecorationData = '".$triarray[walldecorationdata][root]."';
hook_WallDecorationData_GetID = '".$triarray[walldecorationdata][Id]."';
hook_WallDecorationData_GetModel = '".$triarray[walldecorationdata][Model]."';
hook_WallDecorationData_GetOrientation = '".$triarray[a]."';
{Class FloorDecorationData}
class_FloorDecorationData = '".$triarray[floordecorationdata][root]."';
hook_FloorDecorationData_GetID = '".$triarray[floordecorationdata][Id]."';
hook_FloorDecorationData_GetModel = '".$triarray[floordecorationdata][Model]."';
hook_FloorDecorationData_GetOrientation = '".$triarray[a]."';";
file_put_contents($version.'.txt', $hooks);
}
echo file_get_contents($version.'.txt');
?>[/php]