Cast Facing (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
(Created page with 'Category:Scripts This script determines what you are facing and casts your prepped spell on that target. It can handle PCs as well as critters. This script is Stormfront o...')
 
No edit summary
Line 8: Line 8:


<pre>
<pre>
save
setvariable castTarget
tPreamble:
tPreamble:
matchre tLoopCritter /^You \(.*\) are (facing|behind) a /
matchre tLoopCritter /^You \(.*\) are (facing a |behind a )/
matchre tLoopPerson /^You \(.*\) are (facing|behind) /
matchre tLoopPerson /^You \(.*\) are (facing |behind )/
match tNotFacing Encumbrance :
put assess
put assess
put enc
matchwait
matchwait


Line 58: Line 60:


tsp:
tsp:
setvariable castTarget %castTarget%
setvariable castTarget %s%
save
goto tLoop
goto tLoop


tapo:
tapo:
save %s%'
setvariable castTarget %castTarget%'
goto tLoop
goto tLoop


tdash:
tdash:
save %s%-
setvariable castTarget %castTarget%-
goto tLoop
goto tLoop


tA:
tA:
save %s%a
setvariable castTarget %castTarget%a
goto tLoop
goto tLoop


tB:
tB:
save %s%b
setvariable castTarget %castTarget%b
goto tLoop
goto tLoop


tC:
tC:
save %s%c
setvariable castTarget %castTarget%c
goto tLoop
goto tLoop


tD:
tD:
save %s%d
setvariable castTarget %castTarget%d
goto tLoop
goto tLoop


tE:
tE:
save %s%e
setvariable castTarget %castTarget%e
goto tLoop
goto tLoop


tF:
tF:
save %s%f
setvariable castTarget %castTarget%f
goto tLoop
goto tLoop


tG:
tG:
save %s%g
setvariable castTarget %castTarget%g
goto tLoop
goto tLoop


tH:
tH:
save %s%h
setvariable castTarget %castTarget%h
goto tLoop
goto tLoop


tI:
tI:
save %s%i
setvariable castTarget %castTarget%i
goto tLoop
goto tLoop


tJ:
tJ:
save %s%j
setvariable castTarget %castTarget%j
goto tLoop
goto tLoop


tK:
tK:
save %s%k
setvariable castTarget %castTarget%k
goto tLoop
goto tLoop


tL:
tL:
save %s%l
setvariable castTarget %castTarget%l
goto tLoop
goto tLoop


tM:
tM:
save %s%m
setvariable castTarget %castTarget%m
goto tLoop
goto tLoop


tN:
tN:
save %s%n
setvariable castTarget %castTarget%n
goto tLoop
goto tLoop


tO:
tO:
save %s%o
setvariable castTarget %castTarget%o
goto tLoop
goto tLoop


tP:
tP:
save %s%p
setvariable castTarget %castTarget%p
goto tLoop
goto tLoop


tQ:
tQ:
save %s%q
setvariable castTarget %castTarget%q
goto tLoop
goto tLoop


tR:
tR:
save %s%r
setvariable castTarget %castTarget%r
goto tLoop
goto tLoop


tS:
tS:
save %s%s
setvariable castTarget %castTarget%s
goto tLoop
goto tLoop


tT:
tT:
save %s%t
setvariable castTarget %castTarget%t
goto tLoop
goto tLoop


tU:
tU:
save %s%u
setvariable castTarget %castTarget%u
goto tLoop
goto tLoop


tV:
tV:
save %s%v
setvariable castTarget %castTarget%v
goto tLoop
goto tLoop


tW:
tW:
save %s%w
setvariable castTarget %castTarget%w
goto tLoop
goto tLoop


tX:
tX:
save %s%x
setvariable castTarget %castTarget%x
goto tLoop
goto tLoop


tY:
tY:
save %s%y
setvariable castTarget %castTarget%y
goto tLoop
goto tLoop


tZ:
tZ:
save %s%z
setvariable castTarget %castTarget%z
goto tLoop
goto tLoop


tparens:
tparens:
echo %s%
matchre tTenth /^10/
matchre tTenth /^10/
matchre tNinth /^9/
matchre tNinth /^9/
Line 216: Line 220:
setvariable castTarget tenth %castTarget%
setvariable castTarget tenth %castTarget%
goto tEnd
goto tEnd
tNotFacing:

echo You are not facing anything!

exit
tEnd:
tEnd:
put cast %castTarget%
put cast %castTarget%

Revision as of 08:26, 18 March 2009


This script determines what you are facing and casts your prepped spell on that target.

It can handle PCs as well as critters.

This script is Stormfront only.

save 
tPreamble:
matchre tLoopCritter /^You \(.*\) are (facing a |behind a )/
matchre tLoopPerson /^You \(.*\) are (facing |behind )/
match tNotFacing Encumbrance :
put assess
put enc
matchwait

tLoopPerson:
setvariable tokenEnd tEnd
goto tLoop

tLoopCritter:
setvariable tokenEnd tsp
goto tLoop


tLoop:
matchre tA /^A/i
matchre tB /^B/i
matchre tC /^C/i
matchre tD /^D/i
matchre tE /^E/i
matchre tF /^F/i
matchre tG /^G/i
matchre tH /^H/i
matchre tI /^I/i
matchre tJ /^J/i
matchre tK /^K/i
matchre tL /^L/i
matchre tM /^M/i
matchre tN /^N/i
matchre tO /^O/i
matchre tP /^P/i
matchre tQ /^Q/i
matchre tR /^R/i
matchre tS /^S/i
matchre tT /^T/i
matchre tU /^U/i
matchre tV /^V/i
matchre tW /^W/i
matchre tX /^X/i
matchre tY /^Y/i
matchre tZ /^Z/i
matchre %tokenEnd% /^\s/
matchre tapo /^'/
matchre tdash /^-/
matchre tparens /^\(/
matchwait

tsp:
setvariable castTarget %s%
save 
goto tLoop

tapo:
save %s%'
goto tLoop

tdash:
save %s%-
goto tLoop

tA:
save %s%a
goto tLoop

tB:
save %s%b
goto tLoop

tC:
save %s%c
goto tLoop

tD:
save %s%d
goto tLoop

tE:
save %s%e
goto tLoop

tF:
save %s%f
goto tLoop

tG:
save %s%g
goto tLoop

tH:
save %s%h
goto tLoop

tI:
save %s%i
goto tLoop

tJ:
save %s%j
goto tLoop

tK:
save %s%k
goto tLoop

tL:
save %s%l
goto tLoop

tM:
save %s%m
goto tLoop

tN:
save %s%n
goto tLoop

tO:
save %s%o
goto tLoop

tP:
save %s%p
goto tLoop

tQ:
save %s%q
goto tLoop

tR:
save %s%r
goto tLoop

tS:
save %s%s
goto tLoop

tT:
save %s%t
goto tLoop

tU:
save %s%u
goto tLoop

tV:
save %s%v
goto tLoop

tW:
save %s%w
goto tLoop

tX:
save %s%x
goto tLoop

tY:
save %s%y
goto tLoop

tZ:
save %s%z
goto tLoop

tparens:
echo %s%
matchre tTenth /^10/
matchre tNinth /^9/
matchre tEighth /^8/
matchre tSeventh /^7/
matchre tSixth /^6/
matchre tFifth /^5/
matchre tFourth /^4/
matchre tThird /^3/
matchre tSecond /^2/
matchre tFirst /^1/
matchwait

tFirst:
setvariable castTarget first %castTarget%
goto tEnd
tSecond:
setvariable castTarget second %castTarget%
goto tEnd
tThird:
setvariable castTarget third %castTarget%
goto tEnd
tFourth:
setvariable castTarget fourth %castTarget%
goto tEnd
tFifth:
setvariable castTarget fifth %castTarget%
goto tEnd
tSixth:
setvariable castTarget sixth %castTarget%
goto tEnd
tSeventh:
setvariable castTarget seventh %castTarget%
goto tEnd
tEighth:
setvariable castTarget eighth %castTarget%
goto tEnd
tNinth:
setvariable castTarget ninth %castTarget%
goto tEnd
tTenth:
setvariable castTarget tenth %castTarget%
goto tEnd
tNotFacing:
echo You are not facing anything!
exit
tEnd:
put cast %castTarget%