SphereCommunity
How to override the more2 attribute for leather? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: How to override the more2 attribute for leather? (/Thread-How-to-override-the-more2-attribute-for-leather)



How to override the more2 attribute for leather? - Chimp - 09-27-2014 11:05 PM

Hey guys,

I have a problem an I can't figure it out.

I want to delete or override the more2 attribute for leather from a monster. E.g. "12 piles of hides (gian toad)". I want to erease that "(giant toad)". Who needs that? Big Grin

I tried ...

a) to set the OF_NoItemNaming to "OptionFlags=08|0100|0200" -> doesn't work

b) to override the more tag within the hides file:

Code:
[ITEMDEF 01078]
DEFNAME=i_hide
TYPE=t_hide
TDATA1=i_hides_cut
WEIGHT=5
VALUE=5
CATEGORY=Resources - Tailoring
SUBSECTION=Hides
DESCRIPTION=Hide

ON=@CREATE
more2=0

or

Code:
[ITEMDEF i_hide_spined]
ID=i_hide
TYPE=t_hide
TDATA1=i_leather_spined
CATEGORY=Resources - Tailoring
SUBSECTION=Hides
DESCRIPTION=Spined Hide

ON=@Create
COLOR=color_o_spined
more2=0

-> doesn't work either.

I'm searching every forum I know and every phrase I can imagine … but I can't find anything.

What's your take?

Greetings from Germany
Chimp


RE: How to override the more2 attribute for leather? - Skul - 09-28-2014 02:58 AM

There's no real way of doing this, <more2> is set when u target the corpse with a sharp object. You can override it use @itemtargon_item, example:
Code:
on=@itemtargon_item
if (<targ.type>==t_corpse)
  if (<act.type>==t_weapon_sword) || (<act.type>==t_weapon_fence) || (<act.type>==t_weapon_mace_sharp)
    if !(<targ.tag0.cut>)
      targ.tag.cut=
      targ.timerf 1, f_corpse_cut
    endif
  endif
endif

[function f_corpse_cut]
forcont <uid>
  if (<type>==t_leather) //your leather here
    more2=0 //set to 0?
  endif
endfor



RE: How to override the more2 attribute for leather? - Coruja - 09-28-2014 06:21 AM

I would prefer

Code:
ON=@Create  //reset MORE2 only after 1 second
TIMERF 1,MORE2=

or

Code:
ON=@PickUp_Pack  //reset MORE2 when the player pickup the item from the loot
MORE2=



RE: How to override the more2 attribute for leather? - Skul - 09-28-2014 10:44 AM

@pickup_pack is a good choice.