Maybe these two functions can be put into library functions. I'm not sure where to put them.
import scriptapi
def get_ansi_str(addr):
final_str = ''
i = 0
while True:
c = scriptapi.Memory.read(addr+i, 1)
if c == '\x00':
break
final_str += c
i += 1
return final_str
def get_wide_str(addr):
final_str = ''
i = 0
while True:
c = scriptapi.Memory.read(addr+i, 2)
if c == '\x00\x00':
break
final_str += c
i += 2
return final_str
Maybe these two functions can be put into library functions. I'm not sure where to put them.