yes, sendpacket can help you do this. considering npcs don't over-ride their notoriety by sphere's default behavior. Uhm, let me post a script I made, it was not designed to do exactly what you want, but the idea is in the code, maybe you can use it to manifest your own idea?
Check it out:
Code:
[FUNCTION updatecharacter]
IF (<ISCHAR>)
IF !( <FLAGS> & statf_dead )
LOCAL.UID=<UID>
IF ( <FLAGS> & statf_hidden ) || ( <FLAGS> & statf_invisible ) || ( <FLAGS> & statf_insubstantial )
LOCAL.STATS=<LOCAL.STATS> | 080
ENDIF
IF ( <FLAGS> & statf_war )
LOCAL.STATS=<LOCAL.STATS> | 040
ENDIF
IF ( <FLAGS> & statf_freeze )
LOCAL.STATS=<LOCAL.STATS> | 08
ENDIF
IF ( <FLAGS> & statf_poisoned )
LOCAL.STATS=<LOCAL.STATS> | 04
ENDIF
FORCLIENTS 18
IF (<ACCOUNT.RESDISP> >= 4)
SENDPACKET 077 D<LOCAL.UID> W<UID.<LOCAL.UID>.DISPID> W<UID.<LOCAL.UID>.P.X> W<UID.<LOCAL.UID>.P.Y> <UID.<LOCAL.UID>.Z> <UID.<LOCAL.UID>.DIR> W<UID.<LOCAL.UID>.COLOR> <HVAL <LOCAL.STATS>> <HVAL <UID.<LOCAL.UID>.NOTOGETFLAG <UID>>>
ENDIF
ENDFOR
ENDIF
ENDIF
So packet 077 is 'that' packet you need to change the highlight color of your guards, this function should be called off your guard by let's say @click (when the guard becomes near) or based on a timer from the guard npc itself (some people can disable @click by client settings). This will send packet 077 to all clients in the area to update the character 'updatecharacter' function is called upon. I didn't put any checks in to see if the npc is at war or in another faction, i simply have this looking for the standard stat flags.
The last packet in SENDPACKET
Code:
<HVAL <UID.<LOCAL.UID>.NOTOGETFLAG <UID>>>
represents the highlight color using NOTOGETFLAG, you can probably change this to suit your own faction/town/race/guild system you have by coding a function to return the desired highlight war/ally color.
I hope it helps (and makes any sense at all!) lol.