Jump to content

alter effect on extension header


igi

Recommended Posts

Lo folks,

I've just murdered weidu, and it's now laying as a bloody pile of code on the floor. However, if someone can use the remains to answer my question, I might donate a few gp's for a ressurection spell.

 

I have a series of items.

All the items have a single extension header.

The extension header may or may not have a single effect attached.

If the extension header has a single effect, I want to alter the timing mode from 1 to 9.

 

NB. The items have a varying amount of equipping effects.

Thanks

/igi

Link to comment

Yes, as there are a varying number of equipping effects.

With a little effort though I was able to manage it myself, this is the code I ended up using:

COPY_EXISTING_REGEXP GLOB ~ii.*\.itm~ ~igi~
 READ_SHORT 0x1c "itemtype"
 READ_SHORT 0x68 "count"
 READ_SHORT 0x64 "offset"
 READ_SHORT 0x70 "equipcount"
 READ_SHORT ("%offset%" + 0x1e) "fcount"
 READ_LONG 0x6a "baseoffset"
 READ_SHORT ("%offset%" + 0x20) "foffset"
 WRITE_BYTE ("%baseoffset%" + ("%equipcount%" * 48) + 0xc) 0x09
 IF_EVAL ("%count%" > 0) AND ("%fcount%" > 0) AND NOT ("%itemtype%" = 9)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...