SRL Archive - S.M.A.R.T.

[tut] RSBot -> HOOX


n3ss3s

2008-06-08 13:50:45

Qauters was very kind to tell me how to get the hooks from RSBot, and even gave me an output :)


First, get a Java decompiler, this cavaj I have is okay enough…

Then, www.rsbot.com and download the bot.


Then extract the RS.jar to class files, and decompile the client.class.

On the bottom of the reconstructed source code, you should get a wiiiide smile on your face, -

EDIT: TAGS ARE FUCKED :(

But not anymore, because Nielsie saves the day!




public final int[] getNPCIndexArray()
{
return ie.R;
}

public final NPC[] getNPCArray()
{
return ge.c;
}

public final int getNPCCount()
{
return ii.V;
}

public final int[] getPlayerIndexArray()
{
return ah.P;
}

public final Player[] getPlayerArray()
{
return ag.hb;
}

public final int getPlayerCount()
{
return h.P;
}

public final int getBaseX()
{
return jb.s;
}

public final Player getMyPlayer()
{
return wa.gb;
}

public final int getBaseY()
{
return le.a;
}

public final int getPublicChatMode()
{
return be.I;
}

public final int getLoopCycle()
{
return sg.d;
}

public final int getSelfInteracting()
{
return gj.S;
}

public final int[][][] getGroundIntArray()
{
return de.b;
}

public final byte[][][] getGroundByteArray()
{
return rh.O;
}

public final int getPlane()
{
return lf.cb;
}

public final int getCamPosX()
{
return ae.L;
}

public final int getCamPosY()
{
return kj.h;
}

public final int getCamPosZ()
{
return pc.v;
}

public final int getCameraCurveY()
{
return ie.Z;
}

public final int getCameraCurveX()
{
return cb.i;
}

public final boolean[] getValidInterfaceArray()
{
return l.j;
}

public final RSString getCurrentPassword()
{
return bg.M;
}

public final RSString getCurrentUsername()
{
return bg.L;
}

public final int getIdleTime()
{
return ih.i;
}

public final Mouse getMouse()
{
return ci.y;
}

public final Keyboard getKeyboard()
{
return ih.m;
}

public final Frame getFrame()
{
return ma.x;
}

public final Interface[][] getInterfaceCache()
{
return qc.P;
}

public final int getMouseX()
{
return v.X;
}

public final int getMouseY()
{
return ue.s;
}

public final int getMousePressX()
{
return q.n;
}

public final int getMousePressY()
{
return nj.cb;
}

public final int getMousePressButton()
{
return di.e;
}

public final int getMousePressLastButton()
{
return lh.g;
}

public final long getMousePressTime()
{
return we.jb;
}

public final int getLoginIndex()
{
return ka.d;
}

public final int[] getSettingArray()
{
return og.T;
}

public final Ground[][][] getGroundArray()
{
return qf.r;
}

public final int[] getSkillExperiencesMax()
{
return hi.h;
}

public final int[] getSkillLevelMaxes()
{
return wi.w;
}

public final int[] getSkillLevels()
{
return dj.Cb;
}

public final int[] getSkillExperiences()
{
return kg.o;
}

public final int getMinimapInt3()
{
return ld.Ic;
}

public final int[] getCURVECOS()
{
return pf.m;
}

public final int[] getCURVESIN()
{
return pf.d;
}

public final int getMinimapInt2()
{
return hf.c;
}

public final int getMinimapInt1()
{
return id.Z;
}

public final NodeList[][][] getNodeListArray()
{
return qi.n;
}

public final RSString[] getChatMessages()
{
return q.d;
}

public final RSString[] getChatNames()
{
return p.p;
}

public final int[] getChatTypes()
{
return q.k;
}

public final int getMenuOptionsCount()
{
return j.P;
}

public final boolean isMenuOpen()
{
return kj.j;
}

public final int getMenuY()
{
return ai.ab;
}

public final int getMenuX()
{
return wi.p;
}

public final RSString[] getMenuOptions()
{
return uc.h;
}

public final RSString[] getMenuActions()
{
return vd.N;
}

public final short[] getActionID()
{
return ph.Z;
}

public final long[] getActionCmd1()
{
return qi.q;
}

public final int[] getActionCmd2()
{
return gh.D;
}

public final int[] getActionCmd3()
{
return rj.Y;
}

public final Signlink getSignlink()
{
return ai.P;
}

public final boolean isFlagged()
{
return rh.P;
}

public final boolean isSpellSelected()
{
return cg.Eb;
}

public final int getItemSelected()
{
return g.nc;
}

public final RSString getSelectedItemName()
{
return uf.X;
}

public final int spellUsableOn()
{
return ca.p;
}

public final RSString getSelectedSpellName()
{
return da.f;
}

public final MRUNodes getObjectDefMRUNodes()
{
return fe.c;
}

public final MRUNodes getItemDefMRUNodes()
{
return aa.c;
}

public final boolean isMembers()
{
return oi.ab;
}

public final Sprite getMinimapSprite()
{
return (Sprite)kj.k;
}

public final Sprite[] getMapDots()
{
return (Sprite[])kb;
}

public final long[] getFriendListAsLongs()
{
return nf.b;
}

public final int[] getFriendNodeIDs()
{
return oj.I;
}

public final int getFriendCount()
{
return jg.p;
}

public final int getDestX()
{
return rf.fb;
}

public final int getDestY()
{
return ri.D;
}

public final Sprite[] getMapMarkers()
{
return (Sprite[])kd.mb;
}

public final int[][] getCost()
{
return rg.Y;
}

public final int[][] getVia()
{
return qc.L;
}

public final GroundData[] getGroundDataArray()
{
return aj.a;
}


:)


