Quote:
Originally Posted by Underavelvetmoon
There needs to be a sleep between each salvage, you aren't trying to salvage multiple items rapidly are you? If you do this even normally without a script it will crash your game. So if you have a loop to search for an item and salvage, there needs to be a sleep called in that loop.
|
I replicated his issue and it's coming from elsewhere.
not using the sleep between salvage isn't what's causing that crash, although you are 100% right, it will cause another crash if he doesn't add it.
The issue so far I've traced it back to the Command SalvageFunction and SalvageGlobal.
Code:
_('CommandSalvage:')
_('push eax')
_('push ecx')
_('push ebx')
_('mov ebx,SalvageGlobal')
_('mov ecx,dword[eax+4]')
_('mov dword[ebx],ecx')
_('add ebx,4')
_('mov ecx,dword[eax+8]')
_('mov dword[ebx],ecx')
_('mov ebx,dword[eax+4]')
_('push ebx')
_('mov ebx,dword[eax+8]')
_('push ebx')
_('mov ebx,dword[eax+c]')
_('push ebx')
_('call SalvageFunction')
_('add esp,C')
_('pop ebx')
_('pop ecx')
_('pop eax')
_('ljmp CommandReturn')
Code:
SetValue('SalvageFunction', MemoryRead(GetValue('ScanSalvageFunction') + 8) - 18)
SetValue('SalvageGlobal', MemoryRead(MemoryRead(GetValue('ScanSalvageGlobal') + 8) + 1))
SetValue('SalvageFunction', '0x' & Hex(GetScannedAddress('ScanSalvageFunction', -10), 8))
SetValue('SalvageGlobal', '0x' & Hex(MemoryRead(GetScannedAddress('ScanSalvageGlobal', 1) - 0x4), 8))
Need to verify if the address above are still valid and the Patterns below which is currently the right one if it didn't change to something else.
Code:
AddPattern('5F5E5B741A6860EA0000')
_('ScanSalvageFunction:')
;====================
AddPattern('8BFA8BD9897DF0895DF4') ;8BD9897DG0895DF4
;or
AddPattern('33C58945FC8B45088945F08B450C8945F48B45108945F88D45EC506A10C745EC75') ; was 'ec76' dec 18th, 2020 fix -P34
_('ScanSalvageGlobal:')