ID:142397
 
Code:
obj
spike
icon = 'rockspike.dmi'
icon_state = ""
density = 1
New()
spawn(100)
del src
Bump(A)
if(ismob(A))
var/mob/M = A
if(M == src.Gowner)
del src
return
if(M.ispedal)
del src
return
var/mob/O = src.Gowner
var/damage = O.attack * 2
if(damage < 1)
damage = 1
M.health -= damage
if(M.enemy)
O.hollowprotection = 1
M.frozen = 1
view(O,8) << "<b><font color = red>[O] hit [M] with his Spikes for [damage] damage!"
M.Death(O)
sleep(90)
M.frozen = 0
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)

mob
Fighting
verb
Throw_Spikes()
set name = "Throw Spikes"
set category = "Fighting"
if(usr.safe)
usr << "<b>You are in safe zone!"
return
if(usr.rei <= 2000)
usr << "<b>Your reiatsu is too low!"
return
if(!usr.firing)
usr.rei -= 2000
usr.firing = 1
if(usr.dir == NORTH)
var/obj/stone/A = new /obj/spike/
var/obj/stone2/B = new /obj/spike2/
var/obj/stone1/C = new /obj/spike1/
A.loc = locate(usr.x, usr.y, usr.z)
C.loc = locate(usr.x+1, usr.y, usr.z)
B.loc = locate(usr.x-1, usr.y, usr.z)
A.dir = NORTH
B.dir = NORTH
C.dir = NORTH
A.Gowner = usr
B.Gowner = usr
C.Gowner = usr
walk(A,NORTH)
walk(C,NORTH)
walk(B,NORTH)
if(usr.dir == SOUTH)
var/obj/stone/A = new /obj/spike/
var/obj/stone1/B = new /obj/spike1/
var/obj/stone2/C = new /obj/spike2/
A.loc = locate(usr.x, usr.y, usr.z)
C.loc = locate(usr.x+1, usr.y, usr.z)
B.loc = locate(usr.x-1, usr.y, usr.z)
A.dir = SOUTH
B.dir = SOUTH
C.dir = SOUTH
A.Gowner = usr
B.Gowner = usr
C.Gowner = usr
walk(A,SOUTH)
walk(C,SOUTH)
walk(B,SOUTH)
if(usr.dir == WEST)
var/obj/stone1/A = new /obj/spike1/
var/obj/stone2/B = new /obj/spike2/
var/obj/stone/C = new /obj/spike/
A.loc = locate(usr.x, usr.y+1, usr.z)
C.loc = locate(usr.x, usr.y, usr.z)
B.loc = locate(usr.x, usr.y-1, usr.z)
A.dir = WEST
B.dir = WEST
C.dir = WEST
A.Gowner = usr
B.Gowner = usr
C.Gowner = usr
walk(A,WEST)
walk(C,WEST)
walk(B,WEST)
if(usr.dir == EAST)
var/obj/stone1/A = new /obj/spike1/
var/obj/stone2/B = new /obj/spike2/
var/obj/stone/C = new /obj/spike/
A.loc = locate(usr.x, usr.y-1, usr.z)
C.loc = locate(usr.x, usr.y, usr.z)
B.loc = locate(usr.x, usr.y+1, usr.z)
A.dir = EAST
B.dir = EAST
C.dir = EAST
A.Gowner = usr
B.Gowner = usr
C.Gowner = usr
walk(A,EAST)
walk(C,EAST)
walk(B,EAST)
sleep(60)
usr.firing = 0


Problem description:

Ok when it says stone 1 and stone 2 those codes are the exact same as the normal stone just different icons technically but anywho i have 2 codes like this, this one and just a tiny different one but it gives me 114 errors ranging from undefined type to variable defined but not used any clues to where i may of messed up? I tried looking for messed up indentention but i couldnt find anything...

Well, firstly, the indentation on that code is way off. Secondly, what the hell are you even trying to do? That code is almost certainly excessive.
In response to Popisfizzy
actually no its not off... if u had the code u would see some of its tabbed and some spaced.. also for the code im trying to make it shoot 3 rows of spikes horizontally when your facing north or south and vertically east or west
In response to SadoSoldier
You should go all tabs or all spaces, not mixing and matching.

As for making the spikes, it's not terribly difficult.
atom
proc/Bumped(atom/movable/bumper)
Bump(atom/a)
a.Bumped(src)
..()

obj/spike
New()
spawn() Movement()

Bumped(mob/m)
if(istype(m)) m.health -- //Or whatever.
del src

proc/Movement()
while(1)
sleep(10) //Pause between movement.
step(src, dir) //Make them move in the direction
//they're facing.

mob/proc/spike_shot()
if(dir == EAST)
for(var/a = -1, a <= 1, a ++)
new/obj/spike/s(locate(x + 1, y + a, z))

else if(dir == WEST)
for(var/a = -1, a <= 1, a ++)
new/obj/spike/s(locate(x - 1, y + a, z))

else if(dir == NORTH)
for(var/a = -1, a <= 1, a ++)
new/obj/spike/s(locate(x + a, y + 1, z))

else if(dir == SOUTH)
for(var/a = -1, a <= 1, a ++)
new/obj/spike/s(locate(x + a, y - 1, z))
var/list/turfs = list()
turfs += loc
turfs += get_step(loc, turn(dir, 90))
turfs += get_step(loc, turn(dir, -90))
for(var/turf/T in turfs)
var/obj/O = new(T)
O.owner = src
walk(O, dir)