Here is the output


Downloading and extracting runescape.jar - Took: 8562ms
-------------------------------------------------------
Runescape Build #500


Hooking RSString
* i implements interface com.speljohan.rsbot.accessors.RSString
* isEditable() added to class i gets FIELD boolean i.h
* getHash() added to class i gets FIELD int i.r
* getBytes() added to class i gets FIELD byte[] i.T
* getLength() added to class i gets FIELD int i.kb


Hooking NPC
* getNPCIndexArray() added to class client gets STATIC int[] cb.g
* getNPCArray() added to class client gets STATIC rf[] ug.f
* rf implements interface com.speljohan.rsbot.accessors.NPC
* getNPCDef() added to class rf gets FIELD lf rf.Hb
* getNPCCount() added to class client gets STATIC int ej.B


Hooking NPCDef
* lf implements interface com.speljohan.rsbot.accessors.NPCDef
* getName() added to class lf gets FIELD i lf.gb
* getActions() added to class lf gets FIELD i[] lf.hb
* getType() added to class lf gets FIELD int lf.E


Hooking Player
* getPlayerIndexArray() added to class client gets STATIC int[] q.lb
* getPlayerArray() added to class client gets STATIC dj[] we.B
* dj implements interface com.speljohan.rsbot.accessors.Player
* getPlayerCount() added to class client gets STATIC int ej.n


Hooking PlayerDef
* cg implements interface com.speljohan.rsbot.accessors.Model
* getModel() added to class dj gets FIELD cg dj.Yb
* nc implements interface com.speljohan.rsbot.accessors.Animable
* getName() added to class dj gets FIELD i dj.gc
* ea implements interface com.speljohan.rsbot.accessors.Stream
* getCurrentOffset() added to class ea gets FIELD int ea.X
* getPkHeadIcon() added to class dj gets FIELD short dj.jc
* getPrayerHeadIcon() added to class dj gets FIELD short dj.bc
* getTeam() added to class dj gets FIELD short dj.bc
* getLevel() added to class dj gets FIELD int dj.Nb


Hooking Position
* getMyPlayer() added to class client gets STATIC dj wa.d
* getLocationY() added to class u gets FIELD int[] u.D
* getBaseX() added to class client gets STATIC int ue.t
* getLocationX() added to class u gets FIELD int[] u.Fb
* getBaseY() added to class client gets STATIC int re.m


