Skip to content

Instantly share code, notes, and snippets.

@alcaras
Created March 20, 2019 16:01
Show Gist options
  • Save alcaras/260001f4a40c0d7c571eae0f7a6576c1 to your computer and use it in GitHub Desktop.
Save alcaras/260001f4a40c0d7c571eae0f7a6576c1 to your computer and use it in GitHub Desktop.
f = open('simc.txt','r')
to_write = []
tmp = f.readline()
while(not tmp==''):
x = tmp.find('id=')
if(x==-1):
to_write.append(tmp)
else:
if(tmp.find('main_hand')>-1):
tmp = tmp[:-1]+',ilevel=415\n'
to_write.append(tmp)
else:
tmp = tmp[:-1]+',ilevel=415\n'
to_write.append(tmp)
tmp = f.readline()
f.close()
f = open('simc_415.txt','w')
f.writelines(to_write)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment