COPY_EXISTING ~arled.sto~ ~override~ READ_LONG 0x34 ~4sale_off~ READ_SHORT 0x38 ~4sale_num~ DELETE_BYTES (~%4sale_off%~ + 0x1c) 0x1c SET ~4sale_num~ = (~%4sale_num%~ - 1) WRITE_SHORT 0x34 ~%4sale_num%~I'm not really sure about offsets here, I forgot the piece of code I used at home computer and wrote this from memory, but they are correct for sure there and the file is still corrupted.
a question to weidu guru
#21
Posted 26 August 2007 - 09:53 PM
#22
Posted 27 August 2007 - 06:13 AM
http://www.weidu.org...tml#@default373
#23
Posted 27 August 2007 - 06:35 PM
COPY_EXISTING ~arled.sto~ ~override~ PATCH_IF (SOURCE_SIZE > 0x9a) BEGIN READ_LONG 0x34 "4sale_off" READ_LONG 0x38 "4sale_num" DELETE_BYTES ("%4sale_off%" + (1 * 0x1c)) 0x1c END WRITE_LONG 0x38 ("%4sale_num%" - 1) BUT_ONLY_IF_IT_CHANGESit should work perfect, just perfect. Yet it doesn't.
#24
Posted 27 August 2007 - 06:50 PM
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#25
Posted 28 August 2007 - 09:33 PM
Edited by Gort, 28 August 2007 - 09:34 PM.
#26
Posted 28 August 2007 - 10:00 PM
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#27
Posted 29 August 2007 - 06:17 PM
do you know how does this function handle case when a store has duplicate entries?Use ADD_STORE_ITEM to replace an existing store item with another:
http://www.weidu.org...tml#@default373
Edited by Gort, 29 August 2007 - 06:20 PM.
#28
Posted 30 August 2007 - 06:44 PM
COPY_EXISTING ~zzz.dlg~ ~override~ PATCH_IF (~abqw~ STRING_MATCHES_REGEXP ~ab\|cd~ = 0) BEGIN PATCH_PRINT ~yes~ END ELSE BEGIN PATCH_PRINT ~no~ END BUT_ONLY_IF_IT_CHANGESreturns "yes". Looks like a bug, doesn't it?
#29
Posted 30 August 2007 - 08:39 PM
I'm no WeiDU guru, but I have a little bit of experience with regular expressions. It looks like 'ab\|cd' is matching the 'ab' and correctly returning 0.ok, while trying to construct regexp I need I've found that
COPY_EXISTING ~zzz.dlg~ ~override~ PATCH_IF (~abqw~ STRING_MATCHES_REGEXP ~ab\|cd~ = 0) BEGIN PATCH_PRINT ~yes~ END ELSE BEGIN PATCH_PRINT ~no~ END BUT_ONLY_IF_IT_CHANGESreturns "yes". Looks like a bug, doesn't it?
#30
Posted 30 August 2007 - 09:06 PM
Edited by Gort, 30 August 2007 - 09:11 PM.
#31
Posted 30 August 2007 - 10:29 PM
Ah, my experiences with regular expressions would provide a hit if the text contained the regexp anywhere, and I thought I recalled that being referred to as "matching". Seems like that's not the case here, though - thanks for the info.my string is "abqw", not "ab". And "match" means "match", not "contain" (for which there's a separate function STRING_CONTAINS_REGEXP)
#32
Posted 31 August 2007 - 03:03 AM