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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  need help with making script that heals people if below certain %

need help with making script that heals people if below certain %

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


Posted by Riketsu   (2 posts)  [Biography] bio
Date Thu 02 Aug 2007 07:57 PM (UTC)
Message
I'm completely new to scripting unfortunately, i play a mud called medievia, and need some help. for a trigger i put

*<*/*hp */*m */*mv * * TNL-*>

if %40 < 100 then
ft health below %40 approx 360 health remaining

That didn't work for me (to alert form health), and i dunno how to get it to work so the lowest % is healed.

example you'll see <[insert name]%>[insert prompt]
if that helps.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #1 on Thu 02 Aug 2007 10:05 PM (UTC)
Message
Quote:
if %40 < 100 then

This is looking for the 40th wildcard in the trigger, which is not what you're looking to do, I'm assuming. Try this instead:

if %2 / %3 < 0.4 then
  Send( "ft health below 40%.  %2 health remaining." )
end

It is much easier to fight for one's ideals than to live up to them.
[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.


9,116 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] 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]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]