can someone tell me how to make a monster drop random items and gold plz this is the code i got
mob
villan
Monster
icon = 'monster.dmi'
name = "Monster"
hp = 200
strength = 1
defense = 5
var/mob/character/Player
New()
. = ..()
spawn()
while(src)
var/player_found = 0
for(Player in oview(3,src))
step_towards(src,Player)
player_found = 1
break
if(player_found != 1)
step_rand(src)
sleep(10)
sleep(5)
Bump(mob/M)
if(istype(M,/mob/character))
attack(M)
proc/attack(mob/M)
var/damage = rand(1,strength)
M.hp -= damage
M <<"You are being attacked by [src] for [damage]!"
src.exp += rand(1,2)
src.level_up()
M.death_check(src)
i got it so i can get xp and lvl up but i cant figure out how to make it drop gold and random items plz help me out.
ID:270282
Feb 27 2006, 10:51 am
|
|
Feb 27 2006, 11:17 am
|
|
SEARCH BUTTON, this is the second time you've posted this.
|
Ok well I don't know about random item;s but getting gold or money is as easy as putting in exp. Here is the code you have to add to get money. usr.gold += 10. you have to see what type of money system you have. Like if you have your system called money you have to change the usr.gold to usr.money.
~Bamrulez |
In response to Bamrulez
|
|