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
wheelman
Novice


Joined: 30 Jan 2006
Posts: 41

PostPosted: Sun Aug 26, 2007 12:28 am   

SpellUp Script help
 
Code:
#CLASS {Wear-Offs}
#ALIAS spell_up {#VAR numspells {%numitems(@spell_holder)};nextspell}
#ALIAS nextspell {#if (@sleep = 0) {wake;cast '%item(@spell_holder, 1)';sleep} {cast '%item(@spell_holder, 1)'}}
#VAR numspells {1} {}
#VAR sleep {1}
#VAR spell_holder {} {}
#VAR spell_success {You feel protected from evil.|You feel righteous.|You feel someone protecting you.|Your feet rise off the ground.|Your eyes tingle.}
#TRIGGER {You feel less protected.} {#additem spell_holder {armor};spell_up}
#TRIGGER {You feel less protected from evil.} {#additem spell_holder {evil protection};spell_up}
#TRIGGER {You feel less righteous.} {#additem spell_holder {bless};spell_up}
#TRIGGER {You no longer move swiftly.} {swift}
#TRIGGER {You no longer see invisible objects.} {#additem spell_holder {detect invis};spell_up}
#TRIGGER {You slowly float to the ground.} {#additem spell_holder {fly};spell_up}
#TRIGGER {You stop covering your tracks.} {cover}
#TRIGGER {You sleep.} {#var sleep 0}
#TRIGGER {You wake and stand up.} {#var sleep 1}
#TRIGGER {You lost your concentration.} {nextspell}
#TRIGGER {{@spell_success}} {#delnitem spell_holder 1;#var numspells {%eval(@numspells-1)};#IF (0<@numspells) {nextspell}}
#CLASS 0


I got it somewhat working, but if 2 spells go off at the same time it casts the first spell twice than casts the next, is there a way to fix that?
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