Hooking Character
* u implements interface com.speljohan.rsbot.accessors.Character
* getMessage() added to class u gets FIELD i u.n
* getAnimation() added to class u gets FIELD int u.t
* isMoving() added to class u gets FIELD int u.zb
* getY() added to class u gets FIELD int u.lb
* getX() added to class u gets FIELD int u.Ab


Hooking Entity
* getPublicChatMode() added to class client gets STATIC int g.d
* getHPRatio() added to class u gets FIELD int u.Z
* getLoopCycle() added to class client gets STATIC int kh.I
* getLoopCycleStatus() added to class u gets FIELD int u.ib
* getHeight() added to class u gets FIELD int u.X


Hooking InteractingEntity
* getInteracting() added to class u gets FIELD int u.eb
* getSelfInteracting() added to class client gets STATIC int ub.gb
* getTurnDirection() added to class u gets FIELD int u.jb


Hooking GroundInt
* getGroundIntArray() added to class client gets STATIC int[][][] ff.R


Hooking GroundByteArray
* getGroundByteArray() added to class client gets STATIC byte[][][] kg.ab


Hooking Camera
* getPlane() added to class client gets STATIC int ng.Yb
* getCamPosX() added to class client gets STATIC int hb.U
* getCamPosY() added to class client gets STATIC int qj.Y
* getCamPosZ() added to class client gets STATIC int jj.v


Hooking CameraCurves
* getCameraCurveY() added to class client gets STATIC int t.v
* getCameraCurveX() added to class client gets STATIC int pg.G


Hooking Interface
* q implements interface com.speljohan.rsbot.accessors.Interface
* getMasterX() added to class q gets FIELD int q.masterX
* getMasterY() added to class q gets FIELD int q.masterY
* getValueIndexArray() added to class q gets FIELD int[][] q.B
* getCache() added to class q gets FIELD q[] q.Wb
* getInventory() added to class q gets FIELD int[] q.x
* getInventoryStackSizes() added to class q gets FIELD int[] q.fc
* getInterfaceSelectedModelType() added to class q gets FIELD int q.l
* getInterfaceSelectedModelID() added to class q gets FIELD int q.zb
* getNotInterfaceSelectedModelType() added to class q gets FIELD int q.nb
* getNotInterfaceSelectedModelID() added to class q gets FIELD int q.S
* getType() added to class q gets FIELD int q.z
* getActionType() added to class q gets FIELD int q.d
* getWidth() added to class q gets FIELD int q.Gc
* getHeight() added to class q gets FIELD int q.bb
* getActions() added to class q gets FIELD i[] q.Qc
* isInventoryInterface() added to class q gets FIELD boolean q.sb
* getText() added to class q gets FIELD i q.s
* getBackgroundColor() added to class q gets FIELD int q.ec
* getTextColour() added to class q gets FIELD int q.X
* getInvSpritePadX() added to class q gets FIELD int q.Xb
* getInvSpritePadY() added to class q gets FIELD int q.Nc
* getSelectedActionName() added to class q gets FIELD i q.Rc
* getSpellName() added to class q gets FIELD i q.Qb
* getToolTip() added to class q gets FIELD i q.Rb


Hooking InterfaceXY
* getX() added to class q gets FIELD int q.b
* getY() added to class q gets FIELD int q.yb
* Hacked class pb to set the fields masterX and masterY in the class q


Hooking ValidInterfaceArray
* getValidInterfaceArray() added to class client gets STATIC boolean[] pd.Z


Hooking Signlink
* getCurrentPassword() added to class client gets STATIC i tb.o
* getCurrentUsername() added to class client gets STATIC i tb.l
* Uid hacking finished!
* getEventQueue() added to class qg gets FIELD java.awt.EventQueue qg.n
* getCacheFolder() added to class qg gets FIELD java.io.File qg.o
* getGameApplet() added to class qg gets FIELD java.applet.Applet qg.s


