ID:143591
 
Code:Magic spell Fire
obj
Magic
icon = 'Magic.dmi'
Fire
icon_state = "Fire"

obj/Magic/Fire
mob/verb/Fire(mob/M in oview(6)) // Ok this will make a verb, which you can call on a mob in oview(6) of the player
var/magic = new/obj/Magic/Fire //This makes a new Fireball object and assigns it to the var magic
missile(magic, src,M) //This calls the missle() proc, and will "throw" the Fireball from the player to the Mob


Problem description:It will not fire the spell and I cant get it to look like its go north, south, east, or west. Plus I dont know how use it for my other spells.

Thanks for reading


Ok i have this so how do I make all of the spells go in my statpannel("Magic")?

obj/Magic/Fire
mob/verb/Fire(mob/M in oview(6)) // Ok this will make a verb, which you can call on a mob in oview(6) of the player
var/magic = new/obj/Magic/Fire //This makes a new Fireball object and assigns it to the var magic
missile(magic, src,M) //This calls the missle() proc, and will "throw" the Fireball from the player to the Mob

obj
Magic
icon = 'Magic.dmi'
Wind
icon_state = "Wind"
Water
icon_state = "Water"
Earth
icon_state = "Earth"
Element_Strike
icon_state = "Element Strike"
Trap
icon_state = "Trap"
Element_Aurora
icon_state = "Element Aurora"
Illumated_Smoke
icon_state = "Illumated Smoke"
Illusion_Smoke
icon_state = "Illusion Smoke"
Smoke
icon_state = "Smoke"
Shadow
icon_state = "Shadow"
Dark_Shadow
icon_state = "Dark Shadow"
Colossal_Shadow
icon_state = "Colossal Shadow"
Blood
icon_state = "Blood"
Blood_Thurst
icon_state = "Blood Thurst"
Blood_Lust
icon_state = "Blood Lust"
Ice
icon_state = "Ice"
Freeze
icon_state = "Freeze"
Frost
icon_state = "Frost"


and I still need help on how to make this code work for all my spells and how to make them look like they are suppose to north, south, east, and west
obj/Magic/Fire
mob/verb/Fire(mob/M in oview(6)) // Ok this will make a verb, which you can call on a mob in oview(6) of the player
var/magic = new/obj/Magic/Fire //This makes a new Fireball object and assigns it to the var magic
missile(magic, src,M) //This calls the missle() proc, and will "throw" the Fireball from the player to the Mob



Thanks for reading
missle makes a vissual effect, it is not a real object being made. here is a sample code:

mob/Spells
Level_Three/verb
Stupefy ()
set category="Spells"
if(usr.confused==1|usr.frozen==1|usr.casting==1)
return
if(usr.wand==1&usr.point==1&usr.icon_state=="wand")
view()<<"<font oclor=red>[usr]<font color=golden> Confringo!"
usr.casting=1
sleep(10)
var/obj/Spells/Level_Two/H = new/obj/Spells/Level_Two/Stupefy //set the bullet to H (H is the bullet)
H.dir = usr.dir
H.loc = src.loc //the bullets(H) location equals the player's location
while(H) //while the bullet is still "alive"
step(H,H.dir) //H steps towards H's direction
var/turf/T = H.loc //for the turf that is in H's location
if(T.density == 1|T.spell_block==1) //if that turfs density = 1 (ex: a wall)
del H //deletes the bullet
usr.casting=0
break //breaks out of the while loop
for(var/mob/D as mob in T) //for and M in that turf
if(D == src) //if that M is the person who fired, it continues as if nothing was there
continue
src<<"You shot [D]!" //says you shot M
D.health-=(src.Magic_Power)
D.Death()
usr.casting=0
del H
for(var/obj/O as obj in T) //for and M in that turf
if(O == H) //if that M is the person who fired, it continues as if nothing was there
continue
if(O.name=="NO_Disapparition")
continue
if(O.destroyable==1)
src<<"You shot [O]!"
flick("boom",O)
sleep(10)
usr.casting=0
del(O)
del H
else
usr.casting=0
del H
sleep(1)


That code came from my being made Harry Potter game btw :D
In response to Lt. Pain
Could you help me write a code that would work for me. becuase I looked at yours but I can't make one