Right then. How do I do this.

Posted by David Berthiaume on Sat 18 Feb 2006 03:22 AM — 3 posts, 15,524 views.

#0
A while back... April 2001 I had help writing this script.
My code(with a LOT of Nicks help) to fame:

sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
Now I'd like to modify this.

What I'd like is to check to see how long (autocombo) is before it does the send thing. If autocombo is a certain length I want it to just complete the combo, if it's long enough I'd rather it just do the throw part.

There are 2, 3, 4, and 5 attacks to case each time the trigger fires.
There must be a way to check to see how many attacks to case there is. if there is 2 or 3 attacks to case, I want it to just do the attack part. If there is 4 or 5, I want it to do the throw.
Amended on Sat 18 Feb 2006 03:23 AM by David Berthiaume
#1
<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   group="ComboScript"
   match="^Combination\! \( (.*) \)$"
   regexp="y"
   send_to="12"
   sequence="2"
  >
  <send>kstat = GetVariable("KaiokenStatus")
kstun = GetVariable("KaiokenStun")
kcomb = GetVariable("KaiokenCombo")
comthrow = GetVariable("ComboThrowScript")
if (kcomb = "ON") and (kstat = "ON") then
SendImmediate "kaio @KaiokenComboLevel"
Speedwalkdelay = "@ComboSpeed"
DiscardQueue
AutoCombo = split ("%1")
for i=lbound (AutoCombo) to ubound (AutoCombo) 
  Select Case AutoCombo (i) 
    case "rp" attack = "punch right"
    case "lp" attack = "punch left"
    case "sw" attack = "sweep"
    case "r" attack = "roundhouse"
    case "up" attack = "uppercut"
    case "kf" attack = "kickflip"
    case "hm" attack = "hammer"
    case else attack = ""  ' unknown attack type
  End Select          
if comthrow = "ON" then
if i = ubound (AutoCombo ) then
Queue "throw @Attacker @Throwdirection", True
else
Queue attack + " " + world.GetVariable ("attacker"), True
end if
else
Queue attack + " " + world.GetVariable ("attacker"), True
end if
next
else
Speedwalkdelay = "@ComboSpeed"
DiscardQueue
AutoCombo = split ("%1")
for i=lbound (AutoCombo) to ubound (AutoCombo) 
  Select Case AutoCombo (i) 
    case "rp" attack = "punch right"
    case "lp" attack = "punch left"
    case "sw" attack = "sweep"
    case "r" attack = "roundhouse"
    case "up" attack = "uppercut"
    case "kf" attack = "kickflip"
    case "hm" attack = "hammer"
    case else attack = ""  ' unknown attack type
  End Select
if comthrow = "ON" then
if i = ubound (AutoCombo ) then
Queue "throw @Attacker @Throwdirection", True
else
Queue attack + " " + world.GetVariable ("Attacker"), True
end if
else
Queue attack + " " + world.GetVariable ("attacker"), True
end if
next
end if</send>
  </trigger>
</triggers>
This is actually the new Trigger and the updated code, the prior post was really old. copy and paste right out of my old post. I originally was not going to post this on here because of how long it is.
#2
<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   group="ComboScript"
   match="^Combination\! \( (.*) \)$"
   regexp="y"
   send_to="12"
   sequence="2"
  >
  <send>kstat = GetVariable("KaiokenStatus")
kstun = GetVariable("KaiokenStun")
kcomb = GetVariable("KaiokenCombo")
comthrow = GetVariable("ComboThrowScript")
AutoCombo = split ("%1")
Speedwalkdelay = "@ComboSpeed"
DiscardQueue
Note Ubound(autocombo)
if (Ubound(AutoCombo) = "0") or (Ubound(AutoCombo) = "1") or (Ubound(AutoCombo) = "2") then
if (kcomb = "ON") and (kstat = "ON") then
SendImmediate "kaio @KaiokenComboLevel"
for i=lbound (AutoCombo) to ubound (AutoCombo) 
  Select Case AutoCombo (i) 
    case "rp" attack = "punch right"
    case "lp" attack = "punch left"
    case "sw" attack = "sweep"
    case "r" attack = "roundhouse"
    case "up" attack = "uppercut"
    case "kf" attack = "kickflip"
    case "hm" attack = "hammer"
    case else attack = ""  ' unknown attack type
  End Select          
Queue attack + " " + world.GetVariable ("attacker"), True
next
else
for i=lbound (AutoCombo) to ubound (AutoCombo) 
  Select Case AutoCombo (i) 
    case "rp" attack = "punch right"
    case "lp" attack = "punch left"
    case "sw" attack = "sweep"
    case "r" attack = "roundhouse"
    case "up" attack = "uppercut"
    case "kf" attack = "kickflip"
    case "hm" attack = "hammer"
    case else attack = ""  ' unknown attack type
  End Select
Queue attack + " " + world.GetVariable ("attacker"), True
next
end if

elseif (Ubound(AutoCombo) = "3") or (Ubound(AutoCombo) = "4") then
if (kcomb = "ON") and (kstat = "ON") then
SendImmediate "kaio @KaiokenComboLevel"
for i=lbound (AutoCombo) to ubound (AutoCombo) 
  Select Case AutoCombo (i) 
    case "rp" attack = "punch right"
    case "lp" attack = "punch left"
    case "sw" attack = "sweep"
    case "r" attack = "roundhouse"
    case "up" attack = "uppercut"
    case "kf" attack = "kickflip"
    case "hm" attack = "hammer"
    case else attack = ""  ' unknown attack type
  End Select          
if comthrow = "ON" then
if i = ubound (AutoCombo ) then
Queue "throw @Attacker @Throwdirection", True
else
Queue attack + " " + world.GetVariable ("attacker"), True
end if
else
Queue attack + " " + world.GetVariable ("attacker"), True
end if
next
else
for i=lbound (AutoCombo) to ubound (AutoCombo) 
  Select Case AutoCombo (i) 
    case "rp" attack = "punch right"
    case "lp" attack = "punch left"
    case "sw" attack = "sweep"
    case "r" attack = "roundhouse"
    case "up" attack = "uppercut"
    case "kf" attack = "kickflip"
    case "hm" attack = "hammer"
    case else attack = ""  ' unknown attack type
  End Select
if comthrow = "ON" then
if i = ubound (AutoCombo ) then
Queue "throw @Attacker @Throwdirection", True
else
Queue attack + " " + world.GetVariable ("Attacker"), True
end if
else
Queue attack + " " + world.GetVariable ("attacker"), True
end if
next
end if
else
Note "What the hell is going on here? There shouldn't be more than 5 attacks!"
end if</send>
  </trigger>
</triggers>
Right then. Here is the answer. I did some searching here and online in the various vbscript manuals online, and I found what I was searching for. It's messy but it gets the job done.