I need some help with a counter

Posted by Casq on Sun 22 Aug 2004 04:47 PM — 3 posts, 12,851 views.

#0
I want to make trigger that would count what kind of hits my character scores, these hits are lightly cut, cut and tear.

Ive managed to create that counter but i have some trouble with it, it prints new text to infor bar everytime my
character cuts it looks like this: http://koti.mbnet.fi/~casq/mushongelma.JPG

Here is my vbscript
Dim intlcut

Sub lcut(strName, strLine, strWildcards)
intlcut = Int(intlcut + 1)
Info "Lcuts: " & intlcut & "."
End Sub

Dim intcut

Sub cut(strName, strLine, strWildcards)
intcut = Int(intcut + 1)
Info "Cuts: " & intcut & "."
End Sub 


And here are the damage messages taken from random battle.
You lightly cut Geofer causing brain cells to quiver.
You lightly cut Geofer causing a small wound.
You cut Geofer causing a bad acid wound.

As you can se i only need that "You lightly cut" or "You cut" part for the trigger.
Amended on Sun 22 Aug 2004 06:29 PM by Casq
USA #1
The Info command just appends text to the infobar, Youll need to use infoclear first.

So, You could do this:
InfoClear
Info "Lcuts: " & intlcut & ", " & "Cuts: " & intcut & "."

Youll just need to display all the values, everytime.
But it appears your triggers and such are working, its just the info mechanic you need to fix.

You might also think about making the variables Mushclient variables, which would let them be saved between sessions. If you wanted to do that.
Amended on Sun 22 Aug 2004 07:59 PM by Flannel
#2
After browsing around this forum for a while i discovered another way to do it and now its working ok.

Im looking towards making more scripts in the future, programming lessons dont really motivate me but writing scripts which will improve my mud experience is another thing.