|
bskrzysiek Newbie
Joined: 29 Jan 2015 Posts: 9
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Thu Jan 29, 2015 11:30 am |
are you trying to create a local variable, or a reuseable one?
#VAR location {some value}
location=some value
thats how you define a normal variable (either syntax works)
for local variables you want
#LOCAL $location
$location=some value
the local command is only needed if you need to declare the variable with a null value
(such as if it will be defined inside an #IF) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
bskrzysiek Newbie
Joined: 29 Jan 2015 Posts: 9
|
Posted: Thu Jan 29, 2015 11:50 am |
Thank you! {} works just fine :)!
|
|
|
|
Pogi Newbie
Joined: 04 Aug 2008 Posts: 9 Location: Washington
|
Posted: Fri Jan 30, 2015 8:18 pm |
I had the same error. I've never really had to make very complex triggers before so I'm kind of stuck on this. What I want to do is make a trigger that does this:
Pattern. one last time before fading from sight
I then want it to cast mirage
if the next line is You lose your concentration I want it to cast again. I had an easier time in Zmud then Cmud with stuff like this. Help appreciated thanks. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Fri Jan 30, 2015 8:41 pm |
you want a variable to hold your lastSpell
#TR {one last time before fading from sight } {lastSpell=mirage;cast mirage}
#TR {You lose your concentration} {cast @lastSpell}
by the nature of your issue, a local variable just won't work
In the future though, please create your own thread. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Pogi Newbie
Joined: 04 Aug 2008 Posts: 9 Location: Washington
|
Posted: Fri Jan 30, 2015 8:55 pm |
Thanks I'll try that and sorry I thought it was the same type of stuff. I'll make a new thread next time.
|
|
|
|
apfinger Novice
Joined: 19 Nov 2006 Posts: 40
|
Posted: Sat Jan 31, 2015 7:03 am |
I may be facing the wrath of forum protocol for bumping this thread again, but thought I would comment on the last topic since it is already resolved and no longer in need of its own thread.
You can also add an extra layer in there to handle your spell casting.
You can create a separate trigger
#TR {cast (*)} {lastSpell=%1}
There is a setting in the Package Editor(view the trigger, open the Pattern tab, change Type to Command Input) that tells the trigger to fire on input commands. This changes the trigger to do as you would expect - fire on your input text instead of the MUD output text.
Now whenever you manually cast a spell, it will record it as the last one so that if you lose your concentration, it will attempt the most recently cast spell regardless if it was cast from a trigger, alias, or manually.
This is not a foolproof mechanism, but is a good start for this type of repetitive work. |
|
|
|
|
|