[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]  General
. . -> [Subject]  anyone need a tank whiner for MUD?

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

anyone need a tank whiner for MUD?

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


Posted by Demonsurfer   USA  (256 posts)  [Biography] bio
Date Tue 19 Feb 2002 07:28 AM (UTC)  quote  ]

Amended on Tue 19 Feb 2002 07:35 AM (UTC) by Demonsurfer

Message
here's one I got to work, if it's of use to you... I use it on SlothMUDIII (www.slothmud.org)
-there are several variables, alias's, a trigger and some vbs script to add...


-THE COMMANDS-

whineon - activates the whiner when you are in a group
whineoff - turns it off :)
(you need to manually enter your maximum hitpoints in the variables, although you could easily do an alias for this.)


-THE ALIAS'-

alias: whineon
   sends: (leave blank)
   script: whineon

alias: whineoff
   sends: (leave blank)
   script: whineoff


-THE VARIABLES-

name: maxhp 
   contents: (enter your maximum hitpoints manually)

name: oldhp
   contents: (script will update this. enter 0 to start)


-THE TRIGGERS-

(the trigger obviously depends on how your hitpoints are displayed in-game after every move/action you do)
trigger:<*hp *
   label: whinetrigger
   script: whiner


-THE SCRIPT (vbs)-

sub whineoff (thename, theoutput, thewildcards)
     World.EnableTrigger "whinetrigger", FALSE
     World.send "grouptell Tank Whiner is OFF"
end sub

sub whineon (thename, theoutput, thewildcards)
     World.EnableTrigger "whinetrigger", TRUE
     World.send "grouptell Tank Whiner is ON"
end sub

sub whiner (strTriggerName, trig_line, arrWildCards)
dim maxhpVar
dim oldhpVar 
dim hpVar
dim difference
     hpVar = arrWildCards (1)
     maxhpVar = World.GetVariable("maxhp")
     oldhpVar = World.GetVariable("oldhp")
     if hpVar < oldhpVar then
	difference = oldhpVar - hpVar
	World.send "grouptell " & hpVar & " / " & maxhpVar & " (-" & difference & ") *ACK* that HURT!"
	World.SetVariable "oldhp", hpVar
      end if
      if hpVar > oldhpVar then
	difference = hpVar - oldhpVar
	World.send "grouptell " & hpVar & " / " & maxhpVar & " (+" & difference & ") ahhh that's better."
	World.SetVariable "oldhp", hpVar
      end if      
end sub



that's it :)
hope someone gets some use out of it.
cheers
[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.


1,480 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]