SRL Archive - News and General

Reflection Function Help


turbobk

2009-02-07 20:42:40

Hey guys, well I posted this in Reflection Help, but I got Zero help there so I thought I'd post it here, this is REALLY pissing me off, and I want to find out how to do it. I know pretty much all of the other Non-Reflection ways of doing it, I just want to know why this isn't WORKING?!?!

Im making a GE High Alcher with Reflection and I wanted to know how to use the
 IsItemEquippedAt 
function.

I want it to check if the player has a Staff of fire equipped without actually changing to the tab.

So far I have this, which SHOULD WORK (if im not mistaken).


If Not IsItemEquippedAt(3, 1387) Then
Begin
Blah Blah...

Now the 3 is supposedly the weapon slot which the Staff of fire would go if it was equipped (which it was equipped at the time of the test). And the 1387 is the Staff of fire's ID.

So I was wondering why it doesn't work?

Have I got it wrong or…?
Someone please help lol.

Thanks. :)

Method

2009-02-07 20:53:03

I have a feeling your ID is off (though I don't know why). Try using GetIDEquippedAt(3) to figure out the correct one.

turbobk

2009-02-07 20:59:11

From: Method
I have a feeling your ID is off (though I don't know why). Try using GetIDEquippedAt(3) to figure out the correct one.


Ok Thanks Method, I'll try that..
Also I used RSBot to get the Inventory ID and its the same on the RuneScape website Grand Exchange thingo lol.

But Ill see what happens and Ill post back.

Thanks again. :)

Method

2009-02-07 21:02:17

RSBot and our reflection often return IDs that are off by 1 (higher or lower, I'm not sure), but I don't know why. Make sure you use our reflection for figuring this one out, not RSBot.

turbobk

2009-02-07 21:25:18

Yay, I think I got it lol, I had to wash my dishes so I just only got to test it.

And YOU WERE RIGHT! Wo00t!
Thanks ALOT! You have no clue how much this was annoying me.

I ran this:

Procedure GetEquippedIDs;
Var
i: Integer;
Begin
For i := 0 To 14 Do
WriteLn(IntToStr(i) + ': ' + IntToStr(GetIDEquippedAt(i)));
End;

And got this back in the debugbox :D :D

0: 0
1: 0
2: 0
3: 1388
4: 0
5: 0
6: 0
7: 0
8: 0
9: 0
10: 0
11: 0
12: 0
13: 0
14: 0

On RSBot it is 1387, and Reflection it is 1388.
Thanks so much for the help man!! :) +Rep

lordsaturn

2009-02-07 22:59:15

From: turbobk
On RSBot it is 1387, and Reflection it is 1388.

Yeah, box is like that too. SMART is 3033 and RSBot is 3032.