///Party sistemi ingilizcemin olduğu kadar türkçeleştirdim
[DEFNAME options]
PARTY_ATTACK 1 // 1 - aktif , 0 - inaktif. [ Ayni partyde bulunan birbirine dalabilmesi]
PARTY_HARM_CAST 1 // 1 - aktif , 0 - inaktif. [ Ayni partyde bulunan birbirine buyu atması]
PARTY_GOLD_ALL 1 // 1 - aktif , 0 - inaktif. [ Parayı ortak paylaşması]
[EVENTS e_party]
On=@Attack
// src - target [defender]
// [] - hitter [attacker]
if (<IsInParty>) && (<src.IsInParty>) && (<def.party_attack>)
for 0 <eval <src.party.members>>
obj=<src.party.member.<local._for>.uid>
if (<uid>==<obj>)
sysmessage @039,,1 Partinizde bulunan kisiye dalamassiniz.
cancel_attack
return 1
endif
endfor
endif
On=@SpellCast
// src - caster [attacker]
// targ - target [defender]
if (<targ.IsInParty>) && (<src.IsInParty>) && (<def.party_harm_cast>) && (<serv.spell.<argn1>.flags>&spellflag_harm)
for 0 <eval <party.members>>
obj=<party.member.<local._for>.uid>
if (<src.uid>==<obj>)
src.sysmessage @039,,1 Partinizde bulunan kisilere saldiramazsınız.
src.action = -1
return 1
endif
endfor
endif
On=@ItemPickUp_Pack
// act - item
// src - dropper
if (<act.cont.uid> == <src.findlayer(layer_pack).uid>) && (<act.baseid> == i_gold) && (<src.IsInParty>) && (<def.party_gold_all>)
src.sysmessage @039,,1 Partyde oldugunuz icin cantadan parayi alamayabilirsiniz
return 1
endif
On=@ItemDropOn_Self
// src - dropper
// act - container
// argo - item
if (<argo.baseid> == i_gold) && (<src.IsInParty>) && (<def.party_gold_all>)
FOR 0 <EVAL <SRC.PARTY.MEMBERS>-1>
OBJ=<SRC.PARTY.MEMBER.<LOCAL._FOR>.UID>
local.q = <eval <argo.amount>>
local.x = <eval <argo.amount>/<src.party.members>>
serv.newitem i_gold
new.amount <eval <local.x>>
new.cont = <obj>
endfor
src.consume <local.q> i_gold
endif
endif
// FUNCTIONS
[FUNCTION cancel_attack]
action = -1
memoryfindtype.memory_war_targ.remove
update