deathcheck()
if(src.monster >= 1)
if(src.health <= 0)
src.loc = null
spawn(600) loc = initial(loc)
src.health = src.max_health
usr.exp += src.level*10
usr << "You killed [src]"
if(src.blueslug >= 1)
var/droprate = rand(1,10)
if(droprate == 5)
var/obj/Equipment/Swords/Iron_Sword/O/ = new(loc)
O.rarity = rand(1,5)
Problem description:
What i want is if you kill a monster with a blueslug variable, you have a 1:10 chance of getting an iron sword with a random rarity, could anyone point out whats wrong? x.x;
Also:
loc is null by this point.