Shuttleu
2008-08-01 18:45:06
okay so i downloaded reflection from svn and it doesnt work
so i soon found out that the hooks were broken
so i want to know how you update hooks or leech them from ibot
anyone who manages to help will be repped
~shut
Method
2008-08-01 18:58:40
Normally there's some updater output posted on the MITB forums. As of now, I believe we use RSBot's hooks, which are sometimes posted by qauters over there. However, I believe his updater didn't get the correct hooks for things like BaseX and BaseY, so everything dealing with tiles is broken because of that.
As of now, since we don't have an updater of our own, we're just going to have to wait until some new updater output is posted with the correct hooks.
Shuttleu
2008-08-01 19:07:56
okay but what i mean is how do you get the hooks from rsbot?
~shut
Method
2008-08-01 19:15:03
If you extract the rs.jar file in the RSBot folder (using WinRAR or something similar), you'll have a folder called rs with a bunch of class files. If you download a Java class decompiler, such as JAD, and open up the client class file, you'll be able to see the methods RSBot uses to retrieve information from the client at the bottom of it. Here's what's there right now:
public final int[] getNPCIndexArray()
{
return bj.c;
}
public final NPC[] getNPCArray()
{
return hb.k;
}
public final int getNPCCount()
{
return jk.g;
}
public final int[] getPlayerIndexArray()
{
return ef.i;
}
public final Player[] getPlayerArray()
{
return wh.D;
}
public final int getPlayerCount()
{
return ba.d;
}
public final Player getMyPlayer()
{
return wf.q;
}
public final int getBaseX()
{
return id.l;
}
public final int getBaseY()
{
return jg.X;
}
public final int getPublicChatMode()
{
return o.h;
}
public final int getLoopCycle()
{
return kc.a;
}
public final int getSelfInteracting()
{
return bi.z;
}
public final int[][][] getGroundIntArray()
{
return ld.R;
}
public final byte[][][] getGroundByteArray()
{
return pa.j;
}
public final int getPlane()
{
return ui.A;
}
public final int getCamPosX()
{
return pa.G;
}
public final int getCamPosY()
{
return na.e;
}
public final int getCamPosZ()
{
return ci.d;
}
public final int getCameraCurveY()
{
return ve.W;
}
public final int getCameraCurveX()
{
return ph.L;
}
public final boolean[] getValidInterfaceArray()
{
return te.p;
}
public final RSString getCurrentPassword()
{
return af.lb;
}
public final RSString getCurrentUsername()
{
return af.hb;
}
public final int getIdleTime()
{
return qh.s;
}
public final Mouse getMouse()
{
return p.g;
}
public final Keyboard getKeyboard()
{
return ci.h;
}
public final Interface[][] getInterfaceCache()
{
return eh.e;
}
public final int getMouseX()
{
return hh.K;
}
public final int getMouseY()
{
return fj.c;
}
public final int getMousePressX()
{
return b.l;
}
public final int getMousePressY()
{
return lg.w;
}
public final int getMousePressButton()
{
return og.b;
}
public final int getMousePressLastButton()
{
return sg.e;
}
public final long getMousePressTime()
{
return ci.p;
}
public final int getLoginIndex()
{
return vg.t;
}
public final int[] getSettingArray()
{
return ca.A;
}
public final Ground[][][] getGroundArray()
{
return ej.m;
}
public final int[] getSkillExperiencesMax()
{
return i.a;
}
public final int[] getSkillLevelMaxes()
{
return ve.fb;
}
public final int[] getSkillLevels()
{
return ng.L;
}
public final int[] getSkillExperiences()
{
return nd.W;
}
public final int getMinimapInt3()
{
return kb.db;
}
public final int[] getCURVECOS()
{
return va.b;
}
public final int[] getCURVESIN()
{
return va.f;
}
public final int getMinimapInt2()
{
return k.c;
}
public final int getMinimapInt1()
{
return vj.h;
}
public final NodeList[][][] getNodeListArray()
{
return re.L;
}
public final RSString[] getChatMessages()
{
return gi.i;
}
public final RSString[] getChatNames()
{
return ag.ob;
}
public final int[] getChatTypes()
{
return ve.V;
}
public final int getMenuOptionsCount()
{
return sh.U;
}
public final boolean isMenuOpen()
{
return de.o;
}
public final int getMenuY()
{
return bd.K;
}
public final int getMenuX()
{
return ng.P;
}
public final RSString[] getMenuOptions()
{
return uh.l;
}
public final RSString[] getMenuActions()
{
return id.x;
}
public final short[] getActionID()
{
return cd.r;
}
public final long[] getActionCmd1()
{
return wa.f;
}
public final int[] getActionCmd2()
{
return ah.e;
}
public final int[] getActionCmd3()
{
return fk.d;
}
public final Signlink getSignlink()
{
return ac.y;
}
public final boolean isFlagged()
{
return id.D;
}
public final boolean isSpellSelected()
{
return wj.J;
}
public final int getItemSelected()
{
return lh.F;
}
public final RSString getSelectedItemName()
{
return wj.D;
}
public final int spellUsableOn()
{
return f.U;
}
public final RSString getSelectedSpellName()
{
return pa.l;
}
public final MRUNodes getObjectDefMRUNodes()
{
return dg.S;
}
public final MRUNodes getItemDefMRUNodes()
{
return qb.U;
}
public final boolean isMembers()
{
return tb.z;
}
public final Sprite getMinimapSprite()
{
return (Sprite)rj.g;
}
public final Sprite[] getMapDots()
{
return (Sprite[])o.d;
}
public final long[] getFriendListAsLongs()
{
return mc.a;
}
public final int[] getFriendNodeIDs()
{
return u.n;
}
public final int getFriendCount()
{
return bj.e;
}
public final int getDestX()
{
return pe.w;
}
public final int getDestY()
{
return fk.h;
}
public final Sprite[] getMapMarkers()
{
return (Sprite[])ug.k;
}
public final int[][] getCost()
{
return wd.S;
}
public final int[][] getVia()
{
return bk.a;
}
public final GroundData[] getGroundDataArray()
{
return bk.c;
}
MylesMadness
2008-08-01 19:20:51
Hooks work right now for me. Well they did 30 minutes ago…
Shuttleu
2008-08-01 19:24:30
yay thank you soo much
rep ++
~shut
Method
2008-08-01 19:26:39
From: Mylesmadness
Hooks work right now for me. Well they did 30 minutes ago…
Either the BaseX and BaseY hooks aren't working or the CurrentX and CurrentY hooks aren't working (or maybe even both). When I try a simple GetMyPos, I receive:
33554430 33554430 as the x and y variables, which isn't correct.
EDIT: Nevermind, I forgot that you now had to add LoadHooks to the main loop. But it appears that some of the hooks are broken, since my walking doesn't work. It's the CurrentX and CurrentY hooks as far as I know.
MylesMadness
2008-08-01 20:00:44
My walking works. You have to add Setupreflection to the main loop right under setupsrl
Shuttleu
2008-08-01 20:10:28
well the walking might work but the location finding doesnt
~shut
Widget
2008-08-01 21:41:37
Sorry, I think this is mainly my fault. I parsed some hooks wrong from RSBot and MasterKill hasn't been on for me to give him the right hooks for his server. For now, call LoadHooks instead of SetupReflection and use the hooks.ini that came with the subversion :).
n3ss3s
2008-08-02 04:08:29
Here's the process how to update hooks from RSBot, Method told one half ;)
Download DJ Java Decompiler instead of JAD, and open up Archiver.exe in it's directory, then Open -> RSBot's RS folder where you extracted the classes, then edit -> select all, then Decompile.
After that, download Notepad++ and do Search From Files, and locate your RS folder that has the decompiled files, which are .jad even you used DJ.
Now, change the *.txt to *.jad, and the string to search use
Implements Character.
The class it find has half of the hooks we use on the bottom, and then the other half is in the bottom of client.class (.jad) in the same folder.
MasterKill
2008-08-02 06:21:06
I updated the hooks, like widget said he accedentely putted some wrong hooks at the wrong vars. The hooks should work normal again now, just call:
begin
SetupSRL;
SetupReflection;