Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #debuglevel 5
- goto move.end
- move.retry:
- math move.retry add 1
- if %move.retry > 3 then goto move.fail
- echo ***
- echo *** Retrying move to $1 $2 in %move.retry second(s).
- echo ***
- pause %move.retry
- goto move.goto
- move:
- var move.skip 0
- var move.retry 0
- var move.fail 0
- var move.room $0
- move.goto:
- matchre move.return ^YOU HAVE ARRIVED
- matchre move.skip ^SHOP CLOSED
- matchre move.retry ^MOVE FAILED
- matchre move.fail ^DESTINATION NOT FOUND
- put #goto %move.room
- matchwait
- move.fail:
- var move.fail 1
- goto move.return
- move.skip:
- var move.skip 1
- move.return:
- pause 0.1
- pause 0.1
- return
- walk:
- var alsohere no
- var People.Room empty
- var critter no
- var todo $0
- var move.direction $0
- move1:
- var location moving
- moving:
- matchre stand.then.move ^You must be standing to do that\.|^You can't do that while lying down\.|^Stand up first\.|You can't do that while kneeling\.
- matchre pause.then.move %retry.command.triggers|You are too tired|All this climbing back and forth is getting a bit tiresome|^You work against the current
- matchre retreat.from.melee.then.move ^You are engaged to .+ melee range\!|^You try to move, but you're engaged\.|^While in combat\?|^You can't do that
- matchre retreat.from.pole.then.move ^You are engaged to .+ at pole weapon range\!|^While in combat\?|You'll have better luck if you first retreat\.
- matchre Dig.then.move ^You struggle forward
- matchre Dig.then.move ^Like a blind, lame duck, you wallow in the mud
- matchre Dig.then.move ^The mud holds you tightly
- matchre Dig.then.move ^You find yourself stuck in the mud
- matchre stow.then.move ^Free up your hands first
- matchre walk.return ^Obvious|It's pitch dark and you can't see a thing
- matchre move.error ^You can't go there\.|^You can't swim in that direction\.
- put %move.direction
- GOTO retry
- stand.then.move:
- gosub stand
- goto moving
- pause.then.move:
- pause .2
- goto moving
- retreat.from.melee.then.move:
- put retreat
- retreat.from.pole.then.move:
- gosub stand
- put retreat
- goto moving
- move.error:
- echo * Bad move direction, will try next command in 1 second. *
- put .alert
- pause
- return
- walk.return:
- pause 0.1
- return
- Dig.then.move:
- pause .1
- put dig %move.direction
- pause .5
- pause .5
- goto moving
- stow.then.move:
- GOSUB stow
- goto moving
- moveRandomDirection:
- if $east then
- {
- put east
- return
- }
- if $north then
- {
- put north
- return
- }
- if $northeast then
- {
- put northeast
- return
- }
- if $southeast then
- {
- put southeast
- return
- }
- if $south then
- {
- put south
- return
- }
- if $southwest then
- {
- put southwest
- return
- }
- if $west then
- {
- put west
- return
- }
- if $northwest then
- {
- put northwest
- return
- }
- if $out then
- {
- put out
- return
- }
- if $up then
- {
- put up
- return
- }
- if $down then
- {
- put down
- return
- }
- echo no random direction possible? looking to attempt to reset room exit vars
- #might need a counter here to prevent infinite loops
- put look
- waitforre ^Obvious
- pause
- goto moveRandomDirection
- move.end:
Advertisement
Add Comment
Please, Sign In to add comment