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 Goto page 1, 2, 3  Next
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 6:03 pm   

manual sort of database variable?
 
how do i manually sort my database variable? reason i ask... i use a mob_list database to store the mobs and the amount of each in a room, and then i go thru the list to kill them, in order from top to bottom. however, it seems to be sorting the list as it see's fit, and i'd like to control that a little more, to specify which mobs will get hit first. take out the aggro first, i always say!!! thanks in advance!
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Wed Jun 25, 2008 6:11 pm   
 
If you want to do something sequentially then use a list.
a db variable has no inherent order
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 25, 2008 6:15 pm   
 
Actually, you can use the #SORT command to keep a database variable sorted by key value:
Code:
#addkey dbvar Name Zugg
#addkey dbvar Class Fighter
#addkey dbvar Level 20
#loopdb @dbvar {#show %key = %val}

this shows the keys in undefined order. In my test, it showed:
Code:
Level = 20
Name = Zugg
Class = Fighter

but then I sorted the list:
Code:
#SORT dbvar
#loopdb @dbvar {#show %key = %val}

and now it showed the list in sorted order (sorted by key):
Code:
Class = Fighter
Level = 20
Name = Zugg

There is no way to otherwise customize the sort order.


Last edited by Zugg on Wed Jun 25, 2008 6:16 pm; edited 1 time in total
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 6:15 pm   
 
hmmm... looks like i'm kinda screw'd then. i need the db var in order for other items to manipulate the %value... =[
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 25, 2008 6:17 pm   
 
bump because we posted at the same time.

But you might also want to post more details about exactly what you are trying to do. Relying upon the sort order isn't a very good idea in any scripting language (most scripting languages use hash tables and do not have a defined order for the keys). So there is probably a better way to do what you are trying to do.
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 7:14 pm   
 
Ok, fair enough. Here is what I'm trying to accomplish: (long story short of course)
Code:
#var {mob_list} {servant=0|female=0|tormented=0|priest=0|old=0}

#trig {^As ancient as time itself, this spirit stares at your soul.$} {#addkey mob_list old 1;#var bdetect 1;#var bmove 0}
#trig {^A spirit, in the form of a regal priest, no longer leads others to his god.$} {#addkey mob_list priest 1;#var bdetect 1;#var bmove 0}
#trig {^This spirit was once a slave to the god of Telgoran.$} {#addkey mob_list servant 1;#var bdetect 1;#var bmove 0}
#trig {^Somehow, this female spirit still holds the beauty of her past life.$} {#addkey mob_list female 1;#var bdetect 1;#var bmove 0}
#trig {^A phantom wears the ragged remains of its worship robe.$} {#addkey mob_list tormented 1;#var bdetect 1;#var bmove 0}
#trig {^A group of ~[ (%d) ~] priests traverse this plane, and others above.$} {#addkey mob_list priest %1;#var bdetect 1;#var bmove 0}
#trig {^A gathering of ~[ (%d) ~] servants still desire to serve Telgoran.$} {#addkey mob_list servant %1;#var bdetect 1;#var bmove 0}
#trig {^A following of ~[ (%d) ~] spirits are cursed to walk this world forever.$} {#addkey mob_list tormented %1;#var bdetect 1;#var bmove 0}
#trig {^A crowd of ~[ (%d) ~] ancient spirits take you in with a glance.$} {#addkey mob_list old %1;#var bdetect 1;#var bmove 0}
#trig {^~[ (%d) ~] female spirits smile at you and whisper to each other.$} {#addkey mob_list female %1;#var bdetect 1;#var bmove 0}

#alias {act} {#local $nextmob $newval;#loopdb @mob_list {#if (%val > 0) {$nextmob = %key;$newval = %val - 1;#addkey mob_list %key $newval;#break}};#if ($nextmob <> "") {%concat( kill, " ", $nextmob)}}


And, say... I'd rather attack a certain mob off of the @mob_list db variable, it can't figure out how to sort it, so that certain mobs are higher on the list then other ones. Little better? =D
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Jun 25, 2008 7:23 pm   
 
Test each key in the order you want to kill them...
#IF @mob_list.servent {kill servent;#addkey mob_list servent 0} {#IF @moblist.female {kill female;#addkey mob_list female 0} {and so on...

or at least thats one way to do it, not sure if it will fully fit your needs or not.
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 7:30 pm   
 
well, the problem with doing it that way, is that the other area's (which have a TON more mob triggers, so i didn't want to post ALL of them as well) would be very confusing. as it stands, it works, and i can live with it, just getting grainular in how i want the flow of logic and the order that things would be attacked. i had hoped that i would be able to work directly with the @mob_list that is in each area's class, instead of the alias act, which is in a parent directory of the areas, and the same one that is used throughout each different area...
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Jun 25, 2008 7:44 pm   
 
