Sorry, cant find info or figure this out...
trying to make a Master / Slave bot thing.
I want the bot to do actions only the Master says.
trigger:
^(.*?) says\, \"(.*?)\"$
Value:
if (%1) == @master then
Send ("%2")
else
Send ("scoff")
end
it does actions Anyone says...
not comparing %1 to the Master variable?
Thanks for any help...
K.
It literally substitutes, so you are getting something like:
if (John) == Kurapiira then
That is comparing two variables. You need something like:
if "%1" == "@master" then
Thanks for the help and quick response!
Now its bypassing the first part and just sending
"Scoffs"
I've tried quotes and brackets..is it spacing or something?...
checked regular expression, expand variables, keep evaluating...
dunno...kinda weird
K.
What's the value of the messages variable? Make sure it's set.
I did this...just to see if it's capturing right
Send ("' %1")
Send ("' %2")
if "%1" == "@master" then
Send ("%2")
else
Send ("scoff")
end
its capturing the name of the person
and its sending both the name and the command they say
ie: glinka says,"sit"
You say glinka
You say sit
just cant get the comparison ...
<triggers>
<trigger
enabled="y"
expand_variables="y"
keep_evaluating="y"
match="^(.*?) says\, \"(.*?)\"$"
regexp="y"
send_to="12"
sequence="100"
>
<send>Send ("' %1")
Send ("' %2")
if "%1" == "@master" then
Send ("%2")
else
Send ("scoff")
end
</send>
</trigger>
</triggers>
<variables>
<variable name="master">glinka</variable>
</variables>
sorry to be so dense...the master variable wasn't capitalized..seems to work now
Thanks for the help folks !
You can try string.lower() in your comparisons, too. :)
if string.lower("%1") == string.lower("@master") then