SRL Archive - Help

Finding Graahk?


Kasi

2011-01-15 07:32:00

im making a nature runecrafter and i was wondering through relection would the id of the graahk be different from everyone elses and how would i get the correct graahk? i need to left click on it if i can or right click and select it from the other "Interact" options e.g

Interact Spirit graahk
Interact Spirit graahk
Interact Spirit graahk // say this one is mine but chooseoption would only click
Interact Spirit graahk // the first one

thanks

mormonman

2011-01-15 16:04:05

Just move away from that spot before you click on it. I'm pretty sure they all have the same ID.

pyroryan

2011-01-17 18:50:29

From: pur3b100d
im making a nature runecrafter and i was wondering through relection would the id of the graahk be different from everyone elses and how would i get the correct graahk? i need to left click on it if i can or right click and select it from the other "Interact" options e.g

Interact Spirit graahk
Interact Spirit graahk
Interact Spirit graahk // say this one is mine but chooseoption would only click
Interact Spirit graahk // the first one

thanks


I'd agree with mormonman in that the ID would be the same (note I didn't check). However, even if they were the same, your graahk would be interacting with your character. So you can loop through all the NPCs around you and check whether any of them are interacting with you. If they are, then its your graahk. Then make sure the name is your familiar.

Kasi

2011-01-18 15:18:40

From: pyroryan
I'd agree with mormonman in that the ID would be the same (note I didn't check). However, even if they were the same, your graahk would be interacting with your character. So you can loop through all the NPCs around you and check whether any of them are interacting with you. If they are, then its your graahk. Then make sure the name is your familiar.


How exactly would i go doing this?
im not familiar with that part of reflection.
thanks =]

**BANNED The Man

2011-01-18 15:21:51

loop through:
InteractingWithMe(NPC: TNPC)

-Boom

Cigue

2011-01-18 15:32:28

Why don't you use color and try the one nearest to you?

Kasi

2011-01-18 15:35:47

From: Cigue
Why don't you use color and try the one nearest to you?


They Pile on top of eachother so its hard to find your graahk

pyroryan

2011-01-18 15:36:51

From: Cigue
Why don't you use color and try the one nearest to you?


At Castle Wars, there are like 3-6 graahks around the bank chest area. Color would have a hard time figuring out which one is yours.

Kasi

2011-01-18 15:37:35

From: Dynamite
loop through:
InteractingWithMe(NPC: TNPC)

-Boom

thanks =]

how would i go getting the right option from R_ChooseOption?
if the options are all the same?

mormonman

2011-01-18 15:54:39

From: pur3b100d
thanks =]

how would i go getting the right option from R_ChooseOption?
if the options are all the same?


Thats when you should move to a different tile.

Kasi

2011-01-18 16:02:08

From: mormonman
Thats when you should move to a different tile.

Im trying to do it without moving so far iv done this
i only want to move as a last choice

Function LoadInfo : Boolean;
Begin
GraahkNPC := 7363;
With GraahkCol Do
Begin
UpText := 'aah';
MaxDist := 50;
Color := 3044321;
HueMod := 0.01;
SatMod := 1.91;
LumTol := 12;
MinR := 160; MaxR := 254;
MinG := 92; MaxG := 147;
MinB := 49; MaxB := 80;
MinX := 19.17; MaxX := 52.22;
MinY := 15.62; MaxY := 42.03;
MinZ := 5.00; MaxZ := 12.77;
End;
with GraahkCol2 do
begin
UpText := 'aah';
MaxDist := 50;
Color := 12819598;
HueMod := 0.35;
SatMod := 1.62;
LumTol := 14;
MinR := 111; MaxR := 193;
MinG := 130; MaxG := 193;
MinB := 157; MaxB := 220;
MinX := 20.95; MaxX := 52.49;
MinY := 22.13; MaxY := 53.68;
MinZ := 35.49; MaxZ := 72.18;
end;
End;

Function TeleportGraahk : Boolean;
Var
P: TPoint;
FC, LC : TPoint;
Begin
Result := False;
If FindNPC(GraahkNPC, NPC) Then
Begin
FC := TileToMS(Point(NPC.Tile.x - 1, NPC.Tile.y - 1), 5);
LC := TileToMS(Point(NPC.Tile.x + 1, NPC.Tile.y + 1), 5);
End;
If FindObjRecordEx(P.x, P.y, GraahkCol, FC.X, LC.Y, LC.X, FC.Y, True, True) Then
Begin
Mouse(P.x, P.y, 4, 4, True);
Wait(500 + Random(500));
Result := (GetColor(257, 368) = 128);
End;
If Not Result Then
Begin
Mouse(707, 145, 10, 10, True);
If FindNPC(GraahkNPC, NPC) Then
Begin
FC := TileToMS(Point(NPC.Tile.x - 1, NPC.Tile.y - 1), 5);
LC := TileToMS(Point(NPC.Tile.x + 1, NPC.Tile.y + 1), 5);
End;
If FindObjRecordEx(P.x, P.y, GraahkCol2, FC.X, LC.Y, LC.X, FC.Y, True, True) Then
Begin
Mouse(P.x, P.y, 4, 4, False);
Wait(500 + Random(500));
Result := (GetColor(257, 368) = 128);
End;
End;
If Result Then
Begin
Mouse(261, 435, RandomRange(-20, 20), RandomRange(-5, 5), True);
End;
End;