Code:
order_list = {servant=1|female=2}
#LOOPDB @mob_list {
tempcount = @tempcount + 1
   #IF (@order_list.%key = @tempcount) {
      #IF (%val > 0) {
         $nextmob = %key;$newval = %val - 1
         #addkey mob_list %key $newval;#break
      }
   } {
   act
   #BREAK
   }
}
      #if ($nextmob <> "") {
      %concat( kill, " ", $nextmob)
      }

This would require you to keep a seperate list beside @mob_list with the priorities written in as the %val. Also onMove reset tempcount to 0.

Im also not sure if #BREAK should come before act or how I have it, or if theres a better way to handle that part.
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 8:10 pm   
 
awsome! i'll give that a go here in a few minutes, thank you!! =D
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 8:17 pm   
 
hrmmm, just tested it, and it fired off a TON of commands, i think that the #break is in the wrong place, i'll have to experiment here in a lil while when i'm more able to focus on it.... =[
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Jun 25, 2008 8:26 pm   
 
Yeah, i just noticed my logic is wrong, but I think the idea is on the right track... Ill see what I can come up with, its harder when I dont have cmud to test it in.

EDIT: (untested)

Code:

#VAR mob_list {servant=1|female=0}
#VAR order_list {female=1|servant=2}    
#LOOPDB @mob_list {
   #IF %val {
      #FORALL %dbkeys(order_list) {
         #IF (%db(@order_list, %i) = @tempcount) {
            #IF (%i = %key) {
               $nextmob = %key
               #addkey mob_list %key %eval(%val - 1)
               #break
               #break //not sure how you would break out of 2 loops
            } {
               tempcount = @tempcount + 1
            }
         }
      }
   }
}
#IF ($nextmob <> "") {
      #SEND %concat( kill, " ", $nextmob)
}


Last edited by Toxic on Wed Jun 25, 2008 9:06 pm; edited 3 times in total
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Jun 25, 2008 8:53 pm   
 
The only issue I think the above might have is #breaking out of both loops... Maybe someone can clarify if that will work or not.v
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Wed Jun 25, 2008 9:27 pm   
 
Hrmmmm.... Here is the "actual" ACT alias that I'm using...

Code:
#if (@bsleep = 1) {
   #if (@tick <= 4) {
      sleep
      #var bcombat 0
      #var bsleep 10
      }
   }
#if (@bdetect = 1) {
   #var buffmove 1
   buffme
   regenme
   healme
   #IF (@hit_cur >= 1000) {
      #local $nextmob $newval
      #loopdb @mob_list {
         #if %val {
            #forall %dbkeys(order_list) {
               #if (%db(@order_list, %i) = @tempcount) {
                  #if (%i = %key) {
                     $nextmob = %key
                     #addkey mob_list %key %eval(%val - 1)
                     #break
                     #break
                  } {
                     tempcount = @tempcount + 1
                  }
               }
            }
         }
      }
      #IF ($nextmob <> "") {
            #var bdetect 0
            #var bmove 0
            #var bcombat 1
            #send %concat( kill, " ", $nextmob)
      } {
         #var bmove 1
         move
      }
   }
}


I'm noticing that its not attacking anyting... It moves fine, but... Just not attacking anything.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Jun 25, 2008 9:35 pm   
 
#IF ($nextmob <> "") {
#var bdetect 0
#var bmove 0
#var bcombat 1
#send %concat( kill, " ", $nextmob)
} {
#var bmove 1
move
}

Noticing 2 things... first off... Just use #IF $nextmob {...

second... why do you have the %concat? is kill an alias?
either way... just do kill $nextmob
I dont really see a reason to concat them

I figure its an issue here if its moving and not killing...

One thing you could try is...

#IF $nextmob {
#var bdetect 0
#var bmove 0
#var bcombat 1
kill $nextmob
} {
#SHOW Mob: $nextmob
#var bmove 1
move
}

The #SHOW should verify the #IF is working correctly as long as you only see "Mob:" and not "Mob: Blah"

If you still just get "Mob:" and a move then its back up to the part where it actually assigns $nextmob, something is broken.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Jun 25, 2008 9:39 pm   
 
