Enemy3
YellowSlime
hp = 17
str = 4
def = 3
experience = 2
maxexp = 10
density = 1
NPC = 1
icon = 'Slimes.dmi'
icon_state = "Yellow Slime"
New()
..()
proc/MAttack(mob/M)
if(istype(M,/mob/Character))
var/D = usr.str - (M.def + 1)
var/C = rand(1,D)
if(D >= 1)
M.hp -= C
M << "<b>[usr.name] hits you for [D] points of damage!"
oview() << "<b>[usr.name] hits [M] for [D] points of damage!"
else
return
else
return
Click()
if(usr.pet == 1)//if you have a pet
if(usr.target == src)//and this monster is already your target
usr.target = ""//make your target blank
usr << "[src] is no longer your target."//get rid of that target
else//or if you don't have a target
usr.target = src//make it your target
usr << "[src] is now your target!"
ID:270175
![]() Jan 28 2006, 9:45 am
|
|
I was wander how i would make this enemy drop gold and a item randomly and alos a corpes. thx in advance
|
iam not too sure what you r saying ?? instead of
proc/MAttack(mob/M) put this proc/MAttack(usr/M) that has errors in it >.> and alos how would i make the mob drop an item ex:a sword ever 10 kills and 4 gold ever kill but a coarps ever kill? |
You would make a procedure for checking when it dies, then make a new object under it.
You probally want to look up new and you should be able to figure it out. Basically just do what I said above, make a procedure to check it's health after being attacked, if it's dead, use new to make a new corspe, use rand() to pick an amount of gold and set that number to a new gold atom and then use pick() to pick which type of item it drops. -Doh |
Lummox JR