[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ A plugin that just won't work

A plugin that just won't work

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Artel   USA  (65 posts)  Bio
Date Sun 21 Jan 2007 12:14 AM (UTC)

Amended on Sun 21 Jan 2007 12:15 AM (UTC) by Artel

Message
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, January 20, 2007, 6:01 PM -->
<!-- MuClient version 3.75 -->

<!-- Plugin "moontest" generated by Plugin Wizard -->

<muclient>
<plugin
   name="moontest"
   author="Artel"
   id="0d6083624cf1443d136b0e88"
   language="Lua"
   save_state="y"
   date_written="2007-01-20 18:00:34"
   requires="3.75"
   version="1.0"
   >

</plugin>


<!--  Triggers  -->

<triggers>
  <trigger
   enabled="y"
   group="Moons"
   match="^You notice the grey moon fall in the west\.$"
   name="GreyFall"
   regexp="y"
   script="onGreySet"
   sequence="100"
  >
  </trigger>
</triggers>

<!--  Script  -->


<script>
<![CDATA[
function onGreySet(sName, sLine, wildcards)
	world.Note("gset")
	world.SetVariable("greytimer", 0)
	world.SetVariable("graycatch", 1)
	world.Note([[world.GetVariable("greytimer") ]]..world.GetVariable("greytimer"))
end -- function
]]>
</script>


</muclient>

Nothing happens when the trigger message appears, even when I use my mud's echo command or MUSHclients ctrl+shift+f12 feature. Any ideas?

Artel.
Top

Posted by Onoitsu2   USA  (248 posts)  Bio
Date Reply #1 on Sun 21 Jan 2007 09:39 AM (UTC)
Message
I don't believe you need the double square brackets, I don't believe you need brackets at all for such a function call.

world.Note([[world.GetVariable("greytimer") ]]..world.GetVariable("greytimer"))


Should be...

world.Note(world.GetVariable("greytimer") .. world.GetVariable("greytimer"))

Laterzzz,
Onoitsu2
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #2 on Sun 21 Jan 2007 10:17 AM (UTC)
Message
The double square brackets create a string. I'm assuming that he chose to use them to print out what he was printing, followed by what the value of it was.
e.g. it would print:
world.GetVariable("greytimer")1

Unfortunately, I'm not sure what the problem is, though.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Artel   USA  (65 posts)  Bio
Date Reply #3 on Sun 21 Jan 2007 06:08 PM (UTC)
Message
Heh, I had triggers disabled in the trigger menu. For some reason I thought that plugins were unaffected by that option.

Artel.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,493 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]