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
Mise
Newbie


Joined: 12 Aug 2011
Posts: 2

PostPosted: Fri Aug 19, 2011 2:14 pm   

Failing Script, any ideas?
 
Hi all,

I got this Zmud 7 script of a friend and loaded it in my Cmud but it doesnt work as intended and I am not bright enough to figure out why. What it should do is it should try to rob all the mobs in a room. What it does is only do one. I created a simple Robon and Robobb to set #class simplerob to 1 or o

here it is:
#CLASS {simplerob} {setdef}
#VAR rnum {2} {2}
#PATH roblost {dudeswenwsnwsew2n2eden3wsnwsewsensenw3es4ws4es4wdws6en6wn6en6wn6en6wn6e}
#TRIGGER {~[Exits~: *~]} {
#var rnum {2} {2} {simplerob}
rob @rnum.
}
#TRIGGER {has nothing special to rob.} {
#add rnum 1
rob @rnum.
}
#TRIGGER {Rob who?} {
#var rnum {2} {2} {simplerob}
#ok
}
#TRIGGER {You cannot rob players.} {
#add rnum 1
rob @rnum.
}
#CLASS 0
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Fri Aug 19, 2011 5:22 pm   
 
It looks like the script works. I suggest you start with the has nothing to rob trigger and make sure it's firing on text sent from the mud. Add a #print fired into the trigger to check. It sounds like either one of the trigger patterns isn't matching correctly or it's an issue with the trigger on newline/trigger on prompt settings of the trigger.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Aug 19, 2011 8:38 pm   
 
I don't see a trigger to rob the next mob if the first rob is successful. Is that the problem?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Aug 19, 2011 9:39 pm   
 
I thought the same thing, Rahab. I'm pretty sure that you can rob the mob multiple times, which is where the [Exits: *] comes into play. But then again, it's always resetting it... so maybe our line of thinking was correct...
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