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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
kent
Beginner


Joined: 03 Apr 2006
Posts: 29

PostPosted: Sun Apr 16, 2006 7:39 am   

program crashes using this trigger
 
Hello i am having a crashing problem when i got against a Mob the have both items on it body. any ideals what the problem is

You receive 0 experience points.
A dark dwarven mage collapses lifeless to the ground.
You take 442 gold coins.
You take a maleficarum root from the corpse of a dark dwarven mage.
You take a black tourmaline from the corpse of a dark dwarven mage.
The Powers give you one gold coin for your sacrifice of the corpse of a dark dwarven mage.
A dark dwarven mage stops following a cave fisher.

This is the class, trigger routine that is causing the problem

#CLASS {RootsNTourms}
#VAR container2 {gnomish |2.gnomish |3.gnomish |rune |2.rune}
#TRIGGER {^(%d) A gnarled and blackened root is on the ground.} {#var rootsgathered {%1+1}}
#TRIGGER {^(%d) A fist-sized, shiny black stone has been uncovered here.} {#var TourmsGathered {%1+1}}
#TRIGGER {^You take (%d) a black tourmaline from the corpse} {#var TourmsGathered {%1+1}}
#TRIGGER {^You take (%d) a maleficarum root from the corpse} {#var rootsgathered {%1+1}}
#TRIGGER {^The master of clans tells you 'Thank you for the (*) gem} {#var rootsgathered {@rootsgathered-%1}}
#TRIGGER {^A maleficarum root crackles and burns!} {#var rootsgathered {@rootsgathered - 1}}
#TRIGGER {You take a maleficarum root from the corpse of *} {#var RootsGathered {%1+1}}
#TRIGGER {^You aren't carrying anything that will fit into {a|an} (*).} {
#VAR @Container2 %delitem( @container2)
open @container2, 1
put all.root @container2, 1
put all.tourm @container2, 1
close @container2, 1
}
#CLASS 0

I tried it with #WAIT x amount of time between roots & tourm
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sun Apr 16, 2006 12:54 pm   
 
you do have a few problems here but nothing crashable. Your triggers arent right though and you are putting roots into anything yet so i assume you started here and are going to add to it. As it stands right now you must be doing it manually.

heres the changes i would make to begin with or just contact me in game via tamlin

Code:

#TRIGGER {^You take (%d) a black tourmaline from the corpse} {#var TourmsGathered {%1+1}}
#TRIGGER {^You take (%d) a maleficarum root from the corpse} {#var rootsgathered {%1+1}}
#TRIGGER {You take a maleficarum root from the corpse of *} {#var RootsGathered {%1+1}}


i dont remember the exact pattern
You take a maleficarum root from the corpse of a dark dwarven mage.
You take a black tourmaline from the corpse of a dark dwarven mage.
You take 5 of a maleficarum root from the corpse of a dark dwarven mage.
You take 5 of a black tourmaline from the corpse of a dark dwarven mage.

These triggers are off. the first two shouldnt even match i am just typing this one in like i did the last one. It should work fine though.
Also you arent adding to what you should be. if the triggers dont fire off here as expected try removing the .$ i use this a lot to prevent people from doing Drenor tells you 'You take 5 of a black tourmaline from the corpse of Drenor. #CR{Drop all} or whatever. Basically it means end the line here if theres more after it ignore it. I had one for a while that i didnt do this too that would drop my bags if the right context was used. It was a really rare set of code but i found that anchoring the beginning and the end to be far more secure.
Code:

#TRIGGER {^You take (%d) of a black tourmaline from the corpse of *.$} {#var TourmsGathered {@TourmsGathered +%1}}
#TRIGGER {^You take (%d) of a maleficarum root from the corpse of *.$} {#var RootsGathered {@RootsGathered + %1}}
#TRIGGER {^You take a maleficarum root from the corpse of *.$} {#var RootsGathered {@RootsGathered + 1}}
#TRIGGER {^You take a black tourmaline from the corpse of *.$} {#var TourmsGathered {@TourmsGathered+1}}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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