Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Tue Mar 10, 2015 5:41 am   

Trigger priority *QUICK* resetting
 
Hi and thanks to all that read and reply to this!!

I have a crazy amount of trigger currently, and due to sloppy scripting I really don't have a way to reduce them as of yet. (But I am working on that!!!)
However, as it is i have over 100+ triggers and it's making my cmud choppy. I went through and removed ALL triggers with just (*) in the capture field as it would fire from anything.
As well as anything remotely like that pattern capture. With what's left I am still experiencing a good amount of client side lag due to the processing. Is there a "quick" or even not so quick way
to reset the trigger priorites and lower the chance of things firing unessicarily slow? I know that ALL my killing blow triggers could be dead last and have the lowest priority to em, while my HPBAR triggers and BUTTON function triggers would have the highest, I've done ALOT of these manually to rest them, but it's daunting.

ANY help would be appreciated!!

thanks.
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Tue Mar 10, 2015 6:23 am   
 
Here's an example of TOO MUCH in a pattern capture, I think it would be faster to make this entire thing into a database variable or string list to call back only the needed parts instead of having to loop through any matches.

#IF %match(%1, "Shadow creature") {monster = "creature"}
#IF %match(%1, "Undead elven hunter") {monster = "hunter"}
#IF %match(%1, "A deer (undead)") {monster = "deer"}
#IF %match(%1, "Undead mountain lion") {monster = "lion"}
#IF %match(%1, "Undead bear") {monster = "bear"}
#IF %match(%1, "A zombie deer") {monster = "deer"}
#IF %match(%1, "Skeletal elf") {monster = "elf";7}
#IF %match(%1, "Undead elf") {monster = "elf"}
#IF %match(%1, "Rotted deer buck") {monster = "deer"}
#IF %match(%1, "Wolf zombie") {monster = "wolf"}
#IF %match(%1, "Elven Hunter-killer") {monster = "elf"}
#IF %match(%1, "Elven Wraith") {monster = "elf";777}
#IF %match(%1, "Elven Ghast") {monster = "elf"}
#IF %match(%1, "Elven Ghoul") {monster = "elf";777}
#IF %match(%1, "Zombie elf") {monster = "elf";777}
#IF %match(%1, "Elven vampiress") {monster = "elf";maim}
#IF %match(%1, "A bear (undead)") {monster = "bear"}
#IF %match(%1, "An elf (undead)") {monster = "elf";77}
#IF %match(%1, "Dark treant (elder)") {monster = "tree";777}
#IF %match(%1, "Rotted deer buck") {monster = "deer"}
#IF %match(%1, "Undead elf") {monster = "elf";77}
#IF %match(%1, "A deer") {monster = "deer"}
#IF %match(%1, "Undead wolf") {monster = "deer"}
#IF %match(%1, "Elven skeleton (undead)") {monster = "elf";7}
#IF %match(%1, "An elven ghoul") {monster = "elf"}
#IF %match(%1, "A skeletal bear") {monster = "bear"}
#IF %match(%1, "A zombie deer") {monster = "deer"}
#IF %match(%1, "Elvish ghast") {monster = "ghast";77}
#IF %match(%1, "Elvish ghoul") {monster = "ghoul";77}
#IF %match(%1, "An elf") {monster = "elf";77}
#IF %match(%1, "Skeletal elven hunter") {monster = "hunter"}
#IF %match(%1, "Mountain lion zombie") {monster = "lion"}
#IF %match(%1, "Elven zombie") {monster = "elf"}
#IF %match(%1, "Will o' wisp (hovering)") {monster = "wisp";7}
#IF %match(%1, "Elven vampire") {monster = "vampire";777}
#IF %match(%1, "A ghast (elvish)") {monster = "ghast"}
#IF %match(%1, "Elven skeleton (undead)") {monster = "elf"}
#IF %match(%1, "Elven zombie") {monster = "elf";77}
#IF %match(%1, "Dark treant (young)") {monster = "tree"}
#IF %match(%1, "Dark treant (adult)") {monster = "tree"}
#IF %match(%1, "Dark treant (elder)") {monster = "tree"}



