wheelman Novice
Joined: 30 Jan 2006 Posts: 41
|
Posted: 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? |
|