megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Tue Mar 04, 2003 5:52 pm
Multi line trigger catch!! |
Ok this is a little something I wrote for a friend while I don't know if anyone can use it, It is a prime example of what can be done with Zmud.
#CLASS {RATS}
#VAR startcount {a black silken eyepatch,a corps of a rat,2|corps of a baby rat,the corps of a black rat.}
#VAR midcount {a black silken eyepatch|a corps of a rat|2 corps of a baby rat|the corps of a black rat}
#VAR numcount {4}
#VAR rats {}
#VAR goldrats {0}
#VAR tempgold {0}
#TRIGGER {^You are holding:} {#var startcount "";#var midcount "";#var numcount "";#var rats "";#var goldrats "";#var tempgold "";#temp {^You are wearing:} {#t- counting;#deli startcount "You are holding:";#deli startcount "You are wearing:";#var midcount %replace(%replace(%replace(@startcount,".",""),"|"," "),",","|");#var numcount %numitems(@midcount);#loop @numcount,o {#t+ trigcount;#show %item(@midcount,%i)};#t- trigcount;#echo @rats Worth @goldrats} goldratcount;#t+ counting}
#CLASS 0
#CLASS {RATS|counting}
#TRIGGER {(*)} {#additem startcount "%1"}
#CLASS 0
#CLASS {RATS|trigcount}
#TRIGGER {^(%D) corps of a (*) rat} {#ad rats "%1";#math tempgold @%2*%1;#ad goldrats @tempgold}
#TRIGGER {^a corps of a (*) rat} {#ad rats 1;#ad goldrats @%1}
#TRIGGER {^the corps of a (*) rat} {#ad rats 1;#ad goldrats @%1}
#TRIGGER {^a corps of a rat} {#ad rats 1;#ad goldrats @rat}
#TRIGGER {^the corps of a rat} {#ad rats 1;#ad goldrats @rat}
#CLASS 0
#CLASS {RATS|goldvar}
#VAR baby {7} {7}
#VAR young {14} {14}
#VAR rat {21} {21}
#VAR old {28} {28}
#VAR black {35} {35}
#CLASS 0
What this actually does is
example:
You are holding:
2 corps of a black rat,a corps of a baby rat,2
corps of a young rat.
You are wearing:
This program iI made will cath all of that!
it will add each (*) to a @var
then remove:
You are holding:
You are wearing: and the "."
Then replace the "|" with " "
Then replace the "," with "|" and make a new @var
Then #loop that @var and #show it so that each item can be cought in a trig class that is turned on just for that.
counts the corps
and cathes the name of the item
while getting the value of each item andthen takes all of that
and #echo 5 WORTH 105 =(from the example above)
you can modify this by changing almost anything good luck and if you ever need a program I am your man!!!
megamog75 |
|