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, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Beginner coding help...

Beginner coding help...

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


Posted by Keoke   (5 posts)  Bio
Date Sat 01 Jan 2005 07:01 AM (UTC)
Message
Ok, I haven't done much with scripts, so be gentle...

On Nodeka for a quest I was to collect several "souls", this involved killing MANY mobs. I wrote several triggers to "detect" when the mob was there and attack. Then I could just walk through the rooms.

Ok, so now I've moved all the triggers into a plugin using the plugin wizard, but how do I...make it work? I walk through the rooms, and the triggers no longer trigger. I'm sure this is simple, and I apologize the stupid question, but thanks in advance! :)

Keoke
Top

Posted by Feantur   (70 posts)  Bio
Date Reply #1 on Sat 01 Jan 2005 10:07 AM (UTC)
Message
Have you loaded the plugin in the world via File->Plugins?
Top

Posted by Keoke   (5 posts)  Bio
Date Reply #2 on Sat 01 Jan 2005 06:36 PM (UTC)
Message
Yes, loaded the plugin, message at the bottom said plugin loaded, and if I: File -> plugins, it's in the list.

I think I need some kind of "onsubload" type thing that tells it to go...

I thought it would be easier to move groups of triggers into various plugins that I could load/unload as I needed, instead of having a list of 50 triggers...

Keoke
Top

Posted by Keoke   (5 posts)  Bio
Date Reply #3 on Sat 01 Jan 2005 06:39 PM (UTC)
Message
Here's the plugin:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Friday, December 31, 2004, 9:55 PM -->
<!-- MuClient version 3.64 -->

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

<muclient>
<plugin
name="Druid_Plugin"
author="*******"(edited)
id="*******"(edited)
language="VBscript"
purpose="To kill druids"
date_written="2004-12-31 21:51:28"
requires="3.64"
version="1.0"
>
<description trim="y">
<![CDATA[
This is for the druid area above Ruushii
]]>
</description>

</plugin>


<!-- Triggers -->

<triggers>
<trigger
enabled="y"
match="A human druid is examining some mold growing on the wall."
sequence="100"
>
<send>c 'mag arr' druid</send>
</trigger>
<trigger
enabled="y"
match="An academy druid falls to the ground! He is dead!"
sequence="100"
>
<send>c 'mag arr' druid</send>
</trigger>
<trigger
enabled="y"
match="An academy druid is here maintaining the courtyard."
sequence="100"
>
<send>c 'mag arr' druid</send>
</trigger>
<trigger
enabled="y"
match="*Three*"
sequence="100"
>
<send>c 'magic arrow' druid</send>
</trigger>
<trigger
enabled="y"
match="*[ Four ]*"
sequence="100"
>
<send>c 'magic arrow' druid</send>
</trigger>
<trigger
enabled="y"
match="*[ Two ]*"
sequence="100"
>
<send>c 'magic arrow' druid
</send>
</trigger>
</triggers>


<script>
<![CDATA[
Sub OnHelp (sName, sLine, wildcards)
world.Note world.GetPluginInfo (world.GetPluginID, 3)
End Sub
]]>
</script>

</muclient>
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #4 on Sat 01 Jan 2005 07:00 PM (UTC)
Message
You dont need anything that tells it to go. Being loaded is enough. You can load and unload it from the plugin screen. Obviously however, this takes a couple of clicks, so if you do need to enable/disable it quickly, you might think about adding an alias to do just that.

Do you have other triggers that match on these things?
If so, do they have 'keep evaluating' checked?
You might also want to add it to all of these (that way if you need to match on them later on, you still can).

Do you have scripting enabled? It shouldn't matter, but your plugin looks like everything should be working.

Do you have triggers enabled in your world? I dont think this matters either, but can't hurt to ask (It's on the bottom of the trigger page).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 01 Jan 2005 07:08 PM (UTC)
Message
I tried it and it seemed to work, for example:


A human druid is examining some mold growing on the wall.
c 'mag arr' druid


As Flannel said, make sure some other trigger isn't interfering. You can turn on Trace mode (Game menu) and then you should see something like this:


A human druid is examining some mold growing on the wall.
TRACE: Matched trigger "A human druid is examining some mold growing on the wall."
c 'mag arr' druid


This confirms what triggers are firing. If some other trigger got in first, you would see that.

And no, you don't need to "enable" plugins, installing them is enough.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Keoke   (5 posts)  Bio
Date Reply #6 on Sat 01 Jan 2005 07:14 PM (UTC)
Message
Thanks Guys, it works now!

Somehow during the process I disabled the triggers...didn't even think to check that! Thanks for the tip on the trace, I'll try that in the future as I work on things. :)

Keoke
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.


18,871 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

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