Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ VBscript ➜ multible variable dependant script

multible variable dependant script

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


Posted by Perrin   USA  (31 posts)  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
Top

Posted by Nick Gammon   Australia  (23,140 posts)  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
Top

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

aardwolf player
Top

Posted by Nick Gammon   Australia  (23,140 posts)  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
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.


17,045 views.

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.