|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Mon May 05, 2008 4:41 am
Help with a trigger |
You are now guarding Khaliz!
#trigger {You are now guarding (*)!} {#var guardtar %1;#echo {now guarding %1};gsay guarding %1}
You are no longer guarding Khaliz
#trigger {You are no longer guarding (*) {gsay no longer guarding @guardtar} {#clr @guardtar}
The second trigger gsays correctly but i have a status bar
Guarding: @guardtar Target: @Target Group: @Group
that i want to clear when guarding stops. I thought #clr would work but it doesn't seem so, and i've tried setting it as an alias too like:
#alias gd {guard %params}
, then:
#trigger {You are no longer guarding (*)} {gsay no longer guarding @guardtar} {gd " "}
but that doesn't seem to work either, any suggestions on how i can make it clear my status bar when I stop guarding? |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Mon May 05, 2008 4:50 am |
This seems to work, unless someone else has a solution thats better
#trigger {You are no longer guarding (*)} {#echo No longer guarding %1} {#var guardtar " "} |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Mon May 05, 2008 6:44 am |
im not sure why you are defining the third parameter the way you are, thats supposed to be for the class name
#trigger {You are no longer guarding {@guardtar}} {gsay No longer guarding %pop(guardtar)} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon May 05, 2008 2:13 pm |
Yes, the problem is that, unlike your first trigger, you separated the second line of your value into curly braces. You could use Shalimar's version, or fix your bug like so:
trigger {You are no longer guarding (*)} {#echo No longer guarding %1; #var guardtar ""} |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon May 05, 2008 3:05 pm |
Blimey, you guys know how to make a mountain out of a molehill. His problem's simply that he's using the #clr command in a way it wasn't intended to be used (read the docs, Ggoss). He just needs to replace it with #var guardtar "" or guardtar="" and it'll work fine. Finished script:
#trigger {You are now guarding (*)!} {#var guardtar %1;#echo {now guarding %1};gsay guarding %1}
#trigger {You are no longer guarding (*)} {gsay no longer guarding @guardtar;#var guardtar ""} |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon May 05, 2008 3:17 pm |
I did notice the problem with #clr in his first post, but he fixed that in his second, which is what I was responding to. He still had the problem of putting part of his value string in a separate set of braces.
|
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Mon May 05, 2008 7:08 pm |
Ok another question, this is with #alarm it doesn't seem to be working right
I have an item that procs this when i say wish, i want it to wait 3 mins and say wish agian
The writhing serpent of miracles tightens around your arm and infuses you with magic.
so trigger should be
#trigger {The writhing serpent of miracles tightens around your arm and infuses you with magic.} {#alarm 3:00;say wish}
but it doesn't seem to be working. I used to use the #wait command, but that seems to be buggy from what i've read here. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon May 05, 2008 7:13 pm |
Once again, you've got the syntax all wrong.
Code: |
#ALARM 3:00 {#SAY wish} |
|
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Mon May 05, 2008 10:44 pm |
Yes sadly i suck at some triggers, but did notice that after a bit, but still alarm doesn't seem to be firing right. it doesn't seem to fire at all.
i now have the trigger
#alarm 3:00 {say wish}
i actually want to say wish not just say it for my viewing, the item triggers off say wish. Is there a bug with #alarm, because it doesnt seem to be firing at all, i want it to say wish every 3 mins. I've tried it as
#alarm 3:00 {say wish}
and
#alarm -3:00 {say wish}
should i be like
#alarm -0:03:00 {say wish} |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Mon May 05, 2008 11:05 pm |
well the last trigger seems to fire every 3 mins now. odd i have to place it that way. But thanks to all that responded.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon May 05, 2008 11:10 pm |
-3:00 means "when I've been connected for three minutes", which means it probably won't fire. 3:00 means "every three minutes". You probably mean +3:00, which means "once, in three minutes".
Okay, so I did a bit of testing on this. Seems you need to use *3:00 to mean "every three minutes". 3:00 on its own defaults to "every three hours", which isn't what you want. So you have two options:
#alarm +3:00 {once in three minutes}
#alarm *3:00 {every three minutes} |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue May 06, 2008 11:54 am |
Weird. Doesn't seem that way in the help files.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue May 06, 2008 1:45 pm |
Here is my interpretation of the help files. By my reading:
3:00 means trigger once an hour at 3 minutes after the hour (the equivalent of *:03:00)
+3:00 means trigger once three minutes from now
-3:00 means trigger at 3 minutes after every hour according to the connection time (the equivalent of -*:03:00)
*3:00 means trigger every 3 minutes, when the mod time is 3 minutes. Note that it doesn't mean starting 3 minutes from now, but rather every 3 minutes by the clock, e.g. at XX:00:00, XX:03:00, XX:06:00, ...
The documentation could be improved a bit. But I think a careful reading makes it clear. |
|
|
|
|
|