ID:141359
 
Code:
mob 
verb
attack(mob/M in oview (1))
flick("youhit",usr)
flick("npchit",src)
M.hp -= usr.str

M<<"You were hit for [usr.str] damage!"
usr<<"You inflicted [usr.str] on [M]."
deathcheck()
macro
a return "attack"
client
command_text = ".alt "



Problem description:
it compiles with no errors but when u hit the macro button the player dosent hit the mob i have even made sure that .alt is clicked when I try to use the macro any help on this would be nice

Wrath69 wrote:
it compiles with no errors

Are you sure? I'm surprised. It shouldn't accept return like that, as you've posted it.
Anyway, you're using the Old Method of implementing macros, or to be exact you're trying to use it but not doing so correctly. That macro syntax is part of DM Script, which isn't just thrown in a .DM code file - it must be a part of the client/script var (look up 'script' in the DM Reference if you want more info) or in a DM Script file (.DMS).
It'd be a good idea to just use the up-to-date and improved method of using macros instead though, which has more features & flexibility and doesn't require macro-mode. It's done rather simply through the Interface Editor in an interface/skin file (.DMF). It's pretty straightforward as you essentially just use an editor, but there is also some guiding on it in Lummox' skin making tutorial in the Dream Makers guild.

Misc note: in your attack() verb, you're not running the deathcheck() proc on the correct mob. You're not specifying a target object to run the proc on, so it defaults to src which is equal to usr here - the player who used the verb.
In response to Kaioken
wow I was not even aware of the change for macros thanx Kaioken