SRL Archive - OSR Help

Speed of a goblin


bbri06

2010-11-18 23:57:18

If someone can get me the closest to exact number of tiles that a goblin in Lumbridge moves in a certain time I will be forever grateful! I think I might be able to figure out how to do this, but I'm also limited on time. This may seem like a strange request, but if you can help at all that would be fantastic.

Edit: I thought I actually remembered that there used to be a reflection hook or something for speed of an npc.

i luffs yeww

2010-11-19 00:02:24

GetSpeed I think.

bbri06

2010-11-19 00:05:21

That returns the player's character's speed. Thats actually the reflection one I was thinking of though. Guess there isn't a reflection hook for what I want :(

i luffs yeww

2010-11-19 00:21:52

Well why do you need to know anyway? :p I can tell you now it's not fast enough to make a difference usually. Just have a simple uptext/ChooseOption failsafe or something?

bbri06

2010-11-19 00:48:10

Reflection is a little slow for monster finding and also checking uptext, and it seemed like a fun challenge :P

Cstrike

2010-11-19 00:51:29

One idea could be using SetAngle(false); and trying it then? Don't know if that'd help.

bbri06

2010-11-19 00:52:46

I think I'm going to set the angle like that and then check the tile that a monster is at multiple times over a certain time period using a script.

Edit: Bleh. Nevermind you're right. All that math for nothing :redface:

Narcle

2010-11-19 01:05:50

I was actually trying to calculation NPCs speed and I think they are all the same. They move 1 tile in one tick, a tick is 600-615ms depending on the population of the server as it lags.

bbri06

2010-11-19 01:11:27

That's pretty funny actually because I happened to guess that they move 1.6 tiles in a second.

TomTuff

2010-11-19 01:12:06

From: Narcle
I was actually trying to calculation NPCs speed and I think they are all the same. They move 1 tile in one tick, a tick is 600-615ms depending on the population of the server as it lags.


I've done some timing (At least, the best i could by hand), and this is what i've noticed holds true for all NPCs (maybe not flying monsters, now that i think about it). I've noticed the same number also come's through for running. Running 1 tile takes 1/2 a tick. However If you only move 1 tile while run is active, it still takes a full tick since the entire game is based on the tick timing setup. In addition, let's say you run a number of tiles that is >2 and odd. The last odd tile (so if you ran 21 tiles, between the 20th and 21st tile) would still take a full tick, while tiles 1-20 would take 10 ticks.