ive tryed and tryed but my attack system sucks! here ill show u.
mob/verb/Attack(M as mob)
set category="Commands"
if(M:key == usr.key)
usr<<"You cant attack yourself!"
else
usr.dam = rand(5,10)
usr.dam+=usr.level
usr.dam-=M:defense
usr.dam+=usr.attack
M:HP-=usr.dam
view() <<"[usr] attacked [M]! [usr.dam] damage!"
if(M:HP<=0)
switch(rand(1,10))
if(1,5,8)
new/obj/Gold_Coin
world<<"[usr] killed [M]!"
M:loc=locate(10,94,2)
M:verbs+=/mob/verb/Attack
usr.wins+=1
M:loses+=1
M:HP = 100
usr.experience+=10
if(usr.experience==100)
usr.experience=0
usr.level+=1
view() <<"[usr] got a level up! their current level is [usr.level]!"
and i dont have a deathcheck so my monsters (they are under mon >.<) die but go to the place of death for a nromal char. and i want them do be deleted and then respawned. i tryed to label monsters as NPC's but that dont work.... plzz help.
ID:145062
Jun 22 2006, 3:43 pm
|
|
Jun 22 2006, 3:46 pm
|
|
This and This
|
In response to A.T.H.K
|
|
thanks
|
In response to Pyro170
|
|
mob/verb/Attack(M as mob) |
In response to Axerob
|
|
ok im holding.... but i dont have a deference betewwn a monster and a mob they both are set under the same catagory..
|
In response to Pyro170
|
|
look above, heres a more detailed example....
obj/enemy |
In response to Axerob
|
|
ok i will try that
|
In response to Pyro170
|
|
it keeps saying undifined proc for moncheck. and i have 64 errors now
|
In response to Pyro170
|
|
He didn't tell the compiler that M is a mob.
mob/verb/Attack() |