Hooking Client
* client implements interface com.speljohan.rsbot.accessors.Client
* getIdleTime() added to class client gets STATIC int re.b
* getMouse() added to class client gets STATIC be di.ab
* getKeyboard() added to class client gets STATIC eh pc.b
* getInterfaceCache() added to class client gets STATIC q[][] ha.D
* getFrame() added to class client gets STATIC java.awt.Frame se.a


Hooking Mouse
* getMouseX() added to class client gets STATIC int vc.Y
* getMouseY() added to class client gets STATIC int pg.ub
* getMousePressX() added to class client gets STATIC int ea.Z
* getMousePressY() added to class client gets STATIC int mh.T
* getMousePressButton() added to class client gets STATIC int ea.z
* getMousePressLastButton() added to class client gets STATIC int of.i
* getMousePressTime() added to class client gets STATIC long ra.Z


Hooking LoginIndex
* getLoginIndex() added to class client gets STATIC int v.E


Hooking SettingArray
* getSettingArray() added to class client gets STATIC int[] kd.eb


Hooking Item
* getID() added to class kb gets FIELD int kb.x
* getStackSize() added to class kb gets FIELD int kb.w
* kb implements interface com.speljohan.rsbot.accessors.Item


Hooking WorldController
* getGroundArray() added to class client gets STATIC eg[][][] cf.m
* eg implements interface com.speljohan.rsbot.accessors.Ground
* jj implements interface com.speljohan.rsbot.accessors.ObjectDefinition
* getUID() added to class jj gets FIELD long jj.p
* w implements interface com.speljohan.rsbot.accessors.ObjectDefinition
* getUID() added to class w gets FIELD long w.g
* pc implements interface com.speljohan.rsbot.accessors.ObjectDefinition
* getUID() added to class pc gets FIELD long pc.p
* fh implements interface com.speljohan.rsbot.accessors.ObjectDefinition
* getUID() added to class fh gets FIELD long fh.b
* oe implements interface com.speljohan.rsbot.accessors.ObjectDefinition
* getUID() added to class oe gets FIELD long oe.l
* getObject4() added to class eg gets FIELD w eg.E
* getObject3() added to class eg gets FIELD pc eg.G
* getObject2() added to class eg gets FIELD fh eg.N
* getObject1() added to class eg gets FIELD oe eg.Q
* getObject5Array() added to class eg gets FIELD jj[] eg.U


Hooking SkillExperiencesMax
* getSkillExperiencesMax() added to class client gets STATIC int[] ib.E


Hooking Skills
* getSkillLevelMaxes() added to class client gets STATIC int[] tj.l
* getSkillLevels() added to class client gets STATIC int[] jg.G
* getSkillExperiences() added to class client gets STATIC int[] qe.h


Hooking Minimap
* getMinimapInt3() added to class client gets STATIC int fi.F
* getCURVECOS() added to class client gets STATIC int[] pj.m
* getCURVESIN() added to class client gets STATIC int[] pj.h
* getMinimapInt2() added to class client gets STATIC int t.r
* getMinimapInt1() added to class client gets STATIC int eg.y


Hooking Node
* me implements interface com.speljohan.rsbot.accessors.NodeSub
* g implements interface com.speljohan.rsbot.accessors.Node
* getID() added to class g gets FIELD long g.q
* getNext() added to class g gets FIELD g g.j
* getPrevious() added to class g gets FIELD g g.r


Hooking NodeList
* getNodeListArray() added to class client gets STATIC wi[][][] mc.f
* wi implements interface com.speljohan.rsbot.accessors.NodeList
* getHead() added to class wi gets FIELD g wi.d
* getCurrent() added to class wi gets FIELD g wi.h


Hooking CachedItem
* ui implements interface com.speljohan.rsbot.accessors.CachedItem
* getItem() added to class ui gets FIELD kb ui.L


Hooking Chat
* getChatMessages() added to class client gets STATIC i[] ph.ab
* getChatNames() added to class client gets STATIC i[] te.ab
* getChatTypes() added to class client gets STATIC int[] wc.J


