PDA

View Full Version : AFK Wraith Hunter script, for archers



Shibbidy Joe
12-08-2004, 12:34 AM
Hunts wraiths under the AI with a bow. Checks for stun, death, and, once I get the messaging, fear. Rests when necessary and gathers treasure and skins, but doens't sell them. Will stance dance (defensive until attacked, then offensive for the return attack, then back to defensive)

Known bugs:
Hangs if stunned when no messaging appears
Trouble gathering arrows
No way to get blessing
No health or encumberance checks


Will work on it some more tomorrow. U2U me or post suggestions.

-Shib

Razorfish
12-08-2004, 02:19 AM
umm where is the script?

Drew
12-08-2004, 02:23 AM
>Will stance dance (defensive until attacked, then offensive for the return attack, then back to defensive) <

If I remember correctly wraiths have 12 seconds of RT, maybe have it fire two shots?

Shibbidy Joe
12-08-2004, 09:17 AM
Thought I had the script attached. Anyway, here it is:

#wraith hunter
counter set 0
#get bow and go stance defensive
start:
put remove my yumi
match getBow Remove what?
match getBow You aren't wearing
match getBow I could not

waitforBow:
match gotBow You sling a
match gotBow You remove a
match gotBow You already
matchwait

getBow:
put get my yumi
match gotBow You remove a
match gotBow You already
match noBow I could not find
match noBow Get what?
matchwait

noBow:
echo
echo
echo Get out your bow.
echo
echo
goto waitforBow

gotBow:
put stance def
waitfor You are now
goto whereami

#find out where I am

whereami:
match room-2 [Abandoned Inn, Larder]
match room-1 [Abandoned Inn, Workshop]
match restArea [Abandoned Inn, Magical Workshop]
match room0 Rusty-bladed scythes
match room1 Old timbers shore
match room2 Thick wooden timbers
match room3 A metal and wood cage
match room4 Pots, pans, and
match room5 A scuffed and dented
match room6 A multitude of small
match room7 Wooden planks marked
match room8 The remains of a
match room9 Rudimentary animal pens
match room10 Several tall bolts
match room11 The broken remnants
match room12 Guarding this room
match room13 A small wooden table
match room14 A single die
match room15 The planks of wood
match room16 Nearly hidden in
match room17 The darkness in this
match room18 Although the air is still
match room19 A large pile of
match room20 The air is completely
match room21 A single lantern hangs
put l
matchwait

#if I'm between the rest area and the hunt area, go to hunt area
room-2:
move s
goto room0

room-1:
move e
move s
goto room0

#if I'm in the rest area, check exp
restArea:
put exp
match moveHunt bell
match restmore Your mind
match dead You are a ghost!
matchwait

moveHunt:
put open trap
waitfor You open
move go trap
move e
move s
goto room0

#still absorbing exp. wait 5 min, then check again
restMore:
counter set 99
pause 120
goto restArea


### HUNTING ###

#if in room0 (never any critters here) move to room1
room0:
echo In room %c
pause .5
move go paint
goto room1
#if in room2-22 save move and checkRoom
room1:
echo In room %c
pause .5
counter set 2
put se
goto checkRoom
room2:
echo In room %c
pause .5
counter set 3
put sw
goto checkRoom
room3:
echo In room %c
pause .5
counter set 4
put e
goto checkRoom
room4:
echo In room %c
pause .5
counter set 5
put e
goto checkRoom
room5:
echo In room %c
pause .5
counter set 6
put s
goto checkRoom
room6:
echo In room %c
pause .5
counter set 7
put w
goto checkRoom
room7:
echo In room %c
pause .5
counter set 8
put w
goto checkRoom
room8:
echo In room %c
pause .5
counter set 9
put s
goto checkRoom
room9:
echo In room %c
pause .5
counter set 10
put e
goto checkRoom
room10:
echo In room %c
pause .5
counter set 11
put e
goto checkRoom
room11:
echo In room %c
pause .5
counter set 12
put s
goto checkRoom
room12:
echo In room %c
pause .5
counter set 13
put w
goto checkRoom
room13:
echo In room %c
pause .5
counter set 14
put se
goto checkRoom
room14:
echo In room %c
pause .5
counter set 15
put e
goto checkRoom
room15:
echo In room %c
pause .5
counter set 16
put s
goto checkRoom
room16:
echo In room %c
pause .5
counter set 17
put w
goto checkRoom
room17:
echo In room %c
pause .5
counter set 18
put se
goto checkRoom
room18:
echo In room %c
pause .5
counter set 19
put sw
goto checkRoom
room19:
echo In room %c
pause .5
counter set 20
put e
goto checkRoom
room20:
echo In room %c
pause .5
counter set 21
put ne
goto checkRoom
room21:
echo In room %c
pause .5
counter set 22
put nw
goto checkRoom
room22:
echo In room %c
pause .5
counter set 23
put n
goto checkRoom
room23:
echo In room %c
pause .5
counter set 24
put nw
goto checkRoom
room24:
echo In room %c
pause .5
counter set 25
put n
goto checkRoom
room25:
echo In room %c
pause .5
counter set 26
put n
goto checkRoom
room26:
echo In room %c
pause .5
counter set 27
put n
goto checkRoom
room27:
echo In room %c
pause .5
counter set 28
put nw
goto checkRoom
room28:
echo In room %c
pause .5
counter set 29
put nw
goto checkRoom
room29:
echo In room %c
pause .5
counter set 1
goto room%c