#IF (%1 = "Will o' wisp (hovering)") {monster = "wisp";7777}
#IF (%1 = "Elven hunter (undead)") {monster = "elf"}
#IF (%1 = "A deer (undead)") {monster = "deer"}
#IF (%1 = "A ghast (elvish)") {monster = "elf"}
#IF (%1 = "Dark wraith (elven)") {monster = "elf"}
#IF (%1 = "Elven libertine (undead)") {monster = "elf"}
#IF (%1 = "Elven skeleton") {monster = "elf";comtrance invoke crushing}
#IF (%1 = "A ghast (elvish)") {monster = "elf";77}
#IF (%1 = "A bear (undead)") {monster ="bear"}
#IF (%1 = "Wolf beast (undead)") {monster = "wolf"}
#IF (%1 = "Undead elven hunter") {monster = "elf"}
#IF (%1 = "A ghoul (elvish)") {monster = "ghoul";77}
#IF (%1 = "Elven vampire (undead)") {monster = "vampire";777}
#IF (%1 = "Dark vampire (elven)") {monster = "elf"}
#IF (%1 = "Elven zombie (undead)") {monster = "elf";77}
#IF (%1 = "Dark wraith (elven)") {monster = "wraith"}
#IF %begins(%1, "Mountain") {monster = "lion"}
#IF %begins(%1, "Wolf") {monster = "wolf"}

ANY suggestions would be helpful, and yes, i've done quite a bit of searching and reading the help files, I'm just not sure how to go about starting this.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Tue Mar 10, 2015 6:37 am   
 
$thisMob=will o' wisp
#ADDKEY mobs.${thisMob} Keyword wisp
#ADDKEY mobs.${thisMob} Number 7777


and so n til you have populated your @mobs variable

then the following trigger should help

#TR {({@mobs})} {monster=@mobs.%1.keyword}
_________________
Discord: Shalimarwildcat
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Wed Mar 11, 2015 3:51 am   
 
now sorry to fumble this too much, i need to add ALL these mobs names the same way as the example you showed correct?

$derthmob=will o' wisp
#addkey dmob.${derthmob} name wisp
#addkey dmob.${derthmob} dmg 777

$derthmob=Elven zombie (undead)
#addkey dmob.${derthmob} name zombie
#addkey dmob.${derthmob} dmg 77

etc etc?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Wed Mar 11, 2015 4:36 am   
 
correct, populating it is likely the most annoting part... you could make an alias to do it of course
_________________
Discord: Shalimarwildcat
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Wed Mar 11, 2015 6:18 am   
 
Well i'm having 2 problems with this structure, the (undead) wont let input the name so i forced it, however after i added the first mob set in my example, it wont add anymore, and i used excactly what i posted. ANy ideas why not?
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Wed Mar 11, 2015 6:27 am   
 
OK it's the (undead) portion that is refusing to be recorded... im unsure why or what would fix it. and in some instances it's necessary to allow it due to mob syntax is specific on my mud.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Wed Mar 11, 2015 9:51 am   
 
Hmmm you could make it an optional portion of the trigger pattern so it doesn't need to be in the variable...

#TR {({@dmob}){ ~({undead|young|adult|etc}~)|}} {do stuff}
_________________
Discord: Shalimarwildcat
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Wed Mar 11, 2015 10:06 am   
 
Literal strings should always be enclosed in double quotes.

Code:
$derthmob="will o' wisp"
#addkey dmob.${derthmob} name "wisp"
#addkey dmob.${derthmob} dmg 777

$derthmob="Elven zombie (undead)"
#addkey dmob.${derthmob} name "zombie"
#addkey dmob.${derthmob} dmg 77
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Wed Mar 11, 2015 9:44 pm   
 
ok changed that,. however when i try and add the name with any parenthesis it says illegal token... how do i circumnavigate that?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Thu Mar 12, 2015 1:38 am   
 
Did you try my method?
From what i can tell the parenthetical information isnt relative to the name
_________________
Discord: Shalimarwildcat
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Mar 13, 2015 7:50 am   
 
Everyone has offered some useful help. You should avoid using %match and %regex the way you have. Both %match and %regex has a significant overhead in data structures before they can even begin to match patterns, and with so many it is a huge expense in time. Placing as much of the information in to a single record variable and using %db to perform the lookup and conversion is much faster.

