ID:143546
 
Ok I want to make this code were insted of me using verbs I can use a double click istend of the verb

Code:

mob/verb
Attack(mob/M in oview(1))//this makes it so the user has the verb attack but can only be used when someone is next to him/her
set category = "Combat"//combat tab
var/dmg = rand(1,usr.strength)//make a random damage variable
usr << "<B><I>[usr] Attacks [M]"//sends a attack message to the user
M.health -= dmg// takes away the person there attackings health depending on the damage variable
M.DeathCheck()//sends deathcheck which is right below this
mob/proc
DeathCheck()
if(usr.health <= 0)//checks if the users health is 0 or less
usr << "You die"
usr.health = 10
usr.loc = locate(1,1,1)
Instead of:

mob/verb
Attack(mob/M in oview(1))
set category = "Combat"
// yatta yatta


Do this:
mob/DblClick()
if(get_dist(src, usr) <= 1)
// yatta yatta


You might also make DblClick() call 'usr.Attack(src)' if you want to have both.

In response to Foomer
Mind giving me the EXACT code?
like ALL of what to put?
In response to Spartagus
You have a brain. It should take about 10 seconds to figure it out if you put it to use.
In response to Spartagus
He told you what to do, it's very simple and straight forward.

When being a programmer, you should NOT expect anything on a golden platter, you have to earn it.

If you can't handle working and learning on your own (as well as if you lack patients and/or logic) then being a programmer is probably not the way for you to go.
In response to Foomer
I mean like the correct spacing -_- it doesn't comply
In response to Spartagus
backspace the spaces one at a time (starting from top) and then input correct tabs.
No put usr in proc. Ungh.

Lummox JR
In response to Spartagus
Spartagus wrote:
I mean like the correct spacing -_- it doesn't comply

So fix it. o_O Work with it. He gave you the basic. You can fix little bits of problems. It's not difficult, just fix the spacing.
In response to Will_Work_For_FOOD
Will_Work_For_FOOD wrote:
Spartagus wrote:
I mean like the correct spacing -_- it doesn't comply

So fix it. o_O Work with it. He gave you the basic. You can fix little bits of problems. It's not difficult, just fix the spacing.

Nah, everyone around here is too darn lazy to put any effort into their code. They expect us to do it.