#check Exp. if must rest, go to rest area. Otherwise, keep hunting
checkExp:
match leaveRoom%c must rest!
match room%c Your mind is
put exp
matchwait

moveRest:
move o
move n
move w
reSearch:
match goTrap trapdoor
match reSearch nothing of interest
put sear
matchwait
goTrap:
put open trap
waitfor You open
move go trap
goto restMore


#if someone or another critter is in room, or room is empty, go to next room;
reCheckRoom:
put l
checkRoom:
match room%c Also here:
match skinWra a wraith that appears dead
match room%c giant marmot
match room%c dark orc
match getTalon a wraith talon
match foundWraith a wraith
match whereami Sorry, you may only type ahead
match whereami You can't go there
match whereami I could not find what
match stunned You are still stunned
match dead You are a ghost
match room%c Obvious exits:
match room%c Obvious paths:
matchwait

#make sure there's only one wraith
foundWraith:
put l other wraith
match room%c You see a fairly typical
match getArrow I could not find
matchwait

#get and stow the talon
#(can't match to a wraith with a wraith talon in the way)
getTalon:
put get tal
match stunned You are still stunned
match dead You are a ghost
match stowTal You pick up
matchwait
stowTal:
put stow tal
waitfor You put a
goto reCheckRoom


#go defensive get an arrow
getArrow:
put stance def
waitfor You are now in
put get 1 my arr
match checkWraith You remove a
match checkWraith You already have that
match noArrows Get what?
match stunned You are still stunned
match dead You are a ghost
matchwait

noArrows:
echo
echo
echo Out of arrows
echo
echo
goto leaveRoom%c

checkWraith:
put l wra
match room%c I could not find
match skinWra dead
match waitforAttack You see a
matchwait

waitforAttack:
match shootWra A wraith gestures at you!
match shootWra A wraith swings a
match shootWra A wraith draws inward
match room%c burning red eyes
match reCheckRoom moving
match reCheckRoom arrived
matchwait

shootWra:
put stance off
waitfor You are now in an
put fire wra
match pauseatt ...wait
match pauseatt Wait
match pauseatt Please wait
match pauseatt Sorry, you may only type ahead
match skinWra A little bit
match skinWra motionless
match skinWra goes still
match stunned You are still stunned.
match dead You are a ghost!
match reCheckRoom flies harmlessly through!
match reCheckRoom The wooden arrow
match room%c I could not find
match room%c What were you referring to?
matchwait

pauseatt:
pause 1
goto getArrow


skinWra:
pause 1
put get my dag
waitfor You
put skin wra
match skinned You skinned
match getArrow You might want
match searchWra You botched
match searchWra You can only skin creatures!
match searchWra been skinned.
match searchWra You can only skin creatures!
match searchWra What were you referring to?
match skinWra ...wait
match skinWra Wait
match skinWra Please wait
match skinWra Sorry, you may only type ahead
matchwait

skinned:
put stow my dag
waitfor You
put get tal
waitfor You pick up
put stow tal
waitfor You put a
goto searchWra

searchWra:
put stow my dag
waitfor You
match stowLoot zircon
match stowLoot topaz
match stowLoot wand
match stowLoot gold ring
match stowLoot mother-of-pearl
match stowLoot coral
match stowLoot shell
match stowLoot garnet
match stowLoot shell
match stowLoot stone
match stowLoot sapphire
match stowLoot lapis
match stowLoot pearl
match stowLoot ruby
match stowLoot quartz
match stowLoot amethyst
match stowLoot tourmaline
match stowLoot opal
match stowLoot jade
match stowLoot diamond
match stowLoot You pick up a
match gatherArrows I could not find what you were referring to.
match gatherArrows turns to dust
put search wra
matchwait

