Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
DarkBeo
Newbie


Joined: 17 Mar 2003
Posts: 4
Location: Brazil

PostPosted: 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 {}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Aug 30, 2003 10:11 pm   
 
Please ask questions in the General forum. This forum is reserved for posting FINISHED scripts.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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