I am trying to add Wraithform to a store without using ADD_CRE_ITEM for the next UB so it does not appear on the top of the style. I have borrowed code from Cam from Tutu Tweaks, but need a hand adapting something. This is what I have at the moment:
COPY_EXISTING ~scrolls.sto~ ~override/scrolls.sto~ /* The Pen and Parchment Store */
READ_LONG 0x34 "sale_offset"
READ_LONG 0x38 "sale_num"
READ_LONG 0x2C "item_offset"
READ_LONG 0x4C "drink_offset"
READ_LONG 0x70 "cure_offset"
SET "orig_sale_num" = "%sale_num%"
SET "wraithform_added" = 0
SET "wraithform_insert" = 0
WHILE ("%sale_num%" > 0) BEGIN
READ_LONG ("%sale_offset%" + (("%sale_num%" - 1) * 0x1C)) "item1"
READ_LONG ("%sale_offset%" + 0x04 + (("%sale_num%" - 1) * 0x1C)) "item2"
PATCH_IF (("%item1%" = 0x51314C524353) AND ("%item2%" = 0X51314C524353) AND ("%wraithform_insert%" = 0)) BEGIN // between Vampiric Touch and Ghost Armour
SET "wraithform_insert" = "%sale_num%"
END
SET "sale_num" = ("%sale_num%" - 1)
END
PATCH_IF ("%wraithform_insert%" > 0) BEGIN
WRITE_LONG 0x38 ("%orig_sale_num%" + 1)
INSERT_BYTES ("%sale_offset%" + ("%wraithform_insert%" * 0x1C)) 28
WRITE_ASCII ("%sale_offset%" + ("%wraithform_insert%" * 0x1C)) ~u!scrl03~
WRITE_LONG ("%sale_offset%" + 0x10 + ("%wraithform_insert%" * 0x1C)) 1 // identified
WRITE_LONG ("%sale_offset%" + 0x14 + ("%wraithform_insert%" * 0x1C)) 5 // quantity
PATCH_IF NOT ("%item_offset%" < "%sale_offset%") BEGIN
WRITE_LONG 0x2C ("%item_offset%" + 0x1C)
END
PATCH_IF NOT ("%drink_offset%" < "%sale_offset%") BEGIN
WRITE_LONG 0x4C ("%drink_offset%" + 0x1C)
END
PATCH_IF NOT ("%cure_offset%" < "%sale_offset%") BEGIN
WRITE_LONG 0x70 ("%cure_offset%" + 0x1C)
END
END
The problem is in here.
PATCH_IF (("%item1%" = 0x51314C524353) AND ("%item2%" = 0X51314C524353) AND ("%wraithform_insert%" = 0)) BEGIN // between Vampiric Touch and Ghost Armour
Looking at Cam's code, I had assumed this was the hex for the name for the .ITM files I was looking to place it in between. However, WeiDU can't convert this to an integer, and the sequence is longer than what Cam's original code had (0x then 8 characters, not 12 or 10 as I have). So, what I'd like to know is how can I convert item filenames to hex/ASCII/whatever it wants?

I used NI for the above example, selecting the .ITM name and then "view as hex".