multible variable dependant script

Posted by Perrin on Sun 05 Jun 2011 12:25 AM — 4 posts, 21,556 views.

USA #0
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
Australia Forum Administrator #1
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?
USA #2
yeah exactly that
Australia Forum Administrator #3
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.