Tiny Script
Can you ruby folks check out this script and let me know if it will work?
Goal:
- Ensure that character is standing up.
- If not standing up, then attempt to stand. Repeat as necessary until character is standing.
- If character is standing, then aim for the head, go to offensive stance, then ambush (note, this script assumes that the character is hidden, but I would prefer to take the assumption out of the equation). In other words, what if the character wasn't hidden and I had to stand. I would like to hide before I go through the ambush routine.
- Wait for the ambush RT to expire, then go to Defensive Stance.
- Check to see if the character is hidden. If not, then attempt to hide a maximum of three times. If not hidden after three attempts, give up trying to hide.
- End the script
Code:
waitrt?
if !standing?
waitrt?
fput "stand"
waitrt?
else
multifput "aim head", "stance off", "ambush"
waitrt?
fput "stance def"
3.times do
if !hidden?
waitrt?
fput "hide"
waitrt?
end
end
end
Do you think it would be better to break these individual "checks" (i.e., check standing, check hidden) into their own separate routines? If so, can you help me with breaking them out?
I plan to make a script for each body part that can be ambushed. This particular one will be called ambushHead.lic. The alias in StormFront will be /x;ambushHead/r. I'll assign this alias to a Macro, then map the macro to one of the key bindings on my Nostromo Keypad.
Thanks for your help.
A Vvrael witch shudders, her form suddenly contracting convulsively.
The ground beneath your feet suddenly frosts and rumbles violently!
[SMR result: 93 (Open d100: -32, Bonus: 61)]
You dodge out of the way!
!SPR>sta
...wait 4 seconds.
!SPR>
Icy stalagmites burst from the ground beneath you!
[SMR result: 213 (Open d100: 88, Bonus: 61)]
... 55 points of damage!
Incredible strike pierces your heart and runs you clean through!
It seems you have died, my friend.