Is there an easy way to get your target into a StormFront script as a variable without having the user enter it on the command line?
Specifcally I am trying to write a thrown weapon script for my handy dandy pike and I don't know how to tell it to pull the weapon out of the creature when lodged without having to enter it on the command line. Which I don't mind doing, it's just ... inelegant, since you might be fighting more than one kind of creature, and restarting the script for each one is lame.
_________________________________
The HeroMachine 3 Alpha is now open
for public testing if you want to
make a portrait of your character --
http://www.heromachine.com
JIHAN
MSLKA
Re: Getting the name of your target in StormFront
08/21/2009 04:22 PM CDT
setvariable pike <pike name> is the command to us in the script.
~Eoworfinia~
Marge, it takes two to lie. One to lie and one to listen. Homer Simpson
Get the facts first and then you can distort them as much as you please. Mark Twain
~Eoworfinia~
Marge, it takes two to lie. One to lie and one to listen. Homer Simpson
Get the facts first and then you can distort them as much as you please. Mark Twain
SMTHSAILN
Re: Getting the name of your target in StormFront
08/21/2009 04:24 PM CDT
<<setvariable pike <pike name> is the command to us in the script.
Not that. He wants to pull the lodged pike from the variable creature without having to specify it in the command line.
-Stayn
Not that. He wants to pull the lodged pike from the variable creature without having to specify it in the command line.
-Stayn
MSLKA
Re: Getting the name of your target in StormFront
08/21/2009 04:31 PM CDT
Yes, I thought he was wanting to do it in the script. That is the command to set it in the script. If I want to be able to change on the fly what weapon to look for, I do something like this:
put glance
match HE bastard sword
match ME scimitar
matchwait
HE:
setvariable weapon bastard sword
ME:
setvariable weapon scimitar
Sorry if I'm not understanding. I don't know if the type of weapon shows up in the look of a critter if lodge in it but that would be a way to match if it does.
~Eoworfinia~
Marge, it takes two to lie. One to lie and one to listen. Homer Simpson
Get the facts first and then you can distort them as much as you please. Mark Twain
put glance
match HE bastard sword
match ME scimitar
matchwait
HE:
setvariable weapon bastard sword
ME:
setvariable weapon scimitar
Sorry if I'm not understanding. I don't know if the type of weapon shows up in the look of a critter if lodge in it but that would be a way to match if it does.
~Eoworfinia~
Marge, it takes two to lie. One to lie and one to listen. Homer Simpson
Get the facts first and then you can distort them as much as you please. Mark Twain
SMTHSAILN
Re: Getting the name of your target in StormFront
08/21/2009 04:35 PM CDT
<<Sorry if I'm not understanding.
It's not the weapon that is dynamic/changing it is the critter he is lodging it into. :)
-Stayn
It's not the weapon that is dynamic/changing it is the critter he is lodging it into. :)
-Stayn
SMTHSAILN
Re: Getting the name of your target in StormFront
08/21/2009 04:45 PM CDT
Hmm, I just tried to see if I could be generic. Nope. So for SF all I can think of is this match table...
match setfrog heggarangi frog
match setwolf blood wolf
match ...
match ...
match ..
put assess
matchwait
setfrog:
setvariable creature frog
goto getweap
setwolf:
setvariable creature wolf
goto getweap
.....................
Of course I don't know which wolf/frog it would select if you don't supply an ordinal number, I suppose the one your facing.
-Stayn
match setfrog heggarangi frog
match setwolf blood wolf
match ...
match ...
match ..
put assess
matchwait
setfrog:
setvariable creature frog
goto getweap
setwolf:
setvariable creature wolf
goto getweap
.....................
Of course I don't know which wolf/frog it would select if you don't supply an ordinal number, I suppose the one your facing.
-Stayn
MSLKA
Re: Getting the name of your target in StormFront
08/21/2009 04:50 PM CDT
Oh duh! Where is the hair dye, I think my grey is showing.
I've always done a %1 %2 %3 %4 %5 at the start of the script to set the critters I'm hunting.
So, it's not auto but does hold the critters that come into the area you are hunting till you start the script over.
start:
if_1 goto critterset
critterset:
setvariable critter1 %1
setvariable critter2 %2
ect
Not sure that helps but it is a way to hold the variable till you change hunting areas.
~Eoworfinia~
Marge, it takes two to lie. One to lie and one to listen. Homer Simpson
Get the facts first and then you can distort them as much as you please. Mark Twain
I've always done a %1 %2 %3 %4 %5 at the start of the script to set the critters I'm hunting.
So, it's not auto but does hold the critters that come into the area you are hunting till you start the script over.
start:
if_1 goto critterset
critterset:
setvariable critter1 %1
setvariable critter2 %2
ect
Not sure that helps but it is a way to hold the variable till you change hunting areas.
~Eoworfinia~
Marge, it takes two to lie. One to lie and one to listen. Homer Simpson
Get the facts first and then you can distort them as much as you please. Mark Twain
JMF90
Re: Getting the name of your target in StormFront
08/21/2009 05:06 PM CDT
Use a match table.
SF can grab variables from matchre, right?
If not, just use two match tables.
You (solidly balanced) are facing a ship's rat (2) at melee range.
SF can grab variables from matchre, right?
If not, just use two match tables.
You (solidly balanced) are facing a ship's rat (2) at melee range.
SMTHSAILN
Re: Getting the name of your target in StormFront
08/21/2009 05:08 PM CDT
<<SF can grab variables from matchre, right?
Can you explain this? (I didn't realize we could "capture" anything in SF)
-Stayn
Can you explain this? (I didn't realize we could "capture" anything in SF)
-Stayn
JIHAN
Re: Getting the name of your target in StormFront
08/21/2009 05:55 PM CDT
I suspected something with matchre might work, but I am clueless as to how to use it. And before getting all stove up over learning it, I wanted to make sure that it is actually possible to use StormFront to take incoming text from the game engine (i.e. pulling the name of what you're facing from ASSESS) and storing it into a variable.
Basically that's what I'm asking -- is there a way to do this elegantly by querying the game and capturing the text it returns to you?
_________________________________
The HeroMachine 3 Alpha is now open
for public testing if you want to
make a portrait of your character --
http://www.heromachine.com
Basically that's what I'm asking -- is there a way to do this elegantly by querying the game and capturing the text it returns to you?
_________________________________
The HeroMachine 3 Alpha is now open
for public testing if you want to
make a portrait of your character --
http://www.heromachine.com
JMF90
Re: Getting the name of your target in StormFront
08/21/2009 06:00 PM CDT
>Can you explain this? (I didn't realize we could "capture" anything in SF)
Maybe I'm wrong about that. I use Genie. Anyway, you can do it with two matchtables without grabbing anything. Or one if you fight in an area with only one creature type.
Maybe I'm wrong about that. I use Genie. Anyway, you can do it with two matchtables without grabbing anything. Or one if you fight in an area with only one creature type.
JIHAN
Re: Getting the name of your target in StormFront
08/21/2009 06:06 PM CDT
It doesn't look like it can be done that way. A match table doesn't appeal for that many entries, so I'll just leave it as-is, as a user-entered variable.
Thanks for the info everyone!
_________________________________
The HeroMachine 3 Alpha is now open
for public testing if you want to
make a portrait of your character --
http://www.heromachine.com
Thanks for the info everyone!
_________________________________
The HeroMachine 3 Alpha is now open
for public testing if you want to
make a portrait of your character --
http://www.heromachine.com
SMTHSAILN
Re: Getting the name of your target in StormFront
08/21/2009 06:09 PM CDT
<<Basically that's what I'm asking -- is there a way to do this elegantly by querying the game and capturing the text it returns to you?
http://www.play.net/dr/play/stormfront_scripting.asp
^If this is correct then no. However, you can use the ASSESS to track down the creatures noun and then pass it to your weapon retrieve function. You will have to continually add to it as you move through different creatures.
-Stayn
http://www.play.net/dr/play/stormfront_scripting.asp
^If this is correct then no. However, you can use the ASSESS to track down the creatures noun and then pass it to your weapon retrieve function. You will have to continually add to it as you move through different creatures.
-Stayn
GEORGIEPOO
Re: Getting the name of your target in StormFront
08/21/2009 11:19 PM CDT
I could have swore some generic syntax worked for me years back. Like "take <item> from" and just leave it at that. And just leave out the critter entirely. It may not be it exactly though. It was a long time ago since I last messed with pulling things from my target.
- George, Player of Foresee
- George, Player of Foresee
KRAGEJ
Re: Getting the name of your target in StormFront
08/22/2009 12:47 AM CDT
>Is there an easy way to get your target into a StormFront script as a variable without having the user enter it on the command line?
I deal with this by having a "critter name" variable and I just use match tables to set it on critter death.
It only gets updated if one of the sections that needs to use a "target name" has problems (IE: Appraising a Critter that doesn't exist) and sets a "critter name update" flag.
I use this variable for Appraisal and Moon Mage Power Perception.
~Nitish
I deal with this by having a "critter name" variable and I just use match tables to set it on critter death.
It only gets updated if one of the sections that needs to use a "target name" has problems (IE: Appraising a Critter that doesn't exist) and sets a "critter name update" flag.
I use this variable for Appraisal and Moon Mage Power Perception.
~Nitish