ID:1246348
 
(See the best response by Albro1.)
Code:


Problem description:

Alright well let me start by saying I am a noob at coding. I have a few things done so far but I need help with a number of things. This a sort of hack and slash play stile, also. What I need help with is the following:
[]Making monsters attack me when I attack them.
[]Make the monsters give experience.
[]Finally, learning how to walk on a turf and make it teleport you to another area or Z plane.

All help is appreciated.
Best response
Experimentation is a great thing. Try reading the DM Guide and looking around the Tutorials & Snippets section so you can get a better grasp on the language. We aren't here to give you code, but we will help you fix your code if you try to make something.
Code:
    verb
Owl_Peck(mob/M as mob in view(1))
usr << "You peck [M] with your beak."
oview() << "[usr] pecks [M]!"
var/damage = rand(1,6) + Strength -Defence
world << "[damage] damage!"

M.UP -= damage
M.DeathCheck()

The problem im having with this is that when I attack the mob it doesn't do the+str-def but the rand damage works. Any ideas?
What do you have Strength and Defence defined as?
Wait.. I think it might be thinking im trying to use both my strength and defence instead of my strength and the monsters defence. So would I just put M.Defence instead?
Yes.
Code:
    proc
LevelUp
while(xp>= xp_needed
xp_needed = round(xp_needed * 1.5, 1)
Level += 1
maxHP = round(Strength * 1.2, 1)
Strength = round(Strength * 1.2, 1)
Defence = round(Defence * 1.2, 1)

var
xp_give


Each mob has a certain amount of "xp_give". Im trying to figure out if I put it with my level UP proc or when my DeathCheck comes into play or before the src is deleted and during when the gold or money drops.
I don't have much to go off of here, but I'd assume you would put it with the death check.
Should I post my DeathCheck?