Hooking Menu
* getMenuOptionsCount() added to class client gets STATIC int sg.o
* isMenuOpen() added to class client gets STATIC boolean jj.z
* getMenuY() added to class client gets STATIC int ve.Z
* getMenuX() added to class client gets STATIC int hi.a


Hooking MenuStringWrapper
* getMenuOptions() added to class client gets STATIC i[] se.e
* getMenuActions() added to class client gets STATIC i[] fj.e


Hooking ActionConstants
* getActionID() added to class client gets STATIC short[] eh.B
* getActionCmd1() added to class client gets STATIC long[] gh.w
* getActionCmd2() added to class client gets STATIC int[] pb.F
* getActionCmd3() added to class client gets STATIC int[] tj.f


Hooking Flagged
* getSignlink() added to class client gets STATIC qg lf.O
* isFlagged() added to class client gets STATIC boolean fa.S


Hooking ScreenMenu3d
* isSpellSelected() added to class client gets STATIC boolean ai.e
* getItemSelected() added to class client gets STATIC int ce.db
* nf implements interface com.speljohan.rsbot.accessors.ObjectDef
* getChildrenIDs() added to class nf gets FIELD int[] nf.G
* getSelectedItemName() added to class client gets STATIC i da.db
* getName() added to class nf gets FIELD i nf.J
* spellUsableOn() added to class client gets STATIC int bc.j
* getActions() added to class nf gets FIELD i[] nf.Ab
* getType() added to class nf gets FIELD int nf.Pb
* ng implements interface com.speljohan.rsbot.accessors.ItemDef
* getGroundActions() added to class ng gets FIELD i[] ng.Pb
* getSelectedSpellName() added to class client gets STATIC i d.U
* getName() added to class ng gets FIELD i ng.Jb


Hooking NodeClasses
* getItemDefMRUNodes() added to class client gets STATIC id td.V
* id implements interface com.speljohan.rsbot.accessors.MRUNodes
* sf implements interface com.speljohan.rsbot.accessors.NodeSubList
* getList() added to class id gets FIELD sf id.k
* getInitialCount() added to class id gets FIELD int id.m
* getSpaceLeft() added to class id gets FIELD int id.n
* ob implements interface com.speljohan.rsbot.accessors.NodeCache
* getNodeCache() added to class id gets FIELD ob id.l
* getCache() added to class ob gets FIELD g[] ob.h
* getID() added to class ng gets FIELD int ng.N
* getCertTemplateID() added to class ng gets FIELD int ng.kb
* getCertID() added to class ng gets FIELD int ng.kb
* isMembers() added to class client gets STATIC boolean n.k
* isMembersObject() added to class ng gets FIELD boolean ng.ub
* getTeam() added to class ng gets FIELD int ng.D
* getActions() added to class ng gets FIELD i[] ng.Vb
* getObjectDefMRUNodes() added to class client gets STATIC id qe.d


Hooking DrawMinimap
* pf implements interface com.speljohan.rsbot.accessors.Sprite
* getMinimapSprite() added to class client gets STATIC rc ka.f
* getMapDots() added to class client gets STATIC rc[] da.S
* getFriendListAsLongs() added to class client gets STATIC long[] kf.p
* getFriendNodeIDs() added to class client gets STATIC int[] oh.p
* getFriendCount() added to class client gets STATIC int nd.c
* getDestX() added to class client gets STATIC int mi.W
* getDestY() added to class client gets STATIC int kg.eb
* getMapMarkers() added to class client gets STATIC rc[] wh.T


Hooking Sprite
* getWidth() added to class pf gets FIELD int rc.O
* getHeight() added to class pf gets FIELD int rc.M
* getPixels() added to class pf gets FIELD int[] pf.S


Hooking CanReach
* getCost() added to class client gets STATIC int[][] uj.a
* getVia() added to class client gets STATIC int[][] re.g
* ia implements interface com.speljohan.rsbot.accessors.GroundData
* getGroundDataArray() added to class client gets STATIC ia[] pc.n
* getBlocks() added to class ia gets FIELD int[][] ia.g


