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
➜ General
➜ Right then. How do I do this.
|
Right then. How do I do this.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| David Berthiaume
(202 posts) Bio
|
| Date
| Sat 18 Feb 2006 03:22 AM (UTC) Amended on Sat 18 Feb 2006 03:23 AM (UTC) by David Berthiaume
|
| Message
| 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. | | Top |
|
| Posted by
| David Berthiaume
(202 posts) Bio
|
| Date
| Reply #1 on Sat 18 Feb 2006 03:28 AM (UTC) |
| Message
| <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. | | Top |
|
| Posted by
| David Berthiaume
(202 posts) Bio
|
| Date
| Reply #2 on Sat 18 Feb 2006 07:00 AM (UTC) |
| Message
| <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. | | 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.
14,064 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top