Jump to content

Ring of Gaxx


Recommended Posts

Ring of Gaxx is not preventing poison and nausea icons. It also was displaying an icon for protection from magic which should be magic resistance.

 

// ring of gaxx displays wrong icon and needs to prevent poison and nausea icons
COPY_EXISTING ~ring39.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 WRITE_SHORT 0x70 ("%fx_num%" + 2)
 WHILE ("%abil_num%" > 0) BEGIN // if abilities are present, need to adjust their effects index
   SET "abil_num" = ("%abil_num%" - 1)
   READ_SHORT  (0x20 + "%abil_off%" + ("%abil_num%" * 0x38)) "abil_fx_idx"
   WRITE_SHORT (0x20 + "%abil_off%" + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + 2)
 END
 WHILE ("%fx_num%" > 0) BEGIN // need to change existing icon display
   SET "fx_num" = ("%fx_num%" - 1)
   READ_SHORT ("%fx_off%" +        ("%fx_num%" * 0x30)) "type"
   READ_LONG  ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) "icon"
   PATCH_IF (("%type%" = 142) AND ("%icon%" = 28)) BEGIN // display protection from magic icon
     WRITE_LONG  ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) 63 // change to magic resistance
   END
 END
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_SHORT ("%fx_off%" +     ) 169 // prevent portrait icon
   WRITE_LONG  ("%fx_off%" + 0x08) 7   // nauseated
   WRITE_BYTE  ("%fx_off%" + 0x02) 1   // target: self
   WRITE_BYTE  ("%fx_off%" + 0x0c) 2   // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x0d) 2   // not dispel/no bypass
   WRITE_BYTE  ("%fx_off%" + 0x12) 100 // probability 1
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_SHORT ("%fx_off%" +     ) 169 // prevent portrait icon
   WRITE_LONG  ("%fx_off%" + 0x08) 6   // poison
   WRITE_BYTE  ("%fx_off%" + 0x02) 1   // target: self
   WRITE_BYTE  ("%fx_off%" + 0x0c) 2   // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x0d) 2   // not dispel/no bypass
   WRITE_BYTE  ("%fx_off%" + 0x12) 100 // probability 1
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

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

×
×
  • Create New...