Oh I see
Heres an Idea, im a bit rusty so if i make any mistakes hopefully someone will correct me.
ARGO is the Corpse that is created when a character dies.
I and SRC are both the guy that died.
http://wiki.sphere.torfo.org/index.php/@DeathCorpse
A Corpse will not tell you what guild it came from, so this is the first thing we must do.
Get the players guild UID on the corpse :
Using TAG.TheGuildIWasFromUID
Code:
ON=@DeathCorpse
IF <GUILD.UID>
SERV.UID.<ARGO.UID>.TAG.TheGuildIWasFromUID = <GUILD.UID>
ENDIF
Next lets think about what happens, how does a corpse get looted?
Someone DClicks on the corpse to open it...
Ok So why not use ON=@ITEMDCLICK in the main player event ?
Where Act is the Item and I is the clicker..
http://wiki.sphere.torfo.org/index.php/@ItemDClick
Now how are we going to know that the item the player is clicking on is a corpse?
- we could check its ID, i_corpse or its type t_corpse
But what if there is a live player in the same guild called i_corpse?
- we could check it isnt a player
Code:
ON=@ITEMDCLICK
IF <GUILD.UID>
IF !<ACT.IsPlayer>
IF <ACT.TYPE> == t_corpse
IF <GUILD.UID> == <ACT.TAG0.TheGuildIWasFromUID>
SAY @35 You cannot loot your own guild mates.
RETURN 1 // The corpse should not open!
ENDIF
ENDIF
ENDIF
ENDIF
I imagine something like that might do the trick ^^