[MudWalker] Re: MudWalker Digest, Vol 7, Issue 1

Kevin Reid kpreid
Sun Feb 1 04:45:57 PST 2004


Blastron <blastron at mac.com> wrote:

> Trigger:
> ^(.*)h, ^(.*)m -
> 
> Script:
> @@if arg[2] <= 100 then
> drink potion
> @@end

You'll need to convert arg[2] from a string to a number for the
comparison to work:

  @@if tonumber(arg[2]) <= 100 then

<http://www.lua.org/manual/5.0/manual.html#5.1>

-- 
Kevin Reid



More information about the MudWalker mailing list