SphereCommunity
Neutral attack faction, can see orange? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Neutral attack faction, can see orange? (/Thread-Neutral-attack-faction-can-see-orange)



Neutral attack faction, can see orange? - daedelus - 11-15-2012 04:33 AM

How can I do that if a neutral blue [+karma] attack a faction, the faction sees him in orange [can attack] for x seconds.

Item memory? How is that item memory?

Thanks


RE: Neutral attack faction, can see orange? - Skul - 11-15-2012 06:09 AM

well you would have to set a tag.override.[$uid] in @gethit, here's an example, might work, might not, try it out:
Code:
[defname guildstone_faction_system]
guild_nototimeout        360 //360 second timeout

[events e_guildstone_faction_system]
on=@gethit
if (<memoryfindtype.0400>)
  if (<src.memoryfindtype.0400>)
    if !(<src.memoryfindtype.0400.link.align>) && !(<memoryfindtype.0400.link.align>)
      guild_setneutralnotoflags <src.uid>
    endif
  endif
endif

[function guild_setneutralnotoflags]
if (<memoryfindtype.0400.link.member.count>)
  for x 0 <memoryfindtype.0400.link.member.count>
    memoryfindtype.0400.link.member.<local.x>.tag.override.noto.<argn1>=5
    memoryfindtype.0400.link.member.<local.x>.timerf <qval <def0.guild_nototimeout> ?<def0.guild_timeout>:360>, tag.override.noto.<argn1>=
    uid.<argn1>.tag.override.noto.<memoryfindtype.0400.link.member.<local.x>.uid>=5
    timerf <qval <def0.guild_nototimeout> ?<def0.guild_timeout>:360>, uid.<argn1>.tag.override.noto.<memoryfindtype.0400.link.member.<local.x>.uid>=
  endfor
else
  tag.override.noto.<argn1>=5
  timerf <qval <def0.guild_nototimeout> ?<def0.guild_timeout>:360>, tag.override.noto.<argn1>=
  uid.<argn1>.tag.override.noto.<uid>=5
  timerf <qval <def0.guild_nototimeout> ?<def0.guild_timeout>:360>, uid.<argn1>.tag.override.noto.<uid>=
endif



RE: Neutral attack faction, can see orange? - daedelus - 11-16-2012 05:37 AM

First, thanks for reply. I try it at night .

Thanks