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


Joined: 10 Apr 2007
Posts: 1

PostPosted: Tue Apr 10, 2007 3:59 pm   

Disarm trigger
 
My scripting skills are non-existant, so I'd love if someone could help me out here.

I have a disarm trigger that works fine -

#TRIGGER {(*) flies from your grasp} {#COLOR orange;#VAR num %numwords( %1);get %word( %1, @num);hold %word( %1, @num)}

But, if I get disarmed while casting a spell it won't work because I can't pick stuff up while casting.

Is it possible to repeat the command when the spell-finishing message is recieved?

The message you get while casting is 'You are busy casting a spell.' (minus the quotes and not always on a new line) and the spell finish message is 'You utter the final words of the incantation.'
Reply with quote
Qaiia
Wanderer


Joined: 06 Apr 2007
Posts: 59

PostPosted: Tue Apr 10, 2007 4:36 pm   
 
Take a look at #COND, maybe?
_________________
Citrus: The Juicy Alternative
Reply with quote
Wyndle
Beginner


Joined: 28 Mar 2007
Posts: 20
Location: < here and there >

PostPosted: Tue Apr 10, 2007 6:21 pm   
 
As a fellow low-level scripter, my advice would be to create a var for spellcasting. When you cast a spell trigger the var to become 1 and when the spell is done trigger it to 0. Then try something like:
Code:
#VAR spellcasting 0
#TRIGGER {You begin an incantation} {#VAR spellcasting 1}
#TRIGGER {You utter the final words of the incantation.} {#VAR spellcasting 0}
#TRIGGER {(*) flies from your grasp} {#IF (@spellcasting = 0) {#COLOR orange;#VAR num %numwords( %1);get %word( %1, @num);hold %word( %1, @num)} {#ALARM +5 {#COLOR orange;#VAR num %numwords( %1);get %word( %1, @num);hold %word( %1, @num)}}
You can adapt this in any way or even just adjust the alarm time for the average length of your spellcasting.

Edit: I forgot to mention that setting your spellcasting state in that fashion also leaves it available to be checked by any other code you want to write.
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