ID:271352
 
will some1 plesase fix this code its mostly indentation errors.problems mostly at mob verb attack.

mob
var
dead = 0
rLocX
rLocY
rLocZ
respawnSpeed = 150

proc
Die()
if(src.dead)
return 0
src.dead = 1
Respawn()
Respawn()
src.loc = locate(6,6,1)
src.dead = 0

mob/Heartless
New()
. = ..()
spawn(1)
src.rLocX = src.x
src.rLocY = src.y
src.rLocZ = src.z

Die()
if(src.dead)

return
src.dead = 1
src.loc = null
Respawn()
del(src)
Respawn()

var/newHeartlessType = src.type
var/X = src.rLocX
var/Y = src.rLocY
var/Z = src.rLocZ
var/rSpeed = src.respawnSpeed
src = null

spawn(rSpeed)
new newHeartlessType (locate(X, Y, Z))

mob
icon = 'Heartless.dmi'
Heartless
icon_state = "Heartless"


mob
verb
Attack()
if "[usr]" attacks Heartless
var/damage = rand(1,5)
if(prob(70))else
src<<"You attack [M] for [damage] damage!"
M<<"[src] attacks you for [damage] damage!"
M.Health -= damage
if(M.Health <= 0)
del(M)
just use world.repop()

world/New()
spawn() Repopper()
..()



proc/Repopper()
while(world)
sleep(1500)
world.Repop()
In response to Max Omega
where do i add this code?
In response to Vegito SSJ44
Dont rip code from some Kingdom Hearts game?
In response to Kazekage
its mine...........im making a KH game..........
ok top fixed now i need some1 to fix this.

mob
verb
Attack()
if "[usr]" attacks Heartless
var/damage = rand(1,5)
if(prob(70))else
src<<"You attack [M] for [damage] damage!"
M<<"[src] attacks you for [damage] damage!"
M.Health -= damage
if(M.Health <= 0)
del(M)
In response to Vegito SSJ44
ok top fixed now i need some1 to fix this.


mob
verb
Attack()
if "[usr]" attacks Heartless
var/damage = rand(1,5)
if(prob(70))else
src<<"You attack [M] for [damage] damage!"
M<<"[src] attacks you for [damage] damage!"
M.Health -= damage
if(M.Health <= 0)
del(M)
In response to Vegito SSJ44
Have you even read the DM Guide?
In response to Max Omega
just add the code i posted up there anywhere.