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
➜ Plugins
➜ Help with non-prompt, spell/buff on or off miniwindow
Help with non-prompt, spell/buff on or off miniwindow
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Rydricc
(1 post) Bio
|
Date
| Sun 11 Mar 2012 06:02 AM (UTC) Amended on Sun 11 Mar 2012 06:05 AM (UTC) by Rydricc
|
Message
| Ive combined a few bits of code from hours of searching, and I cannot for the life of me understand how to get miniwindows to work right. If someone could write maybe the beginning or just a skeleton example, id love them. I have looked over about 10000 help files it seems.
It basically keeps track of spells and displays as UP or DOWN. I want this in a miniwindow and not the infobar. It would be nice to also have it green or red, which i could do if i knew how to start.
This is not working code, this is just where I am at. It will not run unless you remove the window part ;p
<plugin
name="Buff Indicator Frankensteined"
author="Copy + Paste"
id="a2af5216d68563401888e01e"
language="Lua"
purpose="EVERYTHING"
date_written="2003-04-28 09:50:05"
date_modified="2005-05-05 16:00"
requires="3.49"
version="1.2"
>
<description trim="y">
</description>
</plugin>
<timers>
<timer enabled="y" second="1.00" send_to="6"
>
<send>function cnv (what)
if what then
return "UP"
else
return "DOWN"
end -- if
end -- cnv
infobar_text = string.format (
"PFG: %s, Dark: %s, DB: %s",
cnv (pfg), cnv (dark), cnv (dbless))
if infobar_text ~= old_infobar_text then
InfoClear()
Info (infobar_text)
old_infobar_text = infobar_text
end -- changed</send>
</timer>
</timers>
<triggers>
<trigger
enabled="y"
match="*You feel less protected from good.*"
sendto="6"
sequence="100"
>
<send>pfg = false</send>
</trigger>
<trigger
enabled="y"
match="*The circle of darkness fades away.*"
sendto="6"
sequence="100"
>
<send>dark = false</send>
</trigger>
<trigger
enabled="y"
match="*You feel the dark powers leave your body.*"
sendto="6"
sequence="100"
>
<send>dbless = false</send>
</trigger>
<trigger
enabled="y"
match="*You summon a circle of darkness.*"
sendto="6"
sequence="100"
>
<send>dark = true</send>
</trigger>
<trigger
enabled="y"
match="*A shimmering aura of evil surrounds your body.*"
sendto="6"
sequence="100"
>
<send>pfg = true</send>
</trigger>
<trigger
enabled="y"
match="*You chant the ancient words of magic, calling forth the powers of darkness.*"
sendto="6"
sequence="100"
>
<send>dbless = true</send>
</trigger>
</triggers>
win = "buff"
long WindowCreate(buff, 0,0, 50, 100, 6, miniwin.create_absolute_location, ColourNameToRGB("black"));
WindowFont (buff, "f", "Fixedsys", 9, true, false, false, false) -- define font
| Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Mon 12 Mar 2012 12:36 AM (UTC) |
Message
| Huh? Did you use the plugin wizard? Take a look at almost any plugin on this site and you will see that the script part goes inside "script" tags, like this:
<!-- Script -->
<script>
<![CDATA[
-- your script here ...
]]>
</script>
Also there should be more preamble at the start and the end.
Look at existing plugins, quite a few came with the client. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
9,239 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top