@create Buster Sword=10 &SLOTS Buster Sword=2 &SLOT-1 Buster Sword=Empty &SLOT-2 Buster Sword=Empty @parent Buster Sword= @create Fire Materia=10 &APNEXT Fire Materia=1000 &MAXLEVEL Fire Materia=4 &ABILITY-FIRE Fire Materia=Fire|1|0|50|fire|A fireball flies from [name(%0)]'s hands at [name(%1)]. &ABILITY-FIRE2 Fire Materia=Fire 2|2|1000|70|fire|A massive fireball descends from the skies and explodes around [name(%1)]. &ABILITY-FIRE3 Fire Materia=Fire 3|3|3000|100|fire|Fire simply flows from the air around [name(%1)] and engulfs [gsub(%1,s)] in sheets of flame, like the covers on a bed. &MASTER Fire Materia=35000 @parent Fire Materia= @create Generic Weapon=10 &EQUIP-MATERIA Generic Weapon=$place * in * on *:@switch strmatch(%2,name(me))=1,{@switch and(hastype(%0,thing),match(lcon(%#),*[num(%0)]*))=1,{@switch hasattrp(%0,materia)=1,{@switch lte(%1,v(slots))=1,{@switch not(strmatch(v(slot-%1),Empty))=1,{@pemit %#=A materia orb's already in that slot.},{@teleport/quiet %0=me; &slot-%1 me=[num(%0)]; @pemit %#=Your [name(%0)] has been placed in slot %1.}},{@pemit %#=That slot doesn't exist on [name(me)].}},{@pemit %#=That's not a materia orb.}},{@pemit %#=That's either not a valid object, or you're not carrying the Materia in your inventory.}} &LIST-MATERIA Generic Weapon=$list materia on *:@switch strmatch(name(me),%0)=1,{@pemit %#=[ansi(g,All Materia on [name(me)]:)]; @dolist lattr(me/slot-*)={@pemit %#=[ansi(y,Slot #@)]: [name(v(##))]}} &REMOVE-MATERIA Generic Weapon=$remove * from * on *:@switch strmatch(name(me),%2)=1,{@switch match(lcon(me),*[num(%0)]*)=1,{@switch hasattr(me,slot-%1)=1,{@switch strmatch(v(slot-%1),num(%0))=1,{&slot-%1 me=Empty; @teleport/quiet [num(%0)]=%#; @pemit %#=You have removed [name(%0)] from slot %1.},{@pemit %#=That materia isn't in that slot.}},{@pemit %#=That slot doesn't exist on this [name(me)].}},{@pemit %#=This materia isn't in any of the slots in this [name(me)].}} &CAST-MAGIC Generic Weapon=$cast * on *:@dolist lattr(me/slot-*)={@switch isdbref(v(##))=1,{@switch hasattr([v(##)],ability-%0)=1,{@trigger [v(##)]/cast-spell=%0,%#,[locate(%#,%1,*)]}}} @Use Generic Weapon=~ Commands for your [name(me)] ~%rplace in on %rremove from on %rcast on @set Generic Weapon=SAFE @create Generic Magic Materia=10 &CAST-SPELL Generic Magic Materia=@switch not(hasattr(me,ability-%0))=1,{@pemit %1=That spell doesn't exist on [name(me)].},{@switch gte(v(level),u(fn_level,v(ability-%0)))=1,{@switch nearby(%1,%2)=1,{@remit loc(%1)=[name(%1)] prepares to cast [u(fn_truename,[v(ability-%0)])] on [name(%2)].; @wait 3={@remit loc(%1)=[name(%1)] casts [u(fn_truename,[v(ability-%0)])]!; &tmp_emit me=[u(fn_emit,[v(ability-%0)])]; @remit loc(%1)=[u(tmp_emit,%1,%2)]; &ap me=[add(v(ap),rand(u(fn_maxap,[v(ability-%0)])))]; @switch gte(v(ap),v(apnext))=1,{@pemit %1=[name(me)] gained a level!; @switch lt(v(level),v(maxlevel))=1,{&level me=[add(v(level),1)]; @dolist lattr(me/ability-*)={@switch eq(v(level),u(fn_level,v(##)))=1,{&apnext me=[u(fn_ap,v(##))]}}},{@switch eq(v(level),v(maxlevel))=1,{@pemit %1=You mastered [name(me)]!; @wait 2={@pemit %1=[name(me)] has been born.; @clone me}}}}}},{@pemit %1=You aren't even near that person.}},{@pemit %1=The level of this [name(me)] materia isn't high enough.}} &NOTES Generic Magic Materia=Parameters for CAST-SPELL: %0 - Spell Name, %1 - Enactor, %2 - Victim &NOTES2 Generic Magic Materia=Attributes: Spells, LEVEL, AP, APNEXT, MAXLEVEL, MATERIA -- for each spell, there will be six items: true name, necessary level, AP needed to use this spell level, maximum AP gained from using this spell, element, and emit message (Code can be embedded in the emit message, so you could use pemit(), etc. to do more with the spell.). &NOTES3 Generic Magic Materia=Remember that there are five varieties of Materia (i.e. the MATERIA attribute): Magic, Summon, Command, Independent, and Support. &FN_TRUENAME Generic Magic Materia=[elements(%0,1,|)] &FN_LEVEL Generic Magic Materia=[elements(%0,2,|)] &FN_AP Generic Magic Materia=[elements(%0,3,|)] &FN_ELEMENT Generic Magic Materia=[elements(%0,5,|)] &FN_EMIT Generic Magic Materia=[elements(%0,6,|)] &MATERIA Generic Magic Materia=magic &LEVEL Generic Magic Materia=1 &AP Generic Magic Materia=0 &FN_MAXAP Generic Magic Materia=[elements(%0,4,|)] @Aclone Generic Magic Materia=&level me=1; &ap me=0; @dolist lattr(me/ability-*)={@switch u(fn_level,v(##))=2,{&apnext me=[u(fn_ap,v(##))]}}; @teleport/quiet me=[room(me)] @set Generic Magic Materia=SAFE