ID:273964
 
monster
Death()
world << "[src] died"
loc=locate(0,0,0)
spawn(300)
loc=locate(rand(1,world.maxx),rand(1,world.maxy),1)
HP=MAXHP
if(M.in_party == 1)
for(var/mob/P in usr.party)
for(P in oview())
if (P.party ==src.party)
src.exp_members ++
if (src.Xpgained >0)
src.Xpshare =src.Xpgained/src.exp_members
for(P in oview())
if (P.party ==src.party)
P.Xp +=src.Xpshare
P << output("You've gained[src.Xpshare] Xp.","info")
src.Xpgained =0









can any one help me with a party share exp in my death system i tried but i cant figure it out it work for me
mob
proc
expgain(exp_value, mob/person)
person.exp += exp_value //add the monster's exp
death(mob/killer)
if(killer.client) //to verify it's a player
if(killer.Party) //we have to check if they have a party
for(var/mob/m in killer.Party) //for each person in the party
m.expgain(src.exp, m.exp) //add the src (monster)'s exp to each mob in the player's party
else //no party
src.expgain(src.exp, killer.exp) //call the proc to add the src (monster)'s exp to the killer (player)'s
else //it's a monster who killed the person
//death system goes here
Something I threw together. Haven't programmed in some time but that's a basic way of doing it.
In response to Moonlight Memento
ok ill try it thanks