mob
Login()
..()
src.spells += new /obj/spell/HPHeal()
verb/Spells()
src.currentSpell = input("Which spell would you like to cast?","Select Spell") in spells
if(!src.currentSpell.needsTarget)
src.currentSpell.Cast(src)
var
Level = 1
Exp = 0
MExp = 50
HP = 10 //health
MHP = 10 //max health
MP = 10 //mana
MMP = 10 // max mana
Wealth = 0 //your gold
Attack = 1 //attack level
MAttack = 1 //max attack level
Strength = 1
MStrength = 1
Defense = 1
MDefense = 1
strength
defense
var/list/spells[0]
var/obj/spell/currentSpell = "None"
mob
enemy
bug
icon = 'bug.dmi'
HP = 25
Wealth = 50
Login()
icon = 'person.dmi'
loc = locate(1,1,1)
..()
proc
DeathCheck() //check to see if they are dead
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging
del src
Levelup()
if(src.Exp >= src.MExp)//If your exp equals, or passes your maxexp var
src.Level += 1//Add to your level
src.Exp = 0//resets your exp to 0
src.MExp *= 2//makes your maxexp double
src.Attack += 1
src.MAttack += 1
src.Defense += 1
src.MDefense += 1
src.Strength += 1
src.MStrength += 1
src.MHP += 16
src.HP = src.MHP
src.MMP += 12
src.MP = src.MMP
src << "You gained a level!"
src.Stat()
verb
Attack(mob/M as mob in oview(1))
if (M.HP <= 0)
usr << "[M] is already dead!"
else
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,20) //random dmg 1-20
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
Say(msg as text)
world << "[usr]: [msg]"
obj
gold
icon = 'gold.dmi'
var
amount
verb
Get() //get the gold
set src in view(1) //src must be close
var/A = rand(1,100)
usr << "You find [A] gold!"
usr.Wealth += A //add to usr.wealth
del(src) //delete the gold
potion
icon = 'potion.dmi'
verb
Get()
set src in view(1)
usr << "You find small Mana Potion"
del(src)
Use()
usr.MP +=20
turf
Dungonlevel1
floors
icon ='dungonlevel1.dmi'
grass
icon_state = "grass"
darkness
icon_state = "darkness"
walkway
icon_state = "walkway"
world
turf = /turf/Dungonlevel1/floors/grass //default turf
mob/Stat()
..()
statpanel("Inventory",src.contents)
mob/Stat()
statpanel("Character")
stat("Level [Level]")
stat("Exp [Exp]/[MExp]")
stat("Health [HP]/[MHP]")
stat("Mana [MP]/[MMP]")
stat("Attack [Attack]/[MAttack]")
stat("Strength [Strength]/[MStrength]")
stat("Defense [Defense]/[MDefense]")
stat("Wealth [Wealth]")
stat(usr.contents)
turf/mobs.male
icon = 'person.dmi'
icon_state = "male"
Click()
usr.HP = 50
usr.MHP = 50
usr.icon = 'person.dmi'
usr.icon_state = "male"
usr.MP = 25
usr.MMP = 25
usr.start()
turf/mobs.female
icon = 'person.dmi'
icon_state = "female"
Click()
usr.HP = 50
usr.MHP = 50
usr.icon = 'person.dmi'
usr.icon_state = "female"
usr.MP = 25
usr.MMP = 25
usr.start() //Activates that proc
mob
proc
start()
loc =locate(1,1,2)
obj
spell
icon = 'demo.dmi'
icon_state = "spell"
var/needsTarget = 0
proc
Cast(var/mob/caster)
HPHeal
needsTarget = 0
Cast(var/mob/caster)
caster << "You cast HP Heal on yourself!"
usr.HP += 25
usr.MP -= 5
Problem description: OK, i dont get an error or anything.. but when i load up the game and i play it.. i cant see my inventory where my potion is.. and i also cant use my HP Heal spell. All help appreciated.
Please dont just post saying usr abuse.. cause i know it is :P
Grim