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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Help with non-prompt, spell/buff on or off miniwindow

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Help with non-prompt, spell/buff on or off miniwindow

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Rydricc   (1 post)  [Biography] bio
Date Sun 11 Mar 2012 06:02 AM (UTC)  quote  ]

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

[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 12 Mar 2012 12:36 AM (UTC)  quote  ]
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
[Go to top] 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.


794 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]