I'm trying to make it so when you kill someone you gain exp depending on your opponents level. So can someone help me code it?
ID:157118
May 15 2010, 9:05 am
|
|
In response to Jarquille
|
|
That's backwards. The Death() proc should belong to the mob doing the dying, and the argument should be the mob killing it. So, you'd have:
mob/verb/attack(var/mob/M in oview(src,1)) |
In response to Garthor
|
|
my mistake. edited my original post.
|
In response to Jarquille
|
|
How do you make it so when you kill a npc you gain exp depending on its level?
|
In response to Alkhalif10
|
|
This isn't a "request programmers to put in the effort for you" area, it is a place where people ask for help on how to go about doing something, possibly with some code they have worked out themselves. You cannot perfect programming in a week, a month, or a year. However, reading the guide will sureley speed you along.
|
and then just run w.e proc you have to check if the exp >= required exp for level up.
Also might want to make something that stores and then adds the remaining exp. so if the exp is > required exp. It levels you up, and then adds the amount that was above the required exp back.
This could be done like so:
Additional information: You've posted in the wrong section, this should go under classified ads.