View previous topic :: View next topic |
Author |
Message |
Rawrrr How do I cheat?
Reputation: 0
Joined: 01 Mar 2007 Posts: 9
|
Posted: Thu Mar 08, 2007 11:56 am Post subject: Help with some code |
|
|
Darkbyte-
In your 5.3 source code in the "formMemoryModifier.pas" you have some code (i'm assuming for the trainer icon) that seems to cause an error if it is not commented out in some places. Maybe i'm wrong... but would like to know how to correct this error so i can make trainers with icons.
Code: | //search for the icon
searcher:=trainer.memory;
scanstring:='And so, Dark Byte, wrote the text into the icon, So he could find it back...';
i:=0;
j:=1;
while (i<trainer.size) do
begin
if searcher^=scanstring[j] then
begin
if j=length(scanstring) then
begin
dec(searcher,j);
dec(i,j+199);
break;
end;
inc(j);
end else j:=1;
inc(searcher);
inc(i);
end;
if j<length(scanstring) then raise exception.create('Please, dont mess with the exe!');
//replace it
iconstream:=TMemorystream.Create;
icon.Picture.Icon.SaveToStream(iconstream);
getmem(iconbuf,744);
iconstream.Position:=22;
iconstream.ReadBuffer(iconbuf^,744);
iconstream.Free;
trainer.Position:=i;
trainer.WriteBuffer(iconbuf^,744);
freemem(iconbuf); |
Now if i leave this how it is... then when i go to make trainers with my UCE what i get is "Please, dont mess with the exe!" even after i choose a new icon for the program.
If i comment out this line.
Code: | //if j<length(scanstring) then raise exception.create('Please, dont mess with the exe!" |
I can make trainers... choose an icon for the trainer but it doesn't save the icon to the trainer when the trainer is made. Could you please lend some insight into this. Thanks.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Thu Mar 08, 2007 12:04 pm Post subject: |
|
|
Give the standalone trainer the "findicon.ico" icon.
That icon is used to find the spot that should be overwritten with the user's icon
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Rawrrr How do I cheat?
Reputation: 0
Joined: 01 Mar 2007 Posts: 9
|
Posted: Thu Mar 08, 2007 1:05 pm Post subject: |
|
|
Thanks for the quick reply...
Edit* was confused at your post for a min... but slowly it started sinking in. It works perfectly without a hitch now. Thanks a million.
|
|
Back to top |
|
 |
|