Code:
mob proc DeathCheck(mob/M = usr) if(src.HP <= 0) if(istype(src.client)) world << "[M] killed [src]" src.loc = locate(9,76,3) src.attacked = 0 src.safe = 1 src.dead = 1 src.Flight = 0 src.density = 1 M.kills += 1 var/tps = rand(45,65) var/amount = rand(2000,6800) M.tp += tps M.Money += amount M << "You have gained [tps] Tps!" src.deaths += 1 HP = MaxHP Mana = MaxMana else src.attacked = 0 var/tps = rand(10,20) var/amount = rand(1000,5500) M.tp += tps M.Money += amount M << "You have killed [src]!" M << "You have gained [tps] Tps!" del(src) else ..() mob proc Poisoner() for(var/mob/M in src.poisoner) if(M.Damager == 1) M.HP -= 25 M << "You are hurt by poison." M:DeathCheck(src) if(M.dead) M << "You have been killed by the poison." M.Damager = 0 M.Poisoner() else spawn(40) M.HP -= 25 M << "You are hurt by poison." M:DeathCheck(src) if(M.dead) M << "You have been killed by the poison." M.Damager = 0 M.Poisoner() else spawn(40) M.HP -= 25 M << "You are hurt by poison." M:DeathCheck(src) if(M.dead) M << "You have been killed by the poison." M.Damager = 0 M.Poisoner() else spawn(40) M.HP -= 25 M << "You are hurt by poison." M:DeathCheck(src) if(M.dead) M << "You have been killed by the poison." M.Damager = 0 M.Poisoner() else spawn(40) M.Damager = 0 M << "You have survived the poison."
obj Poisonball icon = 'poisontechniques.dmi' icon_state = "1" density = 1 New() spawn(100) del src Bump(mob/A) if(ismob(A)) var/mob/M = A if(M == src.Gowner) del src return if(M.safe == 1) del src return if(M.pk == 0) del src return if(M.dead) del src return var/mob/L = src.Gowner var/damage = round(L.MaxMana * 1.2) if(ismob(L)) if(damage <= 1) damage = 1 M.HP -= damage view(L,8) << "[L] hit [M] with Poison Ball for [damage] damage!" M.Damager = rand(0,1) if(M.Damager == 1) view(L,8) << "[L] has poisoned [M] with Poison Ball!" M.poisoner.Add(M) M.Poisoner() M.DeathCheck(L) del(src) else M.HP -= damage view(L,8) << "[L] hit [M] with Poison Ball for [damage] damage!" M.Damager = rand(0,1) if(M.Damager == 1) view(L,8) << "[L] has poisoned [M] with Poison Ball!" M.poisoner.Add(M) M.Poisoner() M.DeathCheck(L) del(src) if(istype(A,/turf/)) var/turf/T = A if(T.density) del(src) if(istype(A,/obj/)) del(src) ob/Poison/verb Poison_Ball() set category = "Fighting" set name = "Poison Ball" if(usr.safe) return if(usr.Mana <= 49) usr << "<b>Your mana is too low!" return if(usr.Flight) return if(usr.resting) return if(usr.dead) usr << "You are dead!" return if(usr.pk == 0) usr << "You are not a Fighter!" return if(usr.mana_lock) src << "You cannot use this Skill right now." return if(!usr.firing) usr.mana_lock = 1 spawn(10) src.mana_lock = 0 usr.Mana -= 50 usr.overlays += poison_charge view(6) << "[usr]: Poison..." sleep(8) view(6) << "[usr]: Ball!" usr.overlays -= poison_charge usr.firing = 1 var/K = new/obj/Poisonball(usr.loc) K:Gowner = usr K:dir = usr.dir walk(K,usr.dir) sleep(30) usr.firing = 0 mob var list poisoner = list()
|
Problem description: Whenever you shoot the ball and poison someone and you kill them this shows up:
Inferno741 hit Skydragon792 with Poison Ball for 223 damage!
Inferno741 has poisoned Skydragon792 with Poison Ball!
You are hurt by poison.
Skydragon792 killed Skydragon792
You have gained 52 Tps!
You have been killed by the poison.
I know almost nothing about his code so I showed everything that was relevant to this problem what should happen is something like this:(NOTE: Inferno was on both of those keys and he switched back and forth to figure out relevent data so the You are hurt by poison and You have been killed by the poison are both from SkyDragon I believe)
Inferno741 hit Skydragon792 with Poison Ball for 223 damage!
Inferno741 has poisoned Skydragon792 with Poison Ball!
You are hurt by poison.
Inferno741 killed Skydragon792
You have been killed by the poison.
Other then that I have no relevent data, my friend wouldnt post on the forum because he thinks people will talk back to him(they probably would to) so if your not going to talk back to him and you need more information page his key: Inferno741.