stowLoot:
put stow r
waitfor You
goto gatherArrows

gatherArrows:
pause 1
match stowArrows You add a
match stowArrows You bundle some
match stowArrows You pick up the
match dropArrows You cannot bundle
match dropArrows You can't seem to find
match dropArrows You see nothing
match reCheckRoom You may only gather
match gatherArrows out of your reach
put gath arr
matchwait

stowArrows:
match stowArrows You add a
match stowArrows You bundle some
match dropArrows You cannot bundle
match dropArrows You can't seem to find
match dropArrows You see nothing
match dropArrows I could not find
put my arr in my arr in my pack
matchwait

dropArrows:
put drop my arr
waitfor You
goto reCheckRoom

stunned:
match unstunned You are able to move again
match dead favor
matchwait

unstunned:
put stance def
waitfor You are now in a
goto reCheckRoom

dead:
counter set 5
dead4:
dead3:
dead2:
dead1:
echo
echo
echo You are dead. Exiting game in %c second(s).
echo (push ESC to cancel)
echo
echo
counter subtract 1
goto dead%c

dead0:
put quit


#leave the hunting area
leaveroom0:
goto moveRest
leaveroom1:
move se
leaveroom2:
move sw
leaveroom3:
move e
leaveroom4:
move e
leaveroom5:
move s
leaveroom6:
move w
leaveroom7:
move w
leaveroom8:
move s
leaveroom9:
move e
leaveroom10:
move e
leaveroom11:
move s
leaveroom12:
move w
leaveroom13:
move se
leaveroom14:
move e
leaveroom15:
move s
leaveroom16:
move w
leaveroom17:
move se
leaveroom18:
move sw
leaveroom19:
move e
leaveroom20:
move ne
leaveroom21:
move nw
leaveroom22:
move n
leaveroom23:
move nw
leaveroom24:
move n
leaveroom25:
move n
leaveroom26:
move n
leaveroom27:
move nw
leaveroom28:
move nw
leaveroom29:
move o
goto leaveroom0
exit


-Shib
ps. my rt with a longbow is 7 seconds. Not enough time to get in two shots. Also, this script fires a yumi. I'll change it to fire the %bow variable when I next edit it. Can be started from any room in the wraith hunting area, in front of the hideous painting, or from the magic workshop nearby (where it rests).

Shibbidy Joe
12-17-2004, 12:43 AM
Fixed some stuff.
If the attachment works, great. Otherwise, here's the code:


#wraith hunter
counter set 0
#get bow and go stance defensive
start:
put remove my %bow
match getBow Remove what?
match getBow You aren't wearing
match getBow I could not
matchwait

waitforBow:
match gotBow You sling a
match gotBow You remove a
match gotBow You already
matchwait

getBow:
put get my %bow
match gotBow You remove a
match gotBow You already
match noBow I could not find
match noBow Get what?
matchwait

noBow:
echo
echo
echo Get out your bow.
echo
echo
goto waitforBow

gotBow:
put stance def
waitfor You are now
goto whereami

#find out where I am

whereami:
match room-2 [Abandoned Inn, Larder]
match room-1 [Abandoned Inn, Workshop]
match restArea [Abandoned Inn, Magical Workshop]
match room0 Rusty-bladed scythes
match room1 Old timbers shore
match room2 Thick wooden timbers
match room3 A metal and wood cage
match room4 Pots, pans, and
match room5 A scuffed and dented
match room6 A multitude of small
match room7 Wooden planks marked
match room8 The remains of a
match room9 Rudimentary animal pens
match room10 Several tall bolts
match room11 The broken remnants
match room12 Guarding this room
match room13 A small wooden table
match room14 A single die
match room15 The planks of wood
match room16 Nearly hidden in
match room17 The darkness in this
match room18 Although the air is still
match room19 A large pile of
match room20 The air is completely
match room21 A single lantern hangs
put l
matchwait

#if I'm between the rest area and the hunt area, go to hunt area
room-2:
move s
goto room0

room-1:
move e
move s
goto room0

#if I'm in the rest area, check exp
restArea:
put exp
match moveHunt bell
match restmore Your mind
match dead You are a ghost!
matchwait

moveHunt:
put open trap
waitfor You open
move go trap
move e
move s
goto room0

#still absorbing exp. wait 5 min, then check again
restMore:
counter set 99
pause 120
goto restArea


