Here is what I need:
A stat panel, which only shows up to specific classes called "Spellbook", which contains scrolls that spellcasters get from killing monsters (or each other.)
From this stat panel, they can use the verbs associated with that scroll. Here is an example:
obj
spell
icon = 'shopicons.dmi'
icon_state = "spells"
layer = 1
spell = TRUE
stackable = TRUE
Firestorm
verb
prepare()
if(usr.guneqed != null)
usr <<"You already have something in your hands."
else if(usr.meleeeqed != null)
usr <<"You already have something in your hands."
else if(usr.spellprepared!=null)
usr <<"You have another spell prepared!"
else
usr.spellprepared = name
usr.spellbon = 100
unprepare()
if (usr.spellprepared != name)
usr <<"You do not have that spell prepared."
else
usr.spellprepared = null
usr.spellbon = 0
cast()
usr.DistanceTo(usr)
if (usr.target == null)
usr << "Please select a target."
else if (usr.target.HP <= 0) //if M's HP are at or below 0...
usr << "[usr.target] is already dead!"
else if (usr.dist > usr.intelligence)
usr << "The target is too far away!"
else if (usr.HP <= 0)
usr << "You are dead!"
else if (usr.meleeeqed != null)
usr << "You can not use melee attacks with a gun!"
else if (usr.guneqed != null)
usr << "You have a gun equiped!"
else if (usr.spellprepared != name)
usr << "You have the wrong spell prepared."
else if (usr.attackfree == 1)
usr << "You must wait for your current attack to finish"
else
usr.dir = get_dir(usr,usr.target)
flick("casting",usr) //show another icon
usr.attackfree = 1
usr.Delay(5)
sleep(2)
usr.AttackFree(usr)
for(var/mob/M in range(1,usr.target))
missile(/obj/firestorm, usr, M)
spawn()M.HitCheckMagic(usr)
M.overlays += /obj/overlay/explosion
sleep(3)
M.overlays -= /obj/overlay/explosion
How do I do this?
Edit: Figured I'd be a little more helpful.