Also I took out the need for $newval... You dont need to #LOCAL it anymore.
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu Jun 26, 2008 2:35 am   
 
Hrmmm... Taking out the #LOCAL, I'm getting an error. The error is a move in the right direction, because its trying to "attack" the mobs that it see's, just something wrong with how its handled I think.

ERROR: Syntax error in Alias: act : invalid local variable: nextmob

Code:
#if (@bsleep = 1) {
   #if (@tick <= 4) {
      sleep
      #var bcombat 0
      #var bsleep 10
      }
   }
#if (@bdetect = 1) {
   #var buffmove 1
   buffme
   regenme
   healme
   #IF (@hit_cur >= 1000) {
      #loopdb @mob_list {
         #if %val {
            #forall %dbkeys(order_list) {
               #if (%db(@order_list, %i) = @tempcount) {
                  #if (%i = %key) {
                     $nextmob = %key
                     #addkey mob_list %key %eval(%val - 1)
                     #break
                     #break
                  } {
                     tempcount = @tempcount + 1
                  }
               }
            }
         }
      }
      #IF $nextmob {
            #var bdetect 0
            #var bmove 0
            #var bcombat 1
            #send %concat( kill, " ", $nextmob)
      } {
         #var bmove 1
         move
      }
   }
}


Oh... I have to do a %CONCAT because yes, the attack is a variable, which is set with another alias (irrelevant, I'm pretty sure)
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Thu Jun 26, 2008 3:02 am   
 
dont take out the whole #LOCAL, just the $newvar part. Heh.
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu Jun 26, 2008 3:12 am   
 
hrmmm.. still not attacking anything, just keeps moving...

Code:
#if (@bsleep = 1) {
   #if (@tick <= 4) {
      sleep
      #var bcombat 0
      #var bsleep 10
      }
   }
#if (@bdetect = 1) {
   #var buffmove 1
   buffme
   regenme
   healme
   #IF (@hit_cur >= 1000) {
      #local $nextmob
      #loopdb @mob_list {
         #if %val {
            #forall %dbkeys(order_list) {
               #if (%db(@order_list, %i) = @tempcount) {
                  #if (%i = %key) {
                     $nextmob = %key
                     #addkey mob_list %key %eval(%val - 1)
                     #break
                     #break
                  } {
                     tempcount = @tempcount + 1
                  }
               }
            }
         }
      }
      #IF $nextmob {
            #var bdetect 0
            #var bmove 0
            #var bcombat 1
            #send %concat( kill, " ", $nextmob)
      } {
         #var bmove 1
         move
      }
   }
}
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Thu Jun 26, 2008 3:49 am   
 
Let me see mud output again? as well as your @mob_list and your @order_list vars
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu Jun 26, 2008 11:50 am   
 
Code:
#var {mob_list} {spirit=0|old=0|tormented=0|female=0|male=0}
#var {order_list {female=1|male=2|tormented=3|old=4|spirit=5}


Do you want to see the error? Or...?
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Thu Jun 26, 2008 2:02 pm   
 
Need to see your mud output that sets the variables...
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu Jun 26, 2008 6:39 pm   
 
This is the output with the old ACT... I'll get the output with the new ACT here in a minute.

A Carved Chamber [ exits: north east south west ]
A spirit, in the form of a regal priest, no longer leads others to his god.
A crowd of [ 2 ] ancient spirits take you in with a glance.
Somehow, this female spirit still holds the beauty of her past life.
This spirit was once a slave to the god of Telgoran.

[Lag: 40] [Align: -96] [ 44471877 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:7166/7166] [E:18010/20070]vici fis servant

The power of your mystical hands (resisted) DISMEMBERS (1377) a religious servant!!
You land [ 12 of 12 ] attacks on a religious servant: RUPTURING (466) damage!
A religious servant falls to the ground! She is dead!
You receive 839,190 (118,447 learn curve, 35,032 role-play) experience.
You get a pile of 25,154 gold.

[Lag: 1040] [Align: -100] [ 45483446 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:7166/7166] [E:17968/20070]invoke 'invigorate'
invoke 'invigorate'
invoke 'invigorate'
invoke 'invigorate'
invoke 'invigorate'
vici fis female


You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.

[Lag: 840] [Align: -100] [ 45483446 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:7116/7166] [E:18157/20070]vici fis priest

You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.

[Lag: 1320] [Align: -100] [ 45483446 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:7066/7166] [E:18346/20070]vici fis old