Hooking ServerMessageListener
* Hooked in vg.b(args)


Hooking CharacterMovedListener
* Hooked in u.a(args)

-----------------------------------
Hooked 177 / 177 fields!
Defined 28 / 28 classes!
Added 2 / 2 Event callers!
Modificated 4 / 4 methods!
This took 2502ms!
About 14ms per hook!
Packing the RSJar - Took: 937ms
Downloading and dumping modified loader.jar - Took: 563ms
-----------------------------------

***********************************
Updating took: 14341ms
***********************************

Markus

2008-06-08 13:58:46


hax
hm

the scar noob

2008-06-08 14:33:25

From: Markus

hax
hm


Hooking Signlink
* getCurrentPassword() added to class client gets STATIC i tb.o
* getCurrentUsername() added to class client gets STATIC i tb.l

Hmm..

-Tsn.

n3ss3s

2008-06-08 14:45:18

Here is my attempt to put them into the consts, I don't know where do you have to only put the letters after the dot or before and after but I tried to do same as with old one.


//RS Build = #500
const

//Hooking RSString
StringBytes = 'T'; //byte[]*

// Hooking NPC
NPCIndexarray = 'cb.g';//*
NPCArray = 'ug.f';//*
NPCDef = 'rf.Hb';//*
NPCCount = 'ej.B';//*

//Hooking NPCDef
NPCActions = 'lf.hb';//*
NPCsName = 'lf.gb';//*

//Hooking PlayerDef
CharName = 'gc'; //StringWrap*

//Hooking Position
MyPlayer = 'wa.d'; //Player (getMyPlayer)*
BaseX = 'ue.t'; //int (getBaseX)*
BaseY = 're.m'; //int (getBaseY)*

//Hooking Character
CharAnim = 't'; //int*
CharMotion = 'V'; //int* // OLD
CurrentX = 'Fb'; //int*
CurrentY = 'D'; //int*

//Hooking Entity
CharHeight = 'X';//*

//Hooking GroundInt
GroundHeights = 'ff.R'; //int[][][] (groundIntArray)*

//Hooking GroundByteArray
GroundSettings = 'kg.ab'; //byte[][][] (groundByteArray)*

//Hooking Camera
BaseLayer = 'ng.Yb'; //int (plane/terrainInt)*
CamX = 'hb.U'; //int*
CamY = 'qj.Y'; //int*
CamZ = 'jj.v'; //int*

//Hooking CameraCurves
CamPitch = 'pg.G'; //int (CamCurveX)*
CamYaw = 't.v'; //int (CamCurveY)*

//Hooking SettingArray
SettingsArray = 'kd.eb'; //int[]*

//Hooking Skills
MaxLevels = 'tj.l'; //int[] (getSkillLevelMaxes)*
CurrentLevels = 'jg.G'; //int[] (getSkillLevels)*
Experiances = 'qe.h'; //int[] (getSkillExperiences)*

//Hooking Minimap
MapOffsetAngle = 't.r'; //int (MinimapInt2)
CompassAngle = 'eg.y'; //int (MinimapInt1)

Bobarkinator

2008-06-08 16:25:47

Cool, but not that helpful, just fields. Which we could get easily enough.

Smartzkid

2008-06-09 00:38:50

Nice to have a good source, though.

Now someone write a parser :)

mastaraymond

2008-06-09 09:34:48

From: Smartzkid
Nice to have a good source, though.

Now someone write a parser :)

Haven't seen code from you in a long time, go ahead ;) .

n3ss3s

2008-06-09 09:46:23

Save the thing I pasted on top as RSBot OutPut (text file) in the Scripts folder, check the file path anyway, in this script, - gets all the fields, now we only need a case for every const in the Hooks.scar.


program New;


Function BetweenEx(S, Str1, Str2: String): TStringArray;

