DarkBeo Newbie
Joined: 17 Mar 2003 Posts: 4 Location: Brazil
|
Posted: Sat Aug 30, 2003 9:30 pm
why they %delitem this not functioning |
#ALIAS addspell {spellup_spell_name="";#IF (%numwords( @spellup_list, "|")>0) {#ECHO {Current spellnames:};#LOOP 1,%numwords( @spellup_list, "|") {#ECHO %word( @spellup_list, %i, "|")}} {#ECHO No spells listed.};#prompt spellup_spell_name "Enter the spell name";spellup_list=%additem( @spellup_list, @spellup_spell_name);spellup_list=%replace( @spellup_list, ~")}
why alias does not function? it does not remove spell of the list
#ALIAS remspell {spellup_spell_name=%pick("p:Select the spell you want to delete:",@spellup_list);#IF (@spellup_spell_name != "") {spellup_list=%delitem(@spellup_spell_name,@spellup_list)} {#ECHO You must select a spell to delete!}}
#ALIAS listspells {#IF (%numwords(@spellup_list,"|")>0) {#ECHO {Current spellnames:};#LOOP 1,%numwords(@spellup_list,"|") {#ECHO %word(@spellup_list,%i,"|")}} {#ECHO No spells listed.}}
#ALIAS spellup {spellup_list=%replace( @spellup_list, ~");spellup_temp=@spellup_list;#T+ spellup;#T+ success;af}
#ALIAS spell_setup {#yesno (Do you wish to add or remove a spell?) {Add:addspell} {Remove:remspell}}
#ALIAS spellup_castspells {#T+ spellup_success;#LOOP 1,%numwords(@spellup_temp,"|") {c ~'%word(@spellup_temp,%i,"|")~'}}
#TRIGGER {You are not affected by any spells.} {#T- spellup;spellup_castspells} {spellup}
this is to trigger that it removes the magic if you already will be with it
#TRIGGER {Spell: (*):} {spellup_spell_name=%trimright(%1);#IF (%ismember(@spellup_spell_name,@spellup_temp)) {spellup_temp=%delitem(@spellup_spell_name,@spellup_temp)}} {spellup}
#TRIGGER {You are not affected by any skill modifiers} {#IF (@spellup_temp != "") {spellup_castspells};#T- spellup} {spellup}
#TRIGGER {Skill/Spell modifiers} {#IF (@spellup_temp != "") {spellup_castspells};#T- spellup} {spellup}
#TRIGGER {You lost your concentration while trying to cast (*).} {cast '%1'} {spellup_success}
#TRIGGER {You don't have enough mana} {#T- spellup_success;#ECHO Ran out of mana.} {spellup_success}
#TRIGGER {You don't know any spells of that name.} {#T- spellup_success;#ECHO Check the spelling of your spells!} {spellup_success}
#T- spellup
#T- spellup_success
#VAR spellup_list {}
#VAR spellup_temp {}
#VAR spellup_spell_name {} |
|