Hey there, working on a script to analyze the stats on an item and report those back in a less cluttered form. It is for the most part done, but
I'm having a few small issues that you might be able to help out with. The script is being done as a plugin with jscript constants.
Problem one -
When loring the item for it's stats I need to take it's wear location and store it to a variable for reporting back later on in the script. I'm unsure
how to store a text variable, is there a world.set style command to do so? The string that this trigger is matching is
"Wear bits:take slot"
with the "slot" changing depending on it's wear slot. Another thing I should mention is that when the item is a light, the string is simply
Wear bits: take, I'm guessing I can simply set the variable to light in the alias that begins the script to get around that. Below is
what I was trying when I realized setvariable only took in numbers.
Problem two -
Trying to set up an alias to autostring the long string of an item based on the stats stored when analyzing the piece. The first problem I
noticed when testing it out was that it did string the item, but instead of replacing @wearlvl or @arm or so on with the appropriate variable,
it just inserted those literally into the string. If there is no way around that I can just make it so that the autostring worldsend is done
by a trigger. I'm also not sure if there will be any problem when the item is called by a command like stringuni 1. or so on by the
player. If I need to do it as a trigger, will storing it as a variable(assuming the answer to above will apply here), will it keep the period?
The aliases I was using are again below.
Thanks much for any help.
I'm having a few small issues that you might be able to help out with. The script is being done as a plugin with jscript constants.
Problem one -
When loring the item for it's stats I need to take it's wear location and store it to a variable for reporting back later on in the script. I'm unsure
how to store a text variable, is there a world.set style command to do so? The string that this trigger is matching is
"Wear bits:take slot"
with the "slot" changing depending on it's wear slot. Another thing I should mention is that when the item is a light, the string is simply
Wear bits: take, I'm guessing I can simply set the variable to light in the alias that begins the script to get around that. Below is
what I was trying when I realized setvariable only took in numbers.
<trigger
enabled="y"
group="sort"
match="Wear bits: take *"
send_to="12"
sequence="51"
>
<send>
var wearloc;
world.setvariable ("wearloc", %1);
</send>
</trigger>
Problem two -
Trying to set up an alias to autostring the long string of an item based on the stats stored when analyzing the piece. The first problem I
noticed when testing it out was that it did string the item, but instead of replacing @wearlvl or @arm or so on with the appropriate variable,
it just inserted those literally into the string. If there is no way around that I can just make it so that the autostring worldsend is done
by a trigger. I'm also not sure if there will be any problem when the item is called by a command like stringuni 1. or so on by the
player. If I need to do it as a trigger, will storing it as a variable(assuming the answer to above will apply here), will it keep the period?
The aliases I was using are again below.
<alias
match="stringuni *"
enabled="y"
group="sort"
send_to="12"
sequence="80"
>
<send>
world.send ("autostring %1 long This item is `OUNIQUE``, and has the following properties `OWHEN FIXED``:`RWear Level: `^@wearlvl```RHps: `^@hps`` Mana: `^@man ``Moves: `^@mov```RAC: `^@arm`` Saves: `^@sav`` Hitroll: `^@hit`` Damroll: `^@dam``");
</send>
</alias>
<alias
match="stringnon *"
enabled="y"
group="sort"
send_to="12"
sequence="80"
>
<send>
world.send ("autostring %1 long This item is `#NON-UNIQUE``, and has the following properties:`RWear Level: `^@wearlvl```RHps: `^@hps`` Mana: `^@man`` Moves: `^@mov`R``AC: `^@arm`` Saves: `^@sav`` Hitroll: `^@hit`` Damroll: `^@dam``");
</send>
</alias>
Thanks much for any help.