View Full Version : Movement script
Caluss
05-16-2005, 07:01 AM
Does anyone have a random movement script?
Something tha will look at the obvious exits and then pick a movement path?
Or do I need to make one myself?
Thanks
Latrinsorm
05-16-2005, 12:21 PM
Near as I can figure, you'd need two things: a way to make a random number (not so hard) and a list of every possible arrangement of directions available (probably impossible).
I guess another way would just have it go in a random direction regardless of what paths are available, but that wouldn't be pretty. It would make the random number part much easier though.
Parker
05-16-2005, 12:54 PM
i'm sure it can be done, though there's a lot of people that know scripting a lot better than I do, but can I be nosey and ask why you'd need sometihng like that?
AnticorRifling
05-16-2005, 02:41 PM
You take something like that and put it in a hunting script to make an afk hunter random enough that the GM's don't think your afk. Just an idea...
ElanthianSiren
05-16-2005, 03:17 PM
This is a bit off topic, but I wonder how long before GMs finally just:
1. Disallow connection to GS via any engine that can script.
or
2. Completely allow afk scripting.
I don't afk script, but I think that the war on it is getting kind of silly -- especially with the advent of Kranar's scripting engine.
-Melissa
fallenSaint
05-16-2005, 03:25 PM
Well not that its all that random but you could use a setup like the rat hunter that works the nexus for how it decides what direction to go. Maybe throw two checks in so it varies off multiple randomization rather than just the one.
But even if your going oddball random that to me would still throw a flag since most hunters when at the keyboard do partol in a rather dependable pattern. I know I dont just slap the num pad and see what direction I run.
Latrinsorm
05-16-2005, 05:11 PM
Originally posted by fallenSaint
I know I dont just slap the num pad and see what direction I run. :lol2:
Anyway, I was thinking about it, and another way would be to pick a random direction, then see if it exists in the room. Something like this:
put l
match good %s
match rndgenerate .
matchwait
good:
move %s
goto rndgenerate
Dunno if puncuation can be matched, but that'd be the way I'd do it. The benefit in doing it this way is that you don't have to type in the bajillions of possibilities and you have variable time between movement.
sahra
05-19-2005, 05:05 AM
That's definitely the way to do it: pick first, then test. There are 2047 possibilities given the eight directions plus up and down, and it's just painful to contemplate building that matchtable and the associated code to build a table of valid directions.
In fact, you should probably just do "pick first, then go" (repeat if it says 'You can't go that way.') This avoids doing a sequence of LOOKs at the room, and minimizes the amount of text scrolled up the screen.
To pick a random direction, just choose a random number between 0 and 9 inclusive (for eight cardinal directions, plus up and down). I posted a random number algorithm to the forum in an adjacent thread called 'The impossible script?' (or something like that).
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.