Var
L_Pos, x, z, p1, p2, l: Integer;
Begin
L_Pos := 1;
L := Length(Str1);
SetArrayLength(Result, Length(S));
Repeat
x := L_Pos;
p1 := PosEx(Str1, S, L_Pos);
If p1 > 0 Then
Begin
p2 := PosEx(Str2, S, p1);
If p2 > 0 Then
Begin
L_Pos := p2;
Result[z] := Copy(S, p1 + L, iAbs((p1 + l) - p2));
Z := Z + 1;
End;
End;
p1 := 0;
p2 := 0;
Until(x = L_Pos);
SetArrayLength(Result, Z);
End;


Var
Count, FileNum: Integer;
Fields: TStringArray;
S: String;

begin
FileNum := OpenFile('C:\SCAR 3.15\Scripts\RSBot OutPut.txt', False);
ReadFileString(FileNum, S, FileSize(FileNum));
Fields := BetweenEx(S, 'return', ';');
For Count := 0 To High(Fields) Do Writeln(Fields[count]);
end.

ie.R
ge.c
ii.V
ah.P
ag.hb
h.P
jb.s
wa.gb
le.a
be.I
sg.d
gj.S
de.b
rh.O
lf.cb
ae.L
kj.h
pc.v
ie.Z
cb.i
l.j
bg.M
bg.L
ih.i
ci.y
ih.m
ma.x
qc.P
v.X
ue.s
q.n
nj.cb
di.e
lh.g
we.jb
ka.d
og.T
qf.r
hi.h
wi.w
dj.Cb
kg.o
ld.Ic
pf.m
pf.d
hf.c
id.Z
qi.n
q.d
p.p
q.k
j.P
kj.j
ai.ab
wi.p
uc.h
vd.N
ph.Z
qi.q
gh.D
rj.Y
ai.P
rh.P
cg.Eb
g.nc
uf.X
ca.p
da.f
fe.c
aa.c
oi.ab
(Sprite)kj.k
(Sprite[])kb
nf.b
oj.I
jg.p
rf.fb
ri.D
(Sprite[])kd.mb
rg.Y
qc.L
aj.a



But it's weird, some things require the full thing like oj.I and some want only the thing after dot :(

Freddy1990

2008-06-09 17:41:39

How about someone writes a bytecode analyzer that will nicely output the SCAR include rather than relying on other people's logs? :)

Smartzkid

2008-06-09 18:10:41

From: mastaraymond
Haven't seen code from you in a long time, go ahead ;) .


Haha, I would, but SCAR can't do Sh#t. Not worth the time.

Freddy1990

2008-06-10 07:12:30

From: Smartzkid
Haha, I would, but SCAR can't do Sh#t. Not worth the time.


Sounds like you can't do Sh#t, but just blame the tool…

The Claw

2008-06-10 09:06:31

lolzorz.

Smartzkid

2008-06-10 20:35:33

Pointers?

Dynamic memory?

Win32 API?

Closed source IDE?

Some of the problems I've run into in the past 2 days.


Tried to make a parser for RS hooks. Gave up.

Tried to make some bitmap stuff, found out pretty quickly that it wouldn't work without pointers. Gave up.

Tried to make a Key -gen & -verification system; 'finished' it, but it's useless. What good is a key based auth system if you can't protect it? With dynamic memory, atleast we could build some 'real' protection into our scripts.

Bobarkinator

2008-06-10 23:40:16

From: Smartzkid

Win32 API?


That one is possible, but SCAR does have it's limitations. Remember it was originally designed to auto for RuneScape

Markus

2008-06-11 07:05:18

Who needs pointers/dynamic memory and all that crap. SCAR is fun due to its limitations :p

Yakman

2008-06-11 11:02:26

i think scar is perfectly capable of parsing strings from a file or otherwise
i made an irc bot in scar which is basically parsing strings from a socket

the way i would do it is if you make a stream-like system, where the whole file is stored in a string, and have an integer where you are currently up to while reading,
then have functions like readNextChar() which gives the next char, peerNextChar() which gives the next char, but doesnt skip it, so when you do read or peek again, you get the same char

but also have more complex functions, like readNextWord() which returns the text until the next space ' ' character, or readNextLine() which returns the next until the next newline character

