Suche hilfe für Gm-hack script

07/02/2009 20:42 teomat#1
Hallo, ich brauche hilfe bei einem CE-Script an dem ich grade schreibe, es soll im Charakterbildschirm erkennen welchen Charakter ich ausgewählt habe und direkt die ersten 4 Buchstaben des Namens hernehmen und in "00A420E4" einfüllen.

Das Problem ist das das Script Dekaron zum absturz bringt.

Hier erstmal das Script:

//Startscript
[ENABLE]
alloc(newmem2,1024)
label(returnhere1)
label(originalcode1)
label(exit1)

0040172C:
jmp newmem2
returnhere1:

newmem2:

push ebx //Variablen speichern
push eax
push ecx
mov ebx,00A420E4 //Adressen laden
mov eax,[edi-16] //[edi-16]=Name des ausgewählten Charakters
mov ecx,[eax] //1. Byte kopieren
mov [ebx],ecx //einfügen
mov ecx,[eax+04] //2. Byte kopieren
mov [ebx+04],ecx //einfügen...
mov ecx,[eax+08] //usw...
mov [ebx+08],ecx
mov ecx,[eax+0C] //usw...
mov [ebx+0C],ecx
pop ecx //variablen wieder überschreiben
pop eax
pop ebx

originalcode1:
shr ecx,02

exit1:
jmp returnhere1

[DISABLE]

0040172C:
shr ecx,02
dealloc(newmem2)
//Endscript



Die Adresse an der das ganze einsetzt wird aufgerufen wenn ich einen anderen Charakter auswähle.
Ich hab auch mehrmals [EDI-16] überprüft und es steht auch immer der Name des akktuellen Charakters drin.


Ich habe Assembler bis jetzt nur ein wenig in der Schule durchgenommen und habe mir viele AutoAssembler-scripts durchgesehen um sicherzugehen das ich alles verstanden habe. Ich bin ratlos, kann mir irgendjemand weiterhelfen?

Vielen Dank im voraus!!
07/02/2009 22:11 SoulDeath9#2
Bah english plz???
07/02/2009 22:39 teomat#3
i´ll need a moment to translate.

EDIT: Here´s the translation, sorry if it´s not perfect...

Quote:
Originally Posted by teomat View Post
Hello, I need help with a CE-Script I´m working on, it should recongnize in the charakter-selection window the name of the charakter i select, take the first 4 letters and put them in "00A420E4".

The problem is, that the script crashes Dekaron.

Here´s the script:

//Startscript
[ENABLE]
alloc(newmem2,1024)
label(returnhere1)
label(originalcode1)
label(exit1)

0040172C:
jmp newmem2
returnhere1:

newmem2:

push ebx //Save Variables
push eax
push ecx
mov ebx,00A420E4 //load Adressen
mov eax,[edi-16] //[edi-16]=selected Charakter´s name
mov ecx,[eax] //copy 1st Byte
mov [ebx],ecx //move
mov ecx,[eax+04] //copy 2nd Byte
mov [ebx+04],ecx //paste...
mov ecx,[eax+08] //and again...
mov [ebx+08],ecx
mov ecx,[eax+0C] //and again...
mov [ebx+0C],ecx
pop ecx //set back the variables
pop eax
pop ebx

originalcode1:
shr ecx,02

exit1:
jmp returnhere1

[DISABLE]

0040172C:
shr ecx,02
dealloc(newmem2)
//Endscript



The script starts when i choose a charakter.I tried to check the adress in [EDI-16] and there´s always the charakter name inside.


Until now i studied Assembly a bit at school and looked trough a lot of AutoAssembler-cripts to make sure i understood everything. I really dont know what to do now, someone could help me?

Thanks in advance!!
Edit: No one could help me?

EDIT: OMG, found out i calculated the offsets wrong, should be 04,08 and 0C