### HUNTING ###

#if in room0 (never any critters here) move to room1
room0:
pause .5
move go paint
goto room1
#if in room2-22 save move and checkRoom
room1:
pause .5
counter set 2
put se
goto checkRoom
room2:
pause .5
counter set 3
put sw
goto checkRoom
room3:
pause .5
counter set 4
put e
goto checkRoom
room4:
pause .5
counter set 5
put e
goto checkRoom
room5:
pause .5
counter set 6
put s
goto checkRoom
room6:
pause .5
counter set 7
put w
goto checkRoom
room7:
pause .5
counter set 8
put w
goto checkRoom
room8:
pause .5
counter set 9
put s
goto checkRoom
room9:
pause .5
counter set 10
put e
goto checkRoom
room10:
pause .5
counter set 11
put e
goto checkRoom
room11:
pause .5
counter set 12
put s
goto checkRoom
room12:
pause .5
counter set 13
put w
goto checkRoom
room13:
pause .5
counter set 14
put se
goto checkRoom
room14:
pause .5
counter set 15
put e
goto checkRoom
room15:
pause .5
counter set 16
put s
goto checkRoom
room16:
pause .5
counter set 17
put w
goto checkRoom
room17:
pause .5
counter set 18
put se
goto checkRoom
room18:
pause .5
counter set 19
put sw
goto checkRoom
room19:
pause .5
counter set 20
put e
goto checkRoom
room20:
pause .5
counter set 21
put ne
goto checkRoom
room21:
pause .5
counter set 22
put nw
goto checkRoom
room22:
pause .5
counter set 23
put n
goto checkRoom
room23:
pause .5
counter set 24
put nw
goto checkRoom
room24:
pause .5
counter set 25
put n
goto checkRoom
room25:
pause .5
counter set 26
put n
goto checkRoom
room26:
pause .5
counter set 27
put n
goto checkRoom
room27:
pause .5
counter set 28
put nw
goto checkRoom
room28:
pause .5
counter set 29
put nw
goto checkRoom
room29:
pause .5
counter set 1
goto room%c

#check Exp. if must rest, go to rest area. Otherwise, keep hunting
checkExp:
match leaveRoom%c must rest!
match justCheckRoom Your mind is
match dead dead
match dead ghost
put exp
matchwait

moveRest:
move o
move n
move w
reSearch:
match goTrap trapdoor
match reSearch nothing of interest
put sear
matchwait
goTrap:
put open trap
waitfor You open
move go trap
goto restMore


#if someone or another critter is in room, or room is empty, go to next room;
reCheckRoom:
put stance def
waitfor You
justCheckRoom:
put l
checkRoom:
match stand You will have to
match room%c Also here:
match skinWra a wraith that appears dead
match room%c giant marmot
match room%c dark orc
match getTalon a wraith talon
match foundWraith a wraith
match whereami Sorry, you may only type ahead
match whereami You can't go there
match whereami I could not find what
match stunned You are still stunned
match dead You are a ghost
match room%c Obvious exits:
match room%c Obvious paths:
matchwait

stand:
pause 1
put stand
match reCheckRoom already standing
match reCheckRoom stand back up
match stunned still stunned
match stand ...wait
match stand Wait
match stand Please wait
matchwait

#make sure there's only one wraith
foundWraith:
put l other wraith
match room%c You see a fairly typical
match getArrow I could not find
matchwait

#get and stow the talon
#(can't match to a wraith with a wraith talon in the way)
getTalon:
put get tal
waitfor You
put stow tal
waitfor You
goto reCheckRoom


#get an arrow
getArrow:
put get 1 my arr
match checkWraith You remove a
match checkWraith You already have that
match noArrows Get what?
match stunned You are still stunned
match dead You are a ghost
matchwait

#if out of arrows, leave the hunting area.
noArrows:
echo
echo
echo Out of arrows
echo
echo
goto leaveRoom%c

#make sure there's still a wraith there
checkWraith:
put l wra
match skinWra It is dead
match room%c I could not find
match waitforAttack You see a
match skinWra dust
matchwait

#wait for wraith to attack (or do something that incurs roundtime), then shoot.
#make sure wraith doesn't move, no one/thing arrives, and return if scared away
waitforAttack:
match shootWra A wraith gestures at you!
match shootWra A wraith swings a
match shootWra A wraith draws inward
match shootWra A wraith stands
match room%c burning red eyes
match boltNE bolt northeast
match boltNW bolt northwest
match boltSE bolt southeast
match boltSW bolt southwest
match boltS bolt south
match boltE bolt east
match boltW bolt west
match boltN bolt north
match reCheckRoom moving
match reCheckRoom arrive
match reCheckRoom waddling in
matchwait