like n3ss3s's way of making BetweenEx() works here, but it would get quite hard to scale it up, like if you're making a compiler/interpreter in scar, a stream-like way would be better

in my opinion, its not beyond scar to parse update logs and make scar source code (for the include)

n3ss3s

2008-06-11 15:01:38


in my opinion, its not beyond scar to parse update logs and make scar source code (for the include)


Hell no, just add a for count := 0 to High(Fields) do
with a Case count Of and then see what array index is what of our wanted consts in Hooks.scar, and we are done.

Except for removing half of the ones that only want the letter after the dot…

Smartzkid

2008-06-11 15:45:27

First off: sorry Freddy, didn't mean to be that harsh.

And now to the good stuff…

Pointers & dynamic memory would have been very convenient for some arrays I was working with in the parser. Yes, it could be done without them, and no, it wouldn't be too hard. It would be much easier and more flexible, though; extremely simple to add/remove hooks, etc, etc. It would even be adaptable to other sources with about 10 minutes work. Also, I really don't want to 'hardcode' the fields & other names, simply because it's boring, repetitive work.

Win32 API, yeah, totally possible, but you have to admit, it's a bit of a pain to enable API calls every time you want to run a script.

Also, I'm pretty fed up with whatever SCAR does when trying to pass procedures as variables. IE: If you want to write a new GetColor that will write a debug automatically (save tons of writeln's throughout the script), but still call the same GetColor function (after the debugging), there really isn't a way to. I worked on that one for a long time, but SCAR wouldn't yield (which is weird, because you can pass functions as variables, but for some reason, you can't store them in variables, or something like that…) If you didn't understand that, here's what I wanted to do: Rename a function contained in SCAR (for example, GetColor) to something else that I could call later on (GetColor2). Hence I would be able to extend the functionality of certain functions without having to rewrite what's already in SCAR

If someone solves the last problem, you get a cookie, respect, and the satisfaction that I'm not totally fed up with SCAR because of your help :)

Freddy1990

2008-06-12 12:10:51

From: Smartzkid
First off: sorry Freddy, didn't mean to be that harsh.

And now to the good stuff…

Pointers & dynamic memory would have been very convenient for some arrays I was working with in the parser. Yes, it could be done without them, and no, it wouldn't be too hard. It would be much easier and more flexible, though; extremely simple to add/remove hooks, etc, etc. It would even be adaptable to other sources with about 10 minutes work. Also, I really don't want to 'hardcode' the fields & other names, simply because it's boring, repetitive work.

Win32 API, yeah, totally possible, but you have to admit, it's a bit of a pain to enable API calls every time you want to run a script.

Also, I'm pretty fed up with whatever SCAR does when trying to pass procedures as variables. IE: If you want to write a new GetColor that will write a debug automatically (save tons of writeln's throughout the script), but still call the same GetColor function (after the debugging), there really isn't a way to. I worked on that one for a long time, but SCAR wouldn't yield (which is weird, because you can pass functions as variables, but for some reason, you can't store them in variables, or something like that…) If you didn't understand that, here's what I wanted to do: Rename a function contained in SCAR (for example, GetColor) to something else that I could call later on (GetColor2). Hence I would be able to extend the functionality of certain functions without having to rewrite what's already in SCAR

If someone solves the last problem, you get a cookie, respect, and the satisfaction that I'm not totally fed up with SCAR because of your help :)


You can easily build a GetColor function that overrides the one in SCAR and can use the one in SCAR and also make a GetColor2 function for the one in SCAR trough a plugin, that's what it's there for, to offer more flexibility…

Smartzkid

2008-06-12 13:11:08

What? I want to be able to do something like this:

function Getcolor(...);
begin
writeln(...);
OldGetColor(...);
end;

R0b0t1

2009-03-30 21:10:42

Well, if, in your procedure, you put:


procedure GetColor();
var
x: procedure(x, y: Integer);
begin
x = @GetColor;


You should see the problem. The only thing you could do would be to use "static" variables or save the pointer to a file to make sure it is the same one, although I think the text block for the function gets moved or deleted or something.