SRL Archive - OSR Help

Help with a simple procedure please!


wazzzup

2012-03-08 23:43:36

Does anyone know how to make it so my character does nothing if its in the process of home teleporting rather than having a hard wait time such as in my script?

I basically need it to click home tele once and do nothing until its home. having a wait time makes it really slow :/

procedure TellyHome;
var
x, y, LunarHome: integer;
begin
LunarHome := DTMFromString('mbQAAAHicY2VgYOBggABeIBYAYmYgZgdibiDmA2IWqPy+I58Y2ubcQMFuDJiAEQsGAwBv+wr5');
begin
repeat
if GameTab(tab_Magic) then
if FindDTM(LunarHome, X, Y, MIX1, MIY1, MIX2, MIY2) then
MMouse(x, y, 2, 2);
Wait( randomrange (100, 300));
until IsUpText('Cast');
if IsUpText('Cast') then
begin
ClickMouse2(true);
Wait( randomrange (10000, 14000));
end;
if FindObjCustom(X, Y, ['Altar'], [8354429], 5) then
begin
TellyHome;
end;
end;
end;

slushpuppy

2012-03-09 00:28:21

I believe you can use pixalshift there are obvious animation changes with your character during the teleportation process

Ashaman88

2012-03-09 00:38:08

You could just identify a dtm or unique color where it teleports to and just have it repeat wait until it finds that dtm/color

Daniel

2012-03-09 03:19:00


procedure WaitUntilTeleported;
begin
while (CountColor(clBlack, MSX1, MSY1, MSX2, MSY2) > ((MSX2 - MSX1) * (MSY2 - MSY1) - 150)) do
Sleep(100);
end;

I hope you get the general idea :) Of course you would have to add some fail-safes in case you aren't actually teleporting, and change the colour if it is different to black. (NOTE: This will only work if RuneScape goes to the black loading screen after you teleport, which I think it does [unless it's changed]).

John

2012-03-09 03:26:01

From: wazzzup
Does anyone know how to make it so my character does nothing if its in the process of home teleporting rather than having a hard wait time such as in my script?

I basically need it to click home tele once and do nothing until its home. having a wait time makes it really slow :/

have it in tags

wazzzup

2012-03-09 04:30:31

Thanks guys It does help a bit, I will continue to do some testing, seems like the best bet would be to use a DTM of the blue aura around the character to recognize that I am doing a home teleport.

bam92992

2012-03-10 01:30:25

From: wazzzup
Thanks guys It does help a bit, I will continue to do some testing, seems like the best bet would be to use a DTM of the blue aura around the character to recognize that I am doing a home teleport.
doesnt the aura move constantly though?

Flight

2012-03-10 01:34:31

I would just do something like make it wait until the bank symbol is found on the MM.

Just think of how you could determine it normally. When you've teleported your surrounding has changed completely, yes? You know what the destination area will look like before you arrive, so when you do you know the teleport was successful. MM symbols, building colors, things like that.

wazzzup

2012-03-12 02:55:20

I got the right idea but its not compiling
How do I wait an indefinite amount of time until FindObjCustom returns true? does anyone know what the code would look like?
begin
ClickMouse2(true);
Wait( randomrange (9000, 14000));
until
FindObjCustom(X, Y, ['Door'], [8354429], 5, true)
end;