world
mob = /mob/player
turf = /turf/floor/grass
client
North()
South()
East()
West()
Northwest()
Northeast()
Southwest()
Southeast()
atom
Click()
switch(type)
if(/mob)
set src in oview(1)
if (usr:attack == 1)
damage = usr:str - src.def
src.health -= damage
usr << "You damage [src] for [damage] health!"
src.DeathCheck()
usr:attack = 0
usr.client.mouse_pointer_icon = null
else
usr.client.mouse_pointer_icon = null
mob
player
var
move = 0
attack = 0
str = 5
def = 2
damage
health = 10
icon = 'player.dmi'
proc
DeathCheck()
if(src.health <= 0)
world << "[src] was killed!"
del(src)
obj
hud
layer = MOB_LAYER + 1
icon = 'hud.dmi'
move
icon_state = "walk_to"
Click()
usr.client.mouse_pointer_icon = icon('mouse.dmi',"move_to")
usr:move = 1
New(client/C)
screen_loc = "1,1"
C.screen += src
attack
icon_state = "attack"
Click()
usr.client.mouse_pointer_icon = icon('mouse.dmi',"attack")
usr:attack = 1
New(client/C)
screen_loc = "2,1"
C.screen += src
client/New()
..()
new/obj/hud/move(src)
new/obj/hud/attack(src)
P.S. I get these errors with the switch statement up top:
Legacy of Lukai, The Secrets Within.dm:21:error:damage:undefined var
Legacy of Lukai, The Secrets Within.dm:22:error:damage:undefined var
Legacy of Lukai, The Secrets Within.dm:23:error:damage:undefined var
Legacy of Lukai, The Secrets Within.dm:21:error:src.def:undefined var
Legacy of Lukai, The Secrets Within.dm:22:error:src.health:undefined var
Legacy of Lukai, The Secrets Within.dm:24:error:src.DeathCheck:undefined proc
This is the problem:
atom
Click()
switch(type)
if(/mob)
Move the Click() proc under mob, and take out the switch an if statements, restructuring accordingly. Also "set src" is meaningless under Click(), as it is for verbs. Furthermore, you can not set it condtionally (under an "if" statement).
There may be more problems... I only had time to skim through.