boltNW:
move se
goto reCheckRoom
boltSW:
move ne
goto reCheckRoom
boltNE:
move sw
goto reCheckRoom
boltSE:
move nw
goto reCheckRoom
boltN:
move s
goto reCheckRoom
boltS:
move n
goto reCheckRoom
boltE:
move w
goto reCheckRoom
boltW:
move e
goto reCheckRoom


#Go offensive, but wait for [You] instead of [You are now in a defensive stance],
#because it will still match if stunned, so script won't freeze.

#fire at wraith.
shootWra:
put stance off
waitfor You
put fire wra
match pauseatt ...wait
match pauseatt Wait
match pauseatt Please wait
match pauseatt Sorry, you may only type ahead
match skinWra A little bit
match skinWra motionless
match skinWra goes still
match stunned You are still stunned.
match dead You are a ghost!
match needBless flies harmlessly through!
match reCheckRoom The wooden arrow
match tooInjured too injured to fire
match room%c I could not find
match room%c What were you referring to?
matchwait

tooInjured:
echo
echo
echo Too injured to fire %bow
echo
echo
goto leaveroom%c

needBless:
echo
echo
echo Arrows need bless
echo
echo
goto leaveroom%c

pauseatt:
pause 1
goto getArrow

skinWra:
put stance def
waitfor You
pause 1
put get my dag
waitfor You
put skin wra
match skinned You skinned
match getArrow You might want
match searchWra You botched
match searchWra been skinned.
match searchWra can only skin creatures!
match searchWra What were you referring to?
match skinWra ...wait
match skinWra Wait
match skinWra Please wait
match skinWra Sorry, you may only type ahead
matchwait

skinned:
put stow my dag
waitfor You
put get tal
waitfor You pick up
put stow tal
waitfor You
goto searchWra

searchWra:
put stow my dag
waitfor You
put search wraith
match stowLoot You pick up a
match gatherArrows dust
match gatherArrows What were you referring to?
match stunnedSearchWra You are still stunned.
matchwait

stunnedSearchWra:
pause 2
goto searchWra

stowLoot:
put stow r
waitfor You
goto gatherArrows

gatherArrows:
pause 1
match stowArrows You add a
match stowArrows You bundle some
match stowArrows You pick up the
match stowArrows You gather
match dropArrows You cannot bundle
match dropArrows You can't seem to find
match dropArrows You see nothing
match checkExp You may only gather
match gatherArrows out of your reach
match stowLoot You need a free hand
match stunnedGatherArrows stunned
put gath arr
matchwait

stunnedGatherArrows:
pause 2
goto gatherArrows

stowArrows:
match checkExp You add a
match checkExp You bundle some
match dropArrows You cannot bundle
match dropArrows You can't seem to find
match dropArrows You see nothing
match dropArrows I could not find
put put my arr in my arr in my pack
matchwait

dropArrows:
put drop my arr
waitfor You
goto checkExp

stunned:
pause 1
put stance def
match dead favor
match stunned You are still stunned
match reCheckRoom You are now in a
matchwait

dead:
counter set 5
dead4:
dead3:
dead2:
dead1:
echo
echo
echo You are dead. Exiting game in %c second(s).
echo (push ESC to cancel)
echo
echo
counter subtract 1
goto dead%c

dead0:
put quit


#leave the hunting area
leaveroom0:
goto moveRest
leaveroom1:
move se
leaveroom2:
move sw
leaveroom3:
move e
leaveroom4:
move e
leaveroom5:
move s
leaveroom6:
move w
leaveroom7:
move w
leaveroom8:
move s
leaveroom9:
move e
leaveroom10:
move e
leaveroom11:
move s
leaveroom12:
move w
leaveroom13:
move se
leaveroom14:
move e
leaveroom15:
move s
leaveroom16:
move w
leaveroom17:
move se
leaveroom18:
move sw
leaveroom19:
move e
leaveroom20:
move ne
leaveroom21:
move nw
leaveroom22:
move n
leaveroom23:
move nw
leaveroom24:
move n
leaveroom25:
move n
leaveroom26:
move n
leaveroom27:
move nw
leaveroom28:
move nw
leaveroom29:
goto leaveroom0
exit


-Shib
If anyone tries this, post and/or u2u bugs. (if possible, include a log of what you were doing at the time)