Well, i've tried everything and even looked up as much as possible, i'm currently working on this code(trying to tweak it to work with my south park game):
mob
verb
Attack(mob/M as mob in oview(1))
var/damage = usr.str - M.def
if(damage <= 0)
usr << "You easily dodge."
M << "[M] missed."
else
M.hp -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()
mob
proc
deathcheck()
if(src.hp <= 0)
view() << "[src] dies!"
src.hp = 50
src.Move(locate(2,4,1))
usr.str += 1
usr.def += 1
But just forget that one, i'm through with it. I was wondering if someone can helpme with the code, because
I have got it to work but then the enemies start out with the same amount of stats that i(or the usr)have/has.
And when someone or a mob dies they all go to the same spot
(2,4,1) and I need the enemies to respawn in some other place or maybe just later in time. Can someone pleaze help me. Or you could chat on instantmessanger than that would be better than posting a code and then it's wrong, my sn is antihatred85! Thanks for the Help!
ID:176453
Jan 12 2003, 1:35 pm
|
|
In response to RaeKwon
|
|
When i did that and tried to go on the enemy always has the same stats as I(the usr) has. Can someone good at coding make one up like how much damage is taken is equal to your strength minus the enemy's defense. and when someones hits reach zero if its a pc then it telepots to 2,4,1 but for npc's it goes say 100, 100, 1. and how can i type in enemies stats cause when i do its a duplication error.
THANX! |
In response to Cloudiroth
|
|
Cloudiroth wrote:
When i did that and tried to go on the enemy always has the same stats as I(the usr) has. Can someone good at coding make one up like how much damage is taken is equal to your strength minus the enemy's defense. <code>M.hp -= max(0,usr.strength-M.defense)</code> and when someones hits reach zero if its a pc then it telepots to 2,4,1 but for npc's it goes say 100, 100, 1. <code> if(client) loc = locate(1,1,1) else loc = locate(2,2,2) </code> and how can i type in enemies stats cause when i do its a duplication error. <code> mob/var/whatever = 2 mob/monster whatever = 1000 </code> THANX! Never, ever say "thanx" again. |
RaeKwon