SRL Archive - OSR Help

Does SRL have a character moving check...


grats

2012-07-11 02:01:10

For if the cape is moving? Or something like that? The character is standing still but his cape is waving in the air and he has stuff going to his hands every second or so. I believe the stuff we have just checks if they are actually walking/running

thanks

YoHoJo

2012-07-11 02:02:46

Make own using PixelShift stuff.
None for that as far as I know built into SRL.

grats

2012-07-11 02:04:25

From: YoHoJo
Make own using PixelShift stuff.
None for that as far as I know built into SRL.


We got absolutely no idea about that, pixelshift is way over my head B)

does it do everything on its own almost?

can be we like

clicks monster
wait's 500ms
checks pixel
waits 500ms
if pixels change here, returns true


does it work like that?

I found it, reading the stuff atm

YoHoJo

2012-07-11 02:08:17

Oh ya don't?
I THINK Flight made a tut, I don't recall 100% but it's pretty easy.

There is one nice for debugging, use that to see how many pixels move every ms.
Use that + writeln to see what numbers work best.
Find a good amount/average/time/shift etc (quite easy).

Then you just use the checker one and if it results true, then ya :p?

Check out the include it's really made quite easy thanks to the creator! Marpis I think?

grats

2012-07-11 02:11:45

Yea really rusty was helpin someone lol

I think we got it pretty decent

Sin

2012-07-11 02:12:10

IsMoving;

Frement

2012-07-11 02:20:30

From: Shay
IsMoving;


Doesn't that function check the minimap?

grats

2012-07-11 02:24:46

http://villavu.com/forum/showthread.php?t=74090

if anyone needs help or such

thanks again yoho

Flight

2012-07-11 02:34:50

Yeah this would need to be made unique to your player as there are a number of factors that would give you different 'shift counts', including your clothes/armor/weapons/area surrounding the player/players & NPCs walking very close to you.

From: Shay
IsMoving;


IsMoving checks a 60x60 box surrounding the center of you minimap for pixelshift; this is literally for walking & running, not animation.

grats

2012-07-11 02:37:14

From: Flight
Yeah this would need to be made unique to your player as there are a number of factors that would give you different 'shift counts', including your clothes/armor/weapons/area surrounding the player/players & NPCs walking very close to you.



IsMoving checks a 60x60 box surrounding the center of you minimap for pixelshift; this is literally for walking & running, not animation.


Really?
basically his script is using 30 second and sometimes 60 second waits, while the character does as I said.. so I figured instead of standing there doing nothing for like 20 seconds timetimes, it can click the next monster right after, you know?

I don't really know what's going on in the game, as normal.

CephaXz

2012-07-11 04:28:32

You're doing runespan? Sounds like it to me. Maybe you could do exp check and if there's no exp gain then you can click onto the next thing.

grats

2012-07-11 04:53:16

From: CephaXz
You're doing runespan? Sounds like it to me. Maybe you could do exp check and if there's no exp gain then you can click onto the next thing.


Good idea, and yea.. helping someone with it

I really have no idea what goes on, I didn't think about the exp though, I guess it does go up pretty fast :P

YoHoJo

2012-07-11 04:54:36

Yeah, Camo's does it by XP Check and it works just fine, would probably be the best way to do it.

CephaXz

2012-07-11 04:58:18

Even sometimes when you don't get any runes, you still get like 2XP. So I guess 3-5 seconds checks will be good enough.

Noob King

2012-07-12 03:33:17

Depending what you are doing, I like to do it by counting the inventory, waiting, checking again and comparing.

function IsActive: Boolean;
var
Item, C1, C2: integer;
begin

Item := DTMFromString('blahblahblah');

C1 := CountItems('dtm', Item, []);

Wait(2000 + random(500));

C2 := CountItems('dtm', Item, []);

if (C2 > C1)then
Result := True;

FreeDTM(Item);

end;