You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.

[Lag: 1640] [Align: -100] [ 45483446 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:7016/7166] [E:18535/20070]vici fis old

You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.

[Lag: 1640] [Align: -100] [ 45483446 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:6966/7166] [E:18724/20070]east

You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.

[Lag: 1640] [Align: -100] [ 45483446 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:6916/7166] [E:18913/20070]

The power of your mystical hands (resisted) SUNDERS (1547) a female spirit!!
You land [ 14 of 14 ] attacks on a female spirit: lacerating (331) damage!

[Lag: 3240] [Sheykh: (perfect condition)] [female spirit: (mortally wounded)]
[h:35805/35807] [m:100/100] [s:6916/7166] [e:18871/20070]
A female spirit misses [ 5 ] attacks on you!
You land [ 2 of 2 ] attacks on a female spirit: MAIMING (1131) damage!!
A female spirit falls to the ground! She is dead!
You receive 1,327,486 (181,926 learn curve, 54,564 role-play) experience.
You get a pile of 34,987 gold.

[Lag: 1000] [Align: -104] [ 47072162 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:6916/7166] [E:18871/20070]

The power of your mystical hands (resisted) SUNDERS (1622) a priestly spirit!!
You land [ 13 of 13 ] attacks on a priestly spirit: RUPTURING (432) damage!
A priestly spirit falls to the ground! He is dead!
You receive 1,021,568 (142,159 learn curve, 42,328 role-play) experience.
You get a pile of 30,983 gold.

[Lag: 1040] [Align: -108] [ 48300337 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:6916/7166] [E:18829/20070]

The power of your mystical hands (resisted) SUNDERS (1744) an old spirit!!
You land [ 14 of 14 ] attacks on an old spirit: lacerating (370) damage!

[Lag: 3240] [Sheykh: (perfect condition)] [old spirit: (mortally wounded)]
[h:35805/35807] [m:100/100] [s:6916/7166] [e:18787/20070]
An old spirit misses [ 5 ] attacks on you!
You land [ 3 of 3 ] attacks on an old spirit: MUTILATING (744) damage!!
An old spirit falls to the ground! He is dead!
You receive 1,220,174 (167,977 learn curve, 50,272 role-play) experience.
You get a pile of 26,804 gold.