In order to facilitate switching to a system using a record variable and %db, I took the example data you posted and put it into an ALIAS named EXAMPLEDATA. I then built a conversion routine.
Code:
#SHOW %subregex(%alias(EAXAMPLEDATA),"(^\015\012)|^.*%1(?: ?= ?|, ?)""([^""\(\)]*)(?:(\()([^\)]*)\))?""\) \{monster ?= ?""([^""]*)""(;[^}]+)?\}(?:(\015\012)|\Z)","(?(1)|\2(?(3) {\4})=\5\6(?(7)\|))")
ExampleRecordVariable=%subregex(%alias(EAXAMPLEDATA),"(^\015\012)|^.*%1(?: ?= ?|, ?)""([^""\(\)]*)(?:(\()([^\)]*)\))?""\) \{monster ?= ?""([^""]*)""(;[^}]+)?\}(?:(\015\012)|\Z)","(?(1)|\2(?(3) {\4})=\5\6(?(7)\|))")
I didn't really know what you had going on in the ;XXXXXXX parts so I retained them as is.

You can use %subchar in your trigger to switch the () to {} to match how I converted the data, or follow shalimar's suggestion to eliminate the need to match that data.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Fri Mar 13, 2015 8:45 pm   
 
$thisMob=will o' wisp
#ADDKEY mobs.${thisMob} Keyword wisp
#ADDKEY mobs.${thisMob} Number 7777
with this suggestion (%match/%regex isn't used which is what i went with)
$derthmob=will o' wisp
#addkey dmob.${derthmob} name wisp
#addkey dmob.${derthmob} dmg 777

$derthmob=Elven zombie (undead)
#addkey dmob.${derthmob} name zombie
#addkey dmob.${derthmob} dmg 77

however my only issue with that particular example was the mob names with parenthesis ()

#TR {({@dmob}){ ~({undead|young|adult|etc}~)|}} {do stuff}

grouping would work as well, however most of these mobs ( and not just in the area im using that particular example with require correct syntax to interact/attack etc)

So i won't be using the grouping method...
Now all that being said, i honestly didn't realize the physical call back times for any of the cmud functions, it's alot of a bit over my head at this time.
I appreciate your input however, and will attempt to pick what you suggested apart and to make it work.
Thanks for all your help.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Sat Mar 14, 2015 1:42 am   
 
I'm not sure if you properly understood my 'grouping' as you call it.

Will the 'name' of $thisMob ever be different based on weather this particular instance of the mob is undead, elvish, hovering, young or old?
Will the 'dmg' of $thisMob ever be different based on weather this particular instance of the mob is undead, elvish, hovering, young or old?

If the answer to both of those is 'no' then there is really no point for trying to capture that aspect of the mob.
If the answer is yes, then we can use that information to make another level of depth for the DB variable.

This assumes that you could have all of the following:

A bear
A bear (young)
A bear (old)
A bear (hovering)
A bear (undead)
A bear (elvish)
_________________
Discord: Shalimarwildcat
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Sun Mar 15, 2015 1:42 am   
 
Yes the (nametags) do matter, specifically the damage type needed to kill them is different for each mob.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Sun Mar 15, 2015 2:52 am   
 
$derthmob=Elven zombie
$type=undead
#addkey dmob.${derthmob}.${type} name zombie
#addkey dmob.${derthmob}.${type} dmg 77

#TR {({@dmob}){ ~(({undead|young|adult|etc})~)|}} {
$derthmob=%1
$type=%2
whatever else you need to do
}

If there is no $type, just use the old syntax.
The $type is an optional part of the trigger, so you can test it for having a value as to which syntax you will need on the fly.

#IF ($type) {new syntax} {old syntax}
_________________
Discord: Shalimarwildcat
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Tue Mar 17, 2015 7:51 am   
 
I have an easy, ugly answer and I have a question afterwards.

Ugly answer: Nest your #IF statements instead of making all of them independent. #IF (something) { do this if something is true } { do that if something is false}

If all of your statements are each on their own lines, you can add a { to the end of each line, and add the same number of } at the end of the list. So, if your #IF list was 5 monsters long, you'd have five lines looking this this:

#IF (%match(%1, "Shadow creature")) {monster = "creature"} {

and one line at the end:

}}}}}

The benefits of this:
#1 you don't change the design of the trigger, just add some syntax
#2 on average, if those lines were randomly added, your trigger takes half as long to process
#3 if you organize the #IF statements in order of their frequency of activating, your trigger takes less than half as long to process

The drawbacks of this:
#1 it's ugly
#2 it's still not good code

Question(s):

