//****************************************************************************
//SPHERE by : Menasoft ©1997-2007
//www.sphereserver.net
// All SPHERE script files and formats are copyright Menasoft & Partners.
// This file may be freely edited for personal use, but may not be distributed
// in whole or in part, in any format without express written permission from
// Menasoft & Partners.  All donations and contributions
// become the property of Menasoft & Partners.
//****************************************************************************
// FILE LAST UPDATED: 14-March-2007
VERSION=0.56b

[EVENTS e_GuildGenericEvent]
ON=@Death
FOR 0 <EVAL <GUILD.MEMBER.COUNT>-1>
REF1=<GUILD.MEMBER.<dLOCAL._FOR>.UID>
REF1.SYSMESSAGE @0ad Guild : <NAME> died at <REGION.NAME> (<MAPNAME>) for <UID.<ATTACKER.LAST>.NAME>
ENDFOR
FOR 0 <EVAL <ATTACKER>-1>
	IF (<ATTACKER.<dLOCAL._FOR>.DAM>)
	REF1=<ATTACKER.<dLOCAL._FOR>> //killer
		IF (<REF1.FLAGS>&STATF_PET)
		REF1=<REF1.MEMORYFINDTYPE.MEMORY_IPET.LINK>
		ENDIF
		IF (<REF1.ISPLAYER>)
			IF (<REF1.GUILD>)
				IF (<REF1.GUILD.ALIGN> != <GUILD.ALIGN>)
				REF2=<REF1.GUILD> //killer's guild
				LOCAL.ALLYPOINTS=<EVAL (<SKILLTOTAL>/<DEF.GUILDDOM_DIVISOR>)+300>
				REF2.TAG0.ALLYPOINTS += <LOCAL.ALLYPOINTS>
				REF2.f_guildsys_sendsmsg <REF2>,<REF1.NAME> just gained <dLOCAL.ALLYPOINTS> Alliance Points for the guild!
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDFOR

[EOF]