Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook File Creation #66

Open
SandroCoutinho opened this issue Aug 12, 2018 · 3 comments
Open

Hook File Creation #66

SandroCoutinho opened this issue Aug 12, 2018 · 3 comments

Comments

@SandroCoutinho
Copy link
Member

The hook file created should be a JSON and not a XML.

Parabot/Parabot#194

@Fryslan
Copy link
Member

Fryslan commented Aug 12, 2018

  "injector": {
    "interfaces": {
      "add": [
        {
          "classname": "Animable",
          "interface": "Animable"
        },
        {
          "classname": "Node",
          "interface": "Node"
        },
        {
          "classname": "NodeSub",
          "interface": "NodeSub"
        },
        {
          "classname": "Class11",
          "interface": "CollisionMap"
        },
        {
          "classname": "RSInterface",
          "interface": "Interface"
        },
        {
          "classname": "NPC",
          "interface": "Npc"
        },
        {
          "classname": "Entity",
          "interface": "Character"
        },
        {
          "classname": "NodeList",
          "interface": "Deque"
        },
        {
          "classname": "Object1",
          "interface": "Object1"
        },
        {
          "classname": "Object2",
          "interface": "Object2"
        },
        {
          "classname": "Object3",
          "interface": "Object3"
        },
        {
          "classname": "Object4",
          "interface": "Object4"
        },
        {
          "classname": "Object5",
          "interface": "Object5"
        },
        {
          "classname": "Ground",
          "interface": "Ground"
        },
        {
          "classname": "Item",
          "interface": "Item"
        },
        {
          "classname": "Player",
          "interface": "Player"
        },
        {
          "classname": "WorldController",
          "interface": "Scene"
        },
        {
          "classname": "client",
          "interface": "Client"
        },
        {
          "classname": "EntityDef",
          "interface": "NpcDef"
        }
      ]
    },
    "getters": {
      "add": [
        {
          "accessor": "Node",
          "field": "next",
          "methodname": "getNext",
          "desc": "%sNode",
          "descfield": "LNode;"
        },
        {
          "accessor": "Node",
          "field": "id",
          "methodname": "getKey",
          "descfield": "J"
        },
        {
          "accessor": "CollisionMap",
          "field": "anIntArrayArray294",
          "methodname": "getFlags",
          "descfield": "[[I"
        },
        {
          "accessor": "Interface",
          "field": "inv",
          "methodname": "getItems",
          "descfield": "[I"
        },
        {
          "accessor": "Interface",
          "field": "invStackSizes",
          "methodname": "getStackSizes",
          "descfield": "[I"
        },
        {
          "accessor": "Interface",
          "field": "message",
          "methodname": "getMessage",
          "descfield": "Ljava/lang/String;"
        },
        {
          "accessor": "Npc",
          "field": "desc",
          "methodname": "getDef",
          "desc": "%sNpcDef",
          "descfield": "LEntityDef;"
        },
        {
          "accessor": "Deque",
          "field": "current",
          "methodname": "getCurrent",
          "desc": "%sNode",
          "descfield": "LNode;"
        },
        {
          "accessor": "Deque",
          "field": "head",
          "methodname": "getHead",
          "desc": "%sNode",
          "descfield": "LNode;"
        },
        {
          "accessor": "Ground",
          "field": "obj4",
          "methodname": "getGroundItem",
          "desc": "%sObject4",
          "descfield": "LObject4;"
        },
        {
          "accessor": "Ground",
          "field": "obj3",
          "methodname": "getGroundDecoration",
          "desc": "%sObject3",
          "descfield": "LObject3;"
        },
        {
          "accessor": "Ground",
          "field": "obj5Array",
          "methodname": "getInteractiveObjects",
          "desc": "[%sObject5",
          "descfield": "[LObject5;"
        },
        {
          "accessor": "Ground",
          "field": "obj2",
          "methodname": "getWallDecorations",
          "desc": "%sObject2",
          "descfield": "LObject2;"
        },
        {
          "accessor": "Ground",
          "field": "obj1",
          "methodname": "getWallObject",
          "desc": "%sObject1",
          "descfield": "LObject1;"
        },
        {
          "accessor": "Item",
          "field": "ID",
          "methodname": "getId",
          "descfield": "I"
        },
        {
          "accessor": "Player",
          "field": "name",
          "methodname": "getName",
          "descfield": "Ljava/lang/String;"
        },
        {
          "accessor": "Player",
          "field": "equipment",
          "methodname": "getEquipment",
          "descfield": "[I"
        },
        {
          "accessor": "Scene",
          "field": "groundArray",
          "methodname": "getGroundArray",
          "desc": "[[[%sGround",
          "descfield": "[[[LGround;"
        },
        {
          "accessor": "Client",
          "field": "baseX",
          "methodname": "getBaseX",
          "descfield": "I"
        },
        {
          "accessor": "Client",
          "field": "baseY",
          "methodname": "getBaseY",
          "descfield": "I"
        },
        {
          "accessor": "Client",
          "field": "aClass11Array1230",
          "methodname": "getCollisionMap",
          "desc": "[%sCollisionMap",
          "descfield": "[LClass11;"
        },
        {
          "accessor": "Client",
          "field": "currentExp",
          "methodname": "getCurrentExp",
          "descfield": "[I"
        },
        {
          "accessor": "Client",
          "field": "groundArray",
          "methodname": "getGroundItems",
          "desc": "[[[%sDeque",
          "descfield": "[[[LNodeList;"
        },
        {
          "accessor": "Client",
          "field": "loggedIn",
          "methodname": "isLoggedIn",
          "descfield": "Z"
        },
        {
          "classname": "client",
          "into": "client",
          "field": "loopCycle",
          "methodname": "getLoopCycle",
          "descfield": "I"
        },
        {
          "classname": "client",
          "into": "client",
          "field": "myPlayer",
          "methodname": "getMyPlayer",
          "desc": "%sPlayer",
          "descfield": "LPlayer;"
        },
        {
          "accessor": "Client",
          "field": "npcArray",
          "methodname": "getNpcs",
          "desc": "[%sNpc",
          "descfield": "[LNPC;"
        },
        {
          "accessor": "Client",
          "field": "openInterfaceID",
          "methodname": "getOpenInterfaceId",
          "descfield": "I"
        },
        {
          "accessor": "Client",
          "field": "playerArray",
          "methodname": "getPlayers",
          "desc": "[%sPlayer",
          "descfield": "[LPlayer;"
        },
        {
          "accessor": "Client",
          "field": "worldController",
          "methodname": "getScene",
          "desc": "%sScene",
          "descfield": "LWorldController;"
        },
        {
          "accessor": "Client",
          "field": "currentStats",
          "methodname": "getCurrentStats",
          "descfield": "[I"
        },
        {
          "accessor": "Client",
          "field": "variousSettings",
          "methodname": "getSettings",
          "descfield": "[I"
        },
        {
          "accessor": "NpcDef",
          "field": "type",
          "methodname": "getId",
          "desc": "I",
          "descfield": "J"
        },
        {
          "accessor": "NpcDef",
          "field": "name",
          "methodname": "getNpcName",
          "descfield": "Ljava/lang/String;"
        }
      ]
    },
    "callbacks": {
      "add": {
        "accessor": "Client",
        "methodname": "doAction",
        "desc": "(I)V",
        "callclass": "org/rev317/min/callback/MenuAction",
        "callmethod": "intercept",
        "calldesc": "(I)V",
        "callargs": "0"
      }
    },
    "invokers": {
      "add": [
        {
          "accessor": "Client",
          "methodname": "walkTo",
          "invokemethod": "doWalkTo",
          "desc": "Z",
          "argsdesc": "(IIIIIIIIIZI)"
        },
        {
          "accessor": "Client",
          "methodname": "doAction",
          "invokemethod": "doAction",
          "desc": "V",
          "argsdesc": "(I)"
        }
      ]
    }
  }
}

This is the XML file converted to Json, do we wanna go with this?
Or should the structure be different/better?

@JKetelaar
Copy link
Member

I don't see a reason to have "add" still there, maybe we should remove it and save those few bytes. Though that does require a change in the system/client.

@Fryslan
Copy link
Member

Fryslan commented Aug 15, 2018

I totaly agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants