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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  multible variable dependant script

multible variable dependant script

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


Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Sun 05 Jun 2011 12:25 AM (UTC)
Message
here is the script as i have it and it works fine but i am
trying to add another check against a variable and not sure
how to go about it...

function Clvl (total)
 select case total
   case "1" Clvl = 1
   case "2" Clvl = 2
   case "3" Clvl = 3
   case "4" Clvl = 4
   case "5" Clvl = 5
   case "6" Clvl = 6
   case "7" Clvl = 7
   case "8" Clvl = 8
   case "9" Clvl = 9
   case else Clvl = 10
 end select

end function

Sub OnLevel (thename, theoutput, arrWildcards)
Dim lvls, statted
 lvls = Getvariable ("levels")
 Statted = vbTrue

  If Clvl (lvls) < 10 then statted = vbFalse

  If statted then
    enabletrigger "statting2", 1
    world.send "score"
    setvariable "levels", "1"
  End if
End Sub

What I want to get this to do is get the script to check the my variable "combat" and if "in" wait to fire until the "out" trigger fires I can think of a couple work arounds involving either: alot of new triggers, or another sub like "OnScore" changing send to execute and a single alias & trigger but either way seems clunky seems to me like there should be a simpler way I just am not seeing

aardwolf player
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 05 Jun 2011 02:22 AM (UTC)
Message
What do you really want to do? If you level while in combat, you want to wait until out of combat and then do something?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Reply #2 on Sun 05 Jun 2011 05:52 AM (UTC)
Message
yeah exactly that

aardwolf player
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Mon 06 Jun 2011 09:33 PM (UTC)
Message
The simplest thing I think would be to just check when you leave combat if your level is different to what it was last time you left combat.

- 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.


15,013 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]