What is the actual trigger, and what is the actual task you want this trigger to perform when it fires? Coming up with a solution that way might provide better results than trying to fix the contents of the trigger you posted. Even after you've removed all of your (*) triggers, I have a feeling you've got quite a few more overly generic triggers doing way too much computation. Solving this problem from the beginning rather than the end may help you fix all your other triggers.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Tue Mar 17, 2015 9:15 am   
 
Use a #SWITCH before nested #IFs.
_________________
Discord: Shalimarwildcat
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Mar 17, 2015 11:51 am   
 
And a hash table lookup is still even faster than that.
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Tue Mar 17, 2015 8:02 pm   
 
I have tried nesting them, and Unfortunately the monster loading is random and you cannot itemize encounters. To show you the entire script is fine with me. (there's lots to laugh at!!! Laughing Laughing Laughing )
The basis of this post IS to speed up performance from Cmud -> mud as we all know miliseconds count. SO thanks for the help folks... Here is the entire area script.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<class name="derthalas" enabled="false">
<trigger priority="22300">
<pattern>^You cannot go (*)$</pattern>
<value>glance;#NOMAP</value>
</trigger>
<alias name="start">
<value>dertha = 1
step</value>
</alias>
<alias name="step">
<value>%arrget(derthpath, @stepnum);stepnum = @stepnum + 1;#IF (@stepnum > %arrhigh(derthpath)) {stepnum = 0;stop}</value>
</alias>
<alias name="stop">
<value>dertha = 0;#show %ansi(black, bold, blink)BOT STOPPED AT~: %ansi(cyan, bold,blink) Room ~#~(@stepnum~)</value>
</alias>
<var name="dertha">0</var>
<var name="monster">0</var>
<var name="player">1</var>
<var name="room">0</var>
<var name="stepnum">0</var>
<trigger name="derthkb" priority="17260">
<pattern>dealt the killing blow to (*).$</pattern>
<value>#T+ getaylin
#ALA "lbkb" {+2} {#show %ansi(cyan, bold) Advancing Room!;glance} {Alarms|Bot|KB}</value>
</trigger>
<trigger name="derthmob" priority="240">
<pattern>^!(*)$</pattern>
<value>
#CO red
#IF %match(%1, "Skeletal bat") {monster="bat"}
#IF %match(%1, "Undead elven huntress") {monster="elf"}
#IF %match(%1, "Shadow creature") {monster = "creature"}
#IF %match(%1, "Undead elven hunter") {monster = "hunter"}
#IF %match(%1, "A deer (undead)") {monster = "deer"}
#IF %match(%1, "Undead mountain lion") {monster = "lion"}
#IF %match(%1, "Undead bear") {monster = "bear"}
#IF %match(%1, "A zombie deer") {monster = "deer"}
#IF %match(%1, "Skeletal elf") {monster = "elf";7}
#IF %match(%1, "Undead elf") {monster = "elf"}
#IF %match(%1, "Rotted deer buck") {monster = "deer"}
#IF %match(%1, "Wolf zombie") {monster = "wolf"}
#IF %match(%1, "Elven Hunter-killer") {monster = "elf"}
#IF %match(%1, "Elven Wraith") {monster = "elf";777}
#IF %match(%1, "Elven Ghast") {monster = "elf"}
#IF %match(%1, "Elven Ghoul") {monster = "elf";777}
#IF %match(%1, "Zombie elf") {monster = "elf";777}
#IF %match(%1, "Elven vampiress") {monster = "elf";maim}
#IF %match(%1, "A bear (undead)") {monster = "bear"}
#IF %match(%1, "An elf (undead)") {monster = "elf";77}
#IF %match(%1, "Dark treant (elder)") {monster = "tree";777}
#IF %match(%1, "Rotted deer buck") {monster = "deer"}
#IF %match(%1, "Undead elf") {monster = "elf";77}
#IF %match(%1, "A deer") {monster = "deer"}
#IF %match(%1, "Undead wolf") {monster = "deer"}
#IF %match(%1, "Elven skeleton (undead)") {monster = "elf";7}
#IF %match(%1, "An elven ghoul") {monster = "elf"}
#IF %match(%1, "A skeletal bear") {monster = "bear"}
#IF %match(%1, "A zombie deer") {monster = "deer"}
#IF %match(%1, "Elvish ghast") {monster = "ghast";77}
#IF %match(%1, "Elvish ghoul") {monster = "ghoul";77}
#IF %match(%1, "An elf") {monster = "elf";77}
#IF %match(%1, "Skeletal elven hunter") {monster = "hunter"}
#IF %match(%1, "Mountain lion zombie") {monster = "lion"}
#IF %match(%1, "Elven zombie") {monster = "elf"}
#IF %match(%1, "Will o' wisp (hovering)") {monster = "wisp";7}
#IF %match(%1, "Elven vampire") {monster = "vampire";777}
#IF %match(%1, "A ghast (elvish)") {monster = "ghast"}
#IF %match(%1, "Elven skeleton (undead)") {monster = "elf"}
#IF %match(%1, "Elven zombie") {monster = "elf";77}
#IF %match(%1, "Dark treant (young)") {monster = "tree"}
#IF %match(%1, "Dark treant (adult)") {monster = "tree"}
#IF %match(%1, "Dark treant (elder)") {monster = "tree"}
#IF %match(%1, "Will o' wisp (hovering)") {monster = "wisp"}
#IF %match(%1, "Elven hunter (undead)") {monster = "elf"}
#IF %match(%1, "A deer (undead)") {monster = "deer"}
#IF %match(%1, "A ghast (elvish)") {monster = "elf"}
#IF %match(%1, "Dark wraith (elven)") {monster = "elf"}
#IF %match(%1, "Elven libertine (undead)") {monster = "elf"}
#IF %match(%1, "Elven skeleton") {monster = "elf";7}
#IF %match(%1, "A ghast (elvish)") {monster = "elf";77}
#IF %match(%1, "A bear (undead)") {monster ="bear"}
#IF %match(%1, "Wolf beast (undead)") {monster = "wolf"}
#IF %match(%1, "Undead elven hunter") {monster = "elf"}
#IF %match(%1, "A ghoul (elvish)") {monster = "ghoul";77}
#IF %match(%1, "Elven vampire (undead)") {monster = "vampire";777}
#IF %match(%1, "Dark vampire (elven)") {monster = "elf"}
#IF %match(%1, "Elven zombie (undead)") {monster = "elf";77}
#IF %match(%1, "Dark wraith (elven)") {monster = "wraith"}
#IF %begins(%1, "Mountain") {monster = "lion"}
#IF %begins(%1, "Wolf") {monster = "wolf"}



#show %ansi(gray,underline)TARGETING~: %ansi(reset)%ansi(white,brown,bold,high)@monster</value>
</trigger>
<trigger priority="19410">
<pattern>^(*) arrives hunting Whisper.$</pattern>
<value>stop;#beep;#show %ansi(blue,red,bold,blink) OH SNAP!!! hunter want's some more!!!!</value>
</trigger>
<trigger name="playercheck" priority="250">
<pattern>^~*</pattern>
<value>player = 1
#CO bold,white</value>
</trigger>
<trigger name="roomcheck" priority="190">
<pattern>^~~*~(*~)$</pattern>
<value>room = 1
monster = 0
player = 0</value>
</trigger>
<trigger name="roomset" priority="210" prompt="true">
<pattern>^></pattern>
<value>#IF (@room = 1 AND @dertha > 0) {
#IF (@monster != 0 AND @player = 0) {
kill @monster
}
{
step
}
room = 0
monster = 0
player = 0
}</value>
</trigger>
<class name="items">
<trigger priority="428850">
<pattern>^Dark elven mace.$</pattern>
<value>t;a2;ps;ps 2</value>
</trigger>
<trigger priority="428950">
<pattern>Der'Thalasian (*).</pattern>
<value>t;a2;ps;ps 2</value>
</trigger>
<trigger priority="429730">
<pattern>Dark elven rapier</pattern>
<value>t;a2;ps;ps 2</value>
</trigger>
<trigger priority="429780">
<pattern>Dark elven mace.</pattern>
<value>t;a2;ps;ps 2</value>
</trigger>
<trigger priority="686880">
<pattern>Bag.</pattern>
<value>get bag;get all from bag;a2;ps;ps 2</value>
</trigger>
<trigger priority="686890">
<pattern>Dark Elven staff.</pattern>
<value>get staff;a2;ps;ps 2</value>
</trigger>
<trigger priority="697650">
<pattern>Bag ~{(%d)~}.</pattern>
<value>#loop %1 {get bag;get all from bag %i};ps;ps 2;a2</value>
</trigger>
<trigger priority="697880">
<pattern>A shard of treant bark ~{(%d)~}</pattern>
<value>#loop %1 {get bark %i};ps;ps 2;a2</value>
</trigger>
</class>
<trigger priority="487850">
<pattern>The soul floats skyward, disappearing into the dark night.</pattern>
</trigger>
<trigger priority="487860">
<pattern>The elf cries as you release it from its torment.</pattern>
</trigger>
<var name="derthpath" type="Array">|s|s|s|s|sw|s|sw|s|ne|ne|s|n|sw|se|nw|s|sw|e|sw|s|e|n|s|s|ne|s|e|n|s|w|n|s|s|e|u|enter|n|s|out|d|w|n|nw|w|n|nw|w|n|e|n|w|ne|w|nw|w|n|e|ne|e|n|n|w|n|sinkhole|ne|sw|sinkhole|w|s|n|w|w|s|e|s|e|w|s|e|u|w|s|n|n|n|e|s|enter|e|sw|out|e|se|enter|n|s|e|w|out|nw|w|w|s|e|se|enter|out|nw|w|sw|w|w|sw|enter|w|n|se|out|ne|e|e|s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|e|n|e|n|n|w|w|n|n|w|n|n|n|e|s|s|s|s|e|n|n|n|n|s|e|s|s|s|s|s|s|s|s|s|e|n|n|n|n|n|n|e|e|s|w|s|s|s|s|s|s|e|n|e|n|n|n|n|e|n|n|n|n|w|w|w|w|w|w|w|w|n|e|e|e|e|e|n|w|e|e|e|s|e|e|e|e|n|w|w|w|s|s|e|s|s|s|e|n|n|e|n|n|n|e|e|s|e|s|s|s|e|e|e|e|e|e|e|n|e|e|e|n|n|n|n|e|e|ne|ne|n|w|w|n|n|ne|nw|nw|e|ne|ne|e|ne|e|ne|w|ne|n|sw|n|ne|n|ne|ne|ne|n|n|n|n</var>
<class name="Mobs">
<trigger priority="429690">
<pattern>Will o' wisp ~(hovering~)</pattern>
<value>#var monster wisp</value>
</trigger>
<trigger priority="686750">
<pattern>Elven skeleton ~(undead~)</pattern>
<value>monster=elf
777</value>
</trigger>
<trigger priority="687000">
<pattern>A ghast ~(elvish~)</pattern>
<value>monster=ghast</value>
</trigger>
<trigger priority="687090">
<pattern>Dark wraith ~(elven~)</pattern>
<value>monster=wraith</value>
</trigger>
<trigger priority="687140">
<pattern>A bear ~(undead~)</pattern>
<value>monster=bear</value>
</trigger>
<trigger priority="687270">
<pattern>Dark treant ~(young~)</pattern>
<value>monster=tree</value>
</trigger>
<trigger priority="688180">
<pattern>Vampire ~(elven~)</pattern>
<value>monster=vampire;777</value>
</trigger>
<trigger priority="688210">
<pattern>Dark treant ~(elder~)</pattern>
<value>monster=tree;777</value>
</trigger>
<trigger priority="697610">
<pattern>A ghoul ~(elvish~)</pattern>
<value>monster=ghoul</value>
</trigger>
<trigger priority="697790">
<pattern>Elven hunter ~(undead~)</pattern>
<value>monster=hunter</value>
</trigger>
<trigger priority="697810">
<pattern>Dark vampiress ~(elven~)</pattern>
<value>monster=vampire;777</value>
</trigger>
<trigger priority="687270">
<pattern>Dark treant ~(adult~)</pattern>
<value>monster=tree</value>
</trigger>
</class>
<trigger name="derthmob1" priority="240" enabled="false">
<pattern>^!({@dmob}) ~(({Undead|elder|young|adult|Zombie|Elvish|Elven|})~)|$</pattern>
<value>#CO red
$derthmob=%1
$type=%2
#IF %match(%1, "Skeletal bat") {monster="bat"}
#IF %match(%1, "Undead elven huntress") {monster="elf"}
#IF %match(%1, "Shadow creature") {monster = "creature"}
#IF %match(%1, "Undead elven hunter") {monster = "hunter"}
#IF %match(%1, "A deer (undead)") {monster = "deer"}
#IF %match(%1, "Undead mountain lion") {monster = "lion"}
#IF %match(%1, "Undead bear") {monster = "bear"}
#IF %match(%1, "A zombie deer") {monster = "deer"}
#IF %match(%1, "Skeletal elf") {monster = "elf";7}
#IF %match(%1, "Undead elf") {monster = "elf"}
#IF %match(%1, "Rotted deer buck") {monster = "deer"}
#IF %match(%1, "Wolf zombie") {monster = "wolf"}
#IF %match(%1, "Elven Hunter-killer") {monster = "elf"}
#IF %match(%1, "Elven Wraith") {monster = "elf";777}
#IF %match(%1, "Elven Ghast") {monster = "elf"}
#IF %match(%1, "Elven Ghoul") {monster = "elf";777}
#IF %match(%1, "Zombie elf") {monster = "elf";777}
#IF %match(%1, "Elven vampiress") {monster = "elf";maim}
#IF %match(%1, "A bear (undead)") {monster = "bear"}
#IF %match(%1, "An elf (undead)") {monster = "elf";77}
#IF %match(%1, "Dark treant (elder)") {monster = "tree";777}
#IF %match(%1, "Rotted deer buck") {monster = "deer"}
#IF %match(%1, "Undead elf") {monster = "elf";77}
#IF %match(%1, "A deer") {monster = "deer"}
#IF %match(%1, "Undead wolf") {monster = "deer"}
#IF %match(%1, "Elven skeleton (undead)") {monster = "elf";7}
#IF %match(%1, "An elven ghoul") {monster = "elf"}
#IF %match(%1, "A skeletal bear") {monster = "bear"}
#IF %match(%1, "A zombie deer") {monster = "deer"}
#IF %match(%1, "Elvish ghast") {monster = "ghast";77}
#IF %match(%1, "Elvish ghoul") {monster = "ghoul";77}
#IF %match(%1, "An elf") {monster = "elf";77}
#IF %match(%1, "Skeletal elven hunter") {monster = "hunter"}
#IF %match(%1, "Mountain lion zombie") {monster = "lion"}
#IF %match(%1, "Elven zombie") {monster = "elf"}
#IF %match(%1, "Will o' wisp (hovering)") {monster = "wisp";7}
#IF %match(%1, "Elven vampire") {monster = "vampire";777}
#IF %match(%1, "A ghast (elvish)") {monster = "ghast"}
#IF %match(%1, "Elven skeleton (undead)") {monster = "elf"}
#IF %match(%1, "Elven zombie") {monster = "elf";77}
#IF %match(%1, "Dark treant (young)") {monster = "tree"}
#IF %match(%1, "Dark treant (adult)") {monster = "tree"}
#IF %match(%1, "Dark treant (elder)") {monster = "tree"}
#IF %match(%1, "Will o' wisp (hovering)") {monster = "wisp"}
#IF %match(%1, "Elven hunter (undead)") {monster = "elf"}
#IF %match(%1, "A deer (undead)") {monster = "deer"}
#IF %match(%1, "A ghast (elvish)") {monster = "elf"}
#IF %match(%1, "Dark wraith (elven)") {monster = "elf"}
#IF %match(%1, "Elven libertine (undead)") {monster = "elf"}
#IF %match(%1, "Elven skeleton") {monster = "elf";7}
#IF %match(%1, "A ghast (elvish)") {monster = "elf";77}
#IF %match(%1, "A bear (undead)") {monster ="bear"}
#IF %match(%1, "Wolf beast (undead)") {monster = "wolf"}
#IF %match(%1, "Undead elven hunter") {monster = "elf"}
#IF %match(%1, "A ghoul (elvish)") {monster = "ghoul";77}
#IF %match(%1, "Elven vampire (undead)") {monster = "vampire";777}
#IF %match(%1, "Dark vampire (elven)") {monster = "elf"}
#IF %match(%1, "Elven zombie (undead)") {monster = "elf";77}
#IF %match(%1, "Dark wraith (elven)") {monster = "wraith"}
#IF %begins(%1, "Mountain") {monster = "lion"}
#IF %begins(%1, "Wolf") {monster = "wolf"}



#show %ansi(gray,underline)TARGETING~: %ansi(reset)%ansi(white,brown,bold,high)@monster</value>
</trigger>
</class>
</cmud>
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Mar 18, 2015 5:03 am   
 
You should post some actual mud output including a few steps and killing a few things. Some of the trigger are very open ended and speed might be gained by making a tighter pattern. The main slow down is that trigger with so many %match calls, and it would see that you have replicated some portions of what you wanted in that trigger in separate triggers.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net