[Lag: 1000] [Align: -112] [ 49767632 ] [Reply: Karmova's Orator]
[H:35805/35807] [M:100/100] [S:6916/7166] [E:18787/20070]

Code:
#trig {~[ exits} {#if (@bkill > 0) {#var bkill 1;#variable bdetect 1;#var bcombat 0;#var bmove 1;resetmobs;#add line 1}}
#trig "normal_prompt" {^~[H:&%dhit_cur/&%dhit_max] ~[M:&%dman_cur/&%dman_max] ~[S:&%dspi_cur/&%dspi_max] ~[E:&%dend_cur/&%dend_max]} {#if (@bkill >= 1) {#if (@bcombat = 0) {#if (@bdetect = 1) {#if (@bmove = 0) {act}};#if (@bmove = 1) {move}}}}
#trig "battle_prompt" {^~[h:&%dhit_cur/&%dhit_max] ~[m:&%dman_cur/&%dman_max] ~[s:&%dspi_cur/&%dspi_max] ~[e:&%dend_cur/&%dend_max]} {#if (@bkill >= 1) {#var bdetect 1;#var bmove 0;#var bcombat 1;#if (@battlehealing = 1) {#if (@lag_cur = 0) {#if (@hit_cur < @hit_min) {bheal} {vicious fist}}}}}
#trig {{You hear the screams of a spirit as it flies by you.|(*) falls to the ground! (%w) is dead!}} {#var bcombat 0;#var bdetect 1}

#trig {^As ancient as time itself, this spirit stares at your soul.$} {#addkey mob_list old 1;#var bdetect 1;#var bmove 0}
#trig {^A spirit, in the form of a regal priest, no longer leads others to his god.$} {#addkey mob_list priest 1;#var bdetect 1;#var bmove 0}
#trig {^This spirit was once a slave to the god of Telgoran.$} {#addkey mob_list servant 1;#var bdetect 1;#var bmove 0}
#trig {^Somehow, this female spirit still holds the beauty of her past life.$} {#addkey mob_list female 1;#var bdetect 1;#var bmove 0}
#trig {^A phantom wears the ragged remains of its worship robe.$} {#addkey mob_list tormented 1;#var bdetect 1;#var bmove 0}
#trig {^A group of ~[ (%d) ~] priests traverse this plane, and others above.$} {#addkey mob_list priest %1;#var bdetect 1;#var bmove 0}
#trig {^A gathering of ~[ (%d) ~] servants still desire to serve Telgoran.$} {#addkey mob_list servant %1;#var bdetect 1;#var bmove 0}
#trig {^A following of ~[ (%d) ~] spirits are cursed to walk this world forever.$} {#addkey mob_list tormented %1;#var bdetect 1;#var bmove 0}
#trig {^A crowd of ~[ (%d) ~] ancient spirits take you in with a glance.$} {#addkey mob_list old %1;#var bdetect 1;#var bmove 0}
#trig {^~[ (%d) ~] female spirits smile at you and whisper to each other.$} {#addkey mob_list female %1;#var bdetect 1;#var bmove 0}

#alias {buffme} {#if (@autobuffrad) {#if (@autorad = 1) {rad;#variable autorad 10}};#if (@autobuffglobe) {#if (@autoglobe = 1) {globe;#variable autoglobe 10}};#if (@autoannstance = 1) {#if (@stanceann = 1) {ann}};#if (@autosymmstance = 1) {#if (@stancesymm = 1) {symm}}}
#alias {healme} {if (@autoheal = 1) {#if (@hit_cur < @hit_min) {#5 heal}}}
#alias {regenme} {#if (@autoregen = 1) {#if (@end_cur < @end_min) {#5 regen}}}

#alias {move} {#if (@bmove = 1) {#var bcombat 0;#var bmove 10;#READ 1 @line}}
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Thu Jun 26, 2008 6:51 pm   
 
hmm, this looks like it should work, I forgot to officially test it when I got home last night, I need to do that. One thing, you MUST reset tempcount = 1 in your move alias. If the tempcount isnt at 1 the first time you run act it probably won't work. Another thing Im noticing is the mob desc which triggers your @mob_list val set to 1 is for a priest. priest isnt an option in @order_list. If your planning on building your @mob_list on the fly, based off your triggers, then in each trigger you need to also do a #ADDKEY order_list mobname priority so that mob_list and order_list always have the same %key's.

Like I said, Ill test this when I get to the house today, first thing.

Also, Im assuming you are either manually calling the alias act after each kill or have it triggered off the death msg?

Also in your move alias I would go ahead and do #LOOPDB @mob_list {#ADDKEY mob_list %key 0}
Just to be safe, and to eliminate errors.

EDIT: Just noticed an error in your ACT alias. It should be #FORALL %dbkeys(@order_list)... not %dbkeys(order_list)
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu Jun 26, 2008 7:12 pm   
 
I forgot the RESETMOBS alias (from the ~[ exits trigger), and I've changed up that trigger a little bit as well (moved it to a class that is disabled when no script is loaded, to remove the check if there is an active check, as I do not need to be checking that trigger otherwise, nor do I need that check when that class is enabled when a script is loaded anyways. The RESETMOBS alias is what resets the mob_list value's to zero. As far as the priest, I was typing that off of memory on my phone, as I didn't have my computer on at the time. Below is the "official" variables. ^^ As far as the calling the ACT alias, it doesn't get called at the death of a mob (#trig {{You hear the screams of a spirit as it flies by you.|(*) falls to the ground! (%w) is dead!}}), instead, I call it off of the "normal_prompt", and the death of a mob just sets some variables that will enable the ACT to be calld (checks and balances, gotta love it). And the critical part, granted this ACT alias works, is that it sets the variable BDETECT to 0, so that each time I get a prompt (spell-ups, someone talking on globals, ect ect) it isn't firing off the ACT until its appropriate.

As far as the building the variable mob_list on the fly, based off of the triggers given... I'm not following you, doesn't the @order_list stay constant, and is the control to how and more importantly WHEN each mob is attacked based off of whats available in the mob_list variable? Thanks for all your help by the way, love the way that this is starting turn out! =D

Code:
#trigger {~[ exits} {#var bkill 1;#variable bdetect 1;#var tempcount 1;#var bcombat 0;#var bmove 1;resetmobs;#add line 1}
#alias {resetmobs} {#addkey mob_list {female=0|old=0|tormented=0|servant=0|priest=0}}
#variable {order_list} {servant=4|female=1|tormented=3|priest=5|old=2}
#variable {mob_list} {servant=0|female=0|tormented=0|priest=0|old=0}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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