PoisonPotion
name="Poison Potion"
icon = 'magicitems.dmi'
icon_state="health_potion"
verb
Throw()
set src in usr
src.Thrown=1
src.owner = "[usr.key]"
walk(src,usr.dir,0)
sleep(20)
if(src)
usr.itemDrop(src)
for(var/mob/N in world)
for(var/obj/Potions/PoisonPotion/T in oview(20))
if(T:owner == "[N.key]")
if(src.Thrown)
del(T)
Bump(atom/M)
if(istype(M,/mob/))
if(M:shielded)
for(var/mob/N in world)
for(var/obj/Potions/PoisonPotion/T in world)
if(T:owner == "[N.key]")
if(T:Thrown)
del(T)
return
for(var/mob/N in world)
if(src.owner == "[N.key]")
N<<"You hit [M]!"
M<<"You were hit by [N]!"
M:Poison = 1
N.Poisoned(M)
N.DeathCheck(M)
for(var/obj/Potions/PoisonPotion/T in world)
if(T:owner == "[N.key]")
if(T:Thrown)
del(T)
return
else
for(var/mob/N in world)
for(var/obj/Potions/PoisonPotion/T in world)
if(T:owner == "[N.key]")
N<< "The [src] shatters when hitting the [M]"
if(T:Thrown)
del(T)
return
Problem description:
Helloooo so I'm trying to have this potion were once it's thrown it drops just 1 item from the inventory and and walks in the dir of the usr for 20 or until it bumps. For some reason it takes all poison potion out of my inventory regardless of how many I have so when you throw once it will take every single item of that potion you have. Thanks for any help!
So for anyone else with this problem, I had to add the obj