SphereCommunity
i_memory: where you store the mem_flags - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: i_memory: where you store the mem_flags (/Thread-i-memory-where-you-store-the-mem-flags)

Pages: 1 2


i_memory: where you store the mem_flags - Rizz - 05-14-2015 03:48 AM

mem_flags are stored into a i_memory equiped on layer 30.

Usually when a player A hits another player B, they both equip the memory (with different flags of course but relate and linked to the players).

The memory doesn't decay (timer is always refreshed) so players can only remove this memory dying.

Is possible to manage or set the timer of this memory somewhere or should i act in a different way?

My intention is to remove this memory after 10 minutes to both players A and B at the same time.

I was thinking to @envirchange or @click... better idea?


RE: i_memory: where you store the mem_flags - Rizz - 05-14-2015 06:46 AM

maybe @combatdelete?


RE: i_memory: where you store the mem_flags - darksun84 - 05-14-2015 08:00 AM

@combatend ?


RE: i_memory: where you store the mem_flags - XuN - 05-14-2015 04:39 PM

Which flags are exactly not being removed? All combat flags should be deleted when combat ends.


RE: i_memory: where you store the mem_flags - Coruja - 05-14-2015 06:50 PM

combat memories are working fine here, they got created with TIMER=300 by default


RE: i_memory: where you store the mem_flags - Rizz - 05-14-2015 07:57 PM

(05-14-2015 04:39 PM)XuN Wrote:  Which flags are exactly not being removed? All combat flags should be deleted when combat ends.

The memory itelsef, if it doesn't decay you will continue to see the opponent as grey.

Maybe i have something in my scripts, my memory has a timer of 18 seconds and restarts everytime


RE: i_memory: where you store the mem_flags - Coruja - 05-20-2015 07:45 AM

not really, combat memories are tricky to deal with, because the same memory is used to many combat flags (stored on the COLOR property)

its something like:
COLOR=memory_iagressor|memory_harmedby|etc


RE: i_memory: where you store the mem_flags - XuN - 05-20-2015 05:32 PM

This is how notoriety is being checked now.
Code:
//Predefined behs
if (<src.flags>&statf_invul)
  return 7//invul
endif
if (<src.criminal>)
  return 4//criminal
endif
if (AllowIncognito && <src.flags>&statf_incognito)//AllowIncognito is set depending on the situation
  return 3//neutral
endif
if (<region.flags>&region_flag_arena) //yes, this does exists, but it was missing in sphere_defs... i added it right now.
  return 3
endif
if (Noto_IsEvil) // i pasted this function in another post
  return 6
endif
if (Noto_IsNeutral)
  return 3
endif
//Checking mems

if (<src>!=<uid>)// no more checks for me passed this point, i'm not going to have memories of me commiting a crime so its ok to return blue.


ref1=<findmemories_with_one_of_these_flags MEMORY_SAWCRIME | MEMORY_AGGREIVED | MEMORY_HARMEDBY>
if (<ref1>)
  return 4//criminal
endif

if (<src.isinparty> && <src.isinsamepartyof <uid>>)
  return 2//green, noto_guild_same
endif
if (<src.guild>)
  if (<guild>)
    if (<src.guild>==<guild>)
       return 2
    elseif (<guild.isalliedwith <src.guild>>)
       return 2
    elseif (<guild.isatwarwith <src.guild>>)
       return 5// brown, noto_guild_War
    endif
  endif
endif
if (<src.town>)
   if (<town>)
    if (<town.isatwarwith <src.town>>)
       return 5
    endif
  endif
endif

endif
return 1



RE: i_memory: where you store the mem_flags - Rizz - 05-22-2015 06:22 PM

XuN where is this script located?
How can I change or modify the memory timer? i_memory is a common baseid memory...


RE: i_memory: where you store the mem_flags - XuN - 05-22-2015 07:03 PM

There's no such script ... I just 'adapted' from source so everyone can understand it. If you want to change something there you should replicate it under @NotoSend.

For memories ... there's a @MemoryEquip trigger, you should take a look on revisions.txt from time to time Wink