Drake1132 Newbie
Joined: 04 Aug 2005 Posts: 3
|
Posted: Thu Aug 04, 2005 9:06 pm
Need help with multiline capture... |
First off, if this question has already been answered, I apologize, but I'm at work right now and don't have time to peruse 100 threads just to find out, and since I don't have a computer at home right now I can't wait til I get home to peruse 100 threads either. So if this HAS been answered before (which I kind of expect that it has, even if indirectly) please just link to the messages I need to pay particular attention to.
OK, so on to my question... I'm trying to make a multiline text capture script, and I'm new to zmud and new to scripting so I'm having a bit of trouble with it (probably no real surprise).
Basically here's what I want to do... The particular mud in question does not display the condition of the enemy mob during each combat round as most muds do. Instead, in order to get that information you actually have to "look <mobname>" periodically during combat in order to see a rough description of their health condition. Now making a timer to do this isn't all that hard... (alarm every 5 or 10 seconds or so, if incombat condition is true, look at target, else not -- that sort of thing). But what I want to do is make it so that every time the alarm goes off, if the incombat condition is true (variable =1) it enables a particular class of triggers, then looks at the target (specified by the @target variable which is set by a trigger when "kill mobname" is typed).
Now then, what I want is for this newly enabled class to have two triggers... The first trigger would be set off by the "look @target" command and would start text capturing to a child window (#C+ windowname), turn on #GAGON in the main window, and then issue the command "endlook" which is purely used to set off the second trigger. The endlook command will create a mud return of a particular string, which I can then use as the second trigger pattern. This second trigger would #GAGOFF 0, then #C- (to end text capture). If the incombat condition is false however, it disables the class for those two triggers so that they don't go off inadvertantly.
The idea here is to make it so that when I periodically look at my enemy to see what their health condition is (and decide if I need to run or not), that the text from the "look @target" command (which consists of a lot more information thatn just health condition and gets quickly and easily lost among battle spam) is dumped into a seperate window, but all other text before and after it remains in the main window.
So, I haven't been able to get this to work... in fact it seems that the two triggers present in the class aren't being triggered, even though the patterns are being matched.
So following is the script I currently have...
Code: |
#VAR target {self} {self}
#VAR InCombat {0} {0}
#TRIGGER {kill (%x)} {target=%1;InCombat=1}
#TRIGGER {look @target} {#C+ MobCombatHealth;#GAGON;endlook} "MobCombatHealth"
#TRIGGER {Arglebargle, glop-glyf!?!} {#GAGOFF;#C-} "MobCombatHealth"
#TRIGGER {kill (%x)} {target=%1;InCombat=1}
#TRIGGER {You recieved %d experience points.} {InCombat=0}
#TRIGGER {@target*bloodloss*$} {InCombat=0}
#TRIGGER {@target*flee*$} {InCombat=0}
#ALARM {-*:*:*10} {IF(@InCombat=1) {#CLASS MobCombatHealth 1} {#CLASS MobCombatHealth 0};IF(@InCombat=1) {look @target}}
|
If anyone has any suggestions or can point me to another thread where I can find some info, I would appreciate any help offered.
Drake |
|