 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Recifense Grandmaster Cheater Supreme
Reputation: 70
Joined: 17 Mar 2008 Posts: 1734 Location: Recife - Pernambuco - Brazil
|
Posted: Tue Nov 10, 2009 6:43 am Post subject: 1701 A.D. (gold) V 1.0.4.1902 (GM and more) |
|
|
Hi guys,
Here is my contribution for "1701 A.D. - Gold" Version 1.0.4.1902. The script contains the following features:
- God Mode;
- Ship Cargo Load; (for selected ship)
- Colony Items on Warehouse; (minimum according to its size of selected warehouse)
- Minimum Money;
It is for CE 5.5
Here is the script:
| Code: |
//=========================================
// 1701 A.D.
// Game Version : 1.0.4.1902
// Script Version: 1.0
// CE Version : 5.5
// Money, Colony Resource, Boat load and GM
// 14-Oct-2009
//=========================================
[ENABLE]
alloc(MyCode,1024)
//=========================================
// Declaration section
label(_MonMoney)
label(_BackMM)
label(_ExitMM)
label(_MonCargo)
label(_BackMC)
label(_ExitMC)
label(_MonHP)
label(_BackMH)
label(_ExitMH)
label(_MonColony)
label(_BackMCo)
label(_ExitMCo)
label(_WorkPointers)
label(_ExitWP)
label(_SetRes)
label(_ExitSR)
label(_StorePointer)
label(_ExitSP)
label(_ChkPointers)
label(_ChkP0)
label(_ExitCP)
label(pMoney)
label(pCargo)
label(pUnit)
label(iEnableMM)
label(iEnableMC)
label(iEnableMH)
label(iEnableMCo)
label(pPrevious)
label(iCount)
label(iWork)
label(pRes)
registersymbol(MyCode)
registersymbol(pMoney)
registersymbol(pCargo)
registersymbol(pUnit)
registersymbol(iEnableMM)
registersymbol(iEnableMC)
registersymbol(iEnableMH)
registersymbol(iEnableMCo)
//=========================================
// Hacking Points
1701.exe+15a9fd:
jmp _MonMoney
nop
nop
_BackMM:
1701.exe+1c4af7:
jmp _MonCargo
nop
_BackMC:
1701.exe+183b7e:
jmp _MonHP
nop
_BackMH:
1701.exe+1fa457:
jmp _MonColony
nop
_BackMCo:
MyCode:
//=========================================
// God Mode
_MonMoney:
cmp dword ptr [iEnableMM],0
je _ExitMM // Jump if feature is disabled
cmp dword ptr [ecx+000000dc],0 // Player´s money?
jne _ExitMM // Jump if false
mov [pMoney],ecx // Save ptr for debugging
mov eax,#1024000000 // 1000000
cmp eax,[ecx+000000e8] // Current value < 1000000?
jle _ExitMM // Jump if false
mov [ecx+000000e8],eax // Make Current value = 1000000
_ExitMM:
mov eax,[ecx+edx*8+000000e8] // Original code
jmp _BackMM // Back to main code
//=========================================
_MonCargo:
mov [pCargo],eax // Save ptr for debugging
cmp dword ptr [iEnableMC],0
je _ExitMC // Jump if feature is disabled
mov ecx,[eax+10] // Get Cargo Type
cmp ecx,#46 // Special cargo?
jge _ExitMC // Jump if true
mov edx,#20 // Get cargo load
cmp edx,[eax+14] // Current Cargo >= 20?
jle _ExitMC // Jump if true
mov [eax+14],edx // Make cargo = 20
_ExitMC:
mov ecx,[eax+14] // Original code
lea esi,[eax+18] // Original code
jmp _BackMC // Back to main code
//=========================================
_MonHP:
mov [pUnit],ebp // Save ptr for debugging
cmp dword ptr [iEnableMH],0
je _ExitMH // Jump if feature is disabled
mov edx,[ebp-08] // Get ptr to colony
or edx,edx
jz _ExitMH // Jump if null pointer
cmp dword ptr [edx+00002608],0 // Player´s building?
je _ExitMH // Jump if false
mov eax,#100 // value2increase
_ExitMH:
mov edx,[ebp+ecx*4+08] // Original code
add eax,edx // Original code
jmp _BackMH // Back to main code
//=========================================
// Colony resources = maximum capacity - 20
_MonColony:
push eax
push ebx
push ecx
push edi
mov esi,[eax+00000304] // Original code
test esi,esi // Null pointer?
jz _ExitMCo // Jump if true
cmp dword ptr [eax+000002f4],1 // Building ?
jne _ExitMCo // Jump if false
cmp dword ptr [iEnableMCo],0
je _ExitMCo // Jump if feature is disabled
cmp dword ptr [esi+00002608],0 // Player´s colony?
je _ExitMCo // Jump if false
mov edi,[esi+00002a08] // Get ptr to Resources
or edi,edi
jz _ExitMCo // Jump if null pointer
mov ecx,[edi+00000158] // Get maximum capacity
lea ecx,[ecx-00004e20] // Adjust capacity (total - 20)
mov ebx,[edi+00000160] // Get ptr to resource queue
or ebx,ebx
jz _ExitMCo // Jump if null pointer
// ---- Initialization
// Ini Pointers
mov [pPrevious],ebx // Initialize Previous pointer
mov edx,[ebx+08] // Get ptr to last resource
or edx,edx
jz _ExitMCo // Jump if null pointer
mov dword ptr [iCount],0 // Initialize Counter
mov dword ptr [iWork],0 // Initialize Counter
call _StorePointer // Save 1st pointer to be worked
call _WorkPointers // Work on saved pointers
_ExitMCo:
pop edi
pop ecx
pop ebx
pop eax
jmp _BackMCo // Back to main code
//=========================================
_WorkPointers:
mov eax,[iWork] // Get current work pointer
cmp eax,[iCount] // Finished?
jge _ExitWP // Jump if true
mov eax,[pRes+eax*4] // Get ptr to resource
call _SetRes // Set resource to minimum/maximum
call _ChkPointers // Check if this resource points to other
mov [pPrevious],eax // Save this resource as previous one
inc dword ptr [iWork] // Adjust counter
jmp _WorkPointers // Continue
_ExitWP:
ret
//=========================================
// Make current resource = min/max
// EAX = ptr to resource structure
_SetRes:
cmp dword ptr [eax+0c],#46 // Special item?
jge _ExitSR // Jump if true
cmp ecx,[eax+10] // Current value = Min/max?
je _ExitSR // Jump if true
mov [eax+10],ecx // Make resource value = min/max
_ExitSR:
ret
//=========================================
// EDX = pointer
_StorePointer:
push ecx
mov ecx,[iCount] // Get current counter value
cmp ecx,#50 // Full?
jge _ExitSP // Jump if true
mov [pRes+ecx*4],edx // Save poiter to resource
inc ecx // Adjust counter ...
mov [iCount],ecx // ... and save it
_ExitSP:
pop ecx
ret
//=========================================
// Store valid pointers
// EAX = ptr to first pointer
// EBX = ptr to resource queue
_ChkPointers:
push ecx
mov ecx,3 // Number of possible valid pointers
_ChkP0:
or ecx,ecx // Finished?
jz _ExitCP // Jump if true
dec ecx // Adjust index
mov edx,[eax+ecx*4] // Get pointer to other resource item
cmp ebx,edx // Valid ?
je _ChkP0 // Jump if false
cmp edx,[pPrevious] // Valid?
je _ChkP0 // Jump if false
call _StorePointer // Save pointer to work later
jmp _ChkP0 // Jump if finished
_ExitCP:
pop ecx
ret
//=========================================
// Variables
pMoney:
dd 0
pCargo:
dd 0
pUnit:
dd 0
iEnableMM:
dd 1
iEnableMC:
dd 1
iEnableMH:
dd 1
iEnableMCo:
dd 1
pPrevious:
dd 0
iCount:
dd 0
iWork:
dd 0
pRes:
dd 0
//=========================================
// Original Codes
[DISABLE]
1701.exe+15a9fd:
mov eax,[ecx+edx*8+000000e8]
1701.exe+1c4af7:
mov ecx,[eax+14]
lea esi,[eax+18]
1701.exe+183b7e:
mov edx,[ebp+ecx*4+08]
add eax,edx
1701.exe+1fa457:
mov esi,[eax+00000304]
dealloc(MyCode)
unregistersymbol(MyCode)
unregistersymbol(pMoney)
unregistersymbol(pCargo)
unregistersymbol(pUnit)
unregistersymbol(iEnableMM)
unregistersymbol(iEnableMC)
unregistersymbol(iEnableMH)
unregistersymbol(iEnableMCo)
|
Here are some info for adapting this script for other versions of this game:
| Code: |
_MonMoney:
0055A9EE - cc - int 3
0055A9EF - cc - int 3
0055A9F0 - 8b 54 24 04 - mov edx,[esp+04]
0055A9F4 - 85 d2 - test edx,edx
0055A9F6 - 7c 1d - jnge cgameengine::loadlevel+b135
0055A9F8 - 83 fa 04 - cmp edx,04
0055A9FB - 7d 18 - jnl cgameengine::loadlevel+b135
0055A9FD - 8b 84 d1 e8 00 00 00 - mov eax,[ecx+edx*8+000000e8] <--- Hacking point
0055AA04 - 8b 94 d1 ec 00 00 00 - mov edx,[ecx+edx*8+000000ec]
0055AA0B - b1 0a - mov cl,0a
0055AA0D - e8 2e 2d 16 00 - call tagescdident2+a5a0
0055AA12 - c2 04 00 - ret 0004
0055AA15 - 33 c0 - xor eax,eax
0055AA17 - 33 d2 - xor edx,edx
0055AA19 - c2 04 00 - ret 0004
0055AA1C - cc - int 3
0055AA1D - cc - int 3
|
| Code: |
_MonCargo:
005C4AE4 - 56 - push esi
005C4AE5 - 8b c7 - mov eax,edi
005C4AE7 - 8a 48 0c - mov cl,[eax+0c]
005C4AEA - 8b 3f - mov edi,[edi]
005C4AEC - 88 4c 24 10 - mov [esp+10],cl
005C4AF0 - 8b 50 10 - mov edx,[eax+10]
005C4AF3 - 89 54 24 14 - mov [esp+14],edx
005C4AF7 - 8b 48 14 - mov ecx,[eax+14] <--- Hacking point
005C4AFA - 8d 70 18 - lea esi,[eax+18]
005C4AFD - 8d 54 24 1c - lea edx,[esp+1c]
005C4B01 - 3b d6 - cmp edx,esi
005C4B03 - 89 4c 24 18 - mov [esp+18],ecx
005C4B07 - 74 28 - je cgameengine::loadlevel+75251
005C4B09 - 8b 46 08 - mov eax,[esi+08]
005C4B0C - 6a ff - push ff
005C4B0E - 50 - push eax
005C4B0F - 8b ca - mov ecx,edx
|
| Code: |
_MonHP:
00583B70 - 7c 22 - jnge cgameengine::loadlevel+342b4
00583B72 - 83 fe 06 - cmp esi,06
00583B75 - 7f 1d - jg cgameengine::loadlevel+342b4
00583B77 - 8d 4e ff - lea ecx,[esi-01]
00583B7A - 85 c9 - test ecx,ecx
00583B7C - 7c 16 - jnge cgameengine::loadlevel+342b4
00583B7E - 8b 54 8d 08 - mov edx,[ebp+ecx*4+08] <--- Hacking point
00583B82 - 01 d0 - add eax,edx
00583B84 - 3d a0 86 01 00 - cmp eax,000186a0
00583B89 - 7c 05 - jnge cgameengine::loadlevel+342b0
00583B8B - b8 a0 86 01 00 - mov eax,000186a0
00583B90 - 89 44 8d 08 - mov [ebp+ecx*4+08],eax
00583B94 - 5f - pop edi
00583B95 - 5e - pop esi
00583B96 - 5d - pop ebp
00583B97 - 5b - pop ebx
00583B98 - c2 0c 00 - ret 000c
|
| Code: |
_MonColony:
005FA439 - 8b f9 - mov edi,ecx
005FA43B - 8b 4f 04 - mov ecx,[edi+04]
005FA43E - 8b 89 88 0b 00 00 - mov ecx,[ecx+00000b88]
005FA444 - 8d 44 24 08 - lea eax,[esp+08]
005FA448 - 50 - push eax
005FA449 - e8 92 46 f2 ff - call cmaincontrol::initmaincontrol+6fff0
005FA44E - 85 c0 - test eax,eax
005FA450 - 0f 84 80 00 00 00 - je cgameengine::loadlevel+aabf6
005FA456 - 56 - push esi
005FA457 - 8b b0 04 03 00 00 - mov esi,[eax+00000304] <--- Hacking point
005FA45D - 85 f6 - test esi,esi
005FA45F - 74 74 - je cgameengine::loadlevel+aabf5
005FA461 - 8b 4f 04 - mov ecx,[edi+04]
005FA464 - 53 - push ebx
005FA465 - 6a 00 - push 00
005FA467 - e8 e4 37 f4 ff - call cworldmanager::loaddefaultvalues+e6a0
005FA46C - 8b ce - mov ecx,esi
005FA46E - 50 - push eax
005FA46F - e8 0c e1 f7 ff - call cgameengine::loadlevel+28ca0
005FA474 - 8b f0 - mov esi,eax
005FA476 - f7 de - neg esi
005FA478 - bb 00 00 00 00 - mov ebx,00000000
005FA47D - 0f 99 c3 - setns bl
|
| Code: |
My Notes:
1701 A.D.:
Disp Res = Res/1000
struc resource:
000c = TypeID (0 = wood, 1 = tools, 2 = Bricks, 6 = fish)
0010 = iQtty*1000 (10 = 10000<->10999)
0014 = i1 (basic resources)
struct money:
0000 = 00d3c6e8
0004 = 00d123b4
00e8 = iMoney*1024 (disp = this / 1024)
struct ShipCargo (sz = 2c):
0010 = TypeID
0014 = iQtty * 1 (1 = 1) :)
0018 = 00d12c00
001c = i0
0020 = i0
0024 = i0
0028 = i0
cargo type:
00 = Wood 01 = Tools 02 = Bricks 03 = Marble 04 = Gold
05 = ? 06 = Food 07 = Cloth 08 = Alcohol 09 = ?
10 = Tobacco 11 = Lamp Oil 12 = ? 13 = Jewelry 14 = Perfume
15 = Chocolates 16 = Furs 17 = Talismans 18 = Jade 19 = Ivory
20 = Tiger Meat 21 = Elephant M 22 = Bear Meat 23 = Luminious Fish 24 = Iron Wood Trees
25 = ? 26 = ? 27 = Wool 28 = Sugarcanes 29 = Hops
30 = Cattle 31 = Grain 32 = Flour 33 = Whale Oil 34 = Iron Ore
35 = Raw Iron 36 = Tobacco 37 = ? 38 = Gems 39 = Blossoms
40 = Ambergris 41 = Honey 42 = Cocoa 43 = Weapons 44 = Cannons
45 = Horses 46 = ? 47 = ? 48 = ? 49 = ?
50 = Floating Cargo 51 = Wrackage 52 = Castways 53 = Treasure 54 = Cargo
55 = Pirate Flag
56 = Document
57 = Treasure Map
58 = 59 = 60 = 61 = Treasure
62 = Tonic
63 = Sir Blakemore
64 = Elixir
struct hp:
0000 = 00d3fc4c
0004 = pStrShip
0008 = i%HP (*1000)
000c = i100000
0010 = i100000
0014 = i100000
0018 = i100000
001c = i100000
0020 = imHP
0024 = iCannons * 60
0028 = i6758
002c = i8192 (8K)
0030 = imLoad
struct Unit:
0000 = 00d3d658
01ec = i (0 = building)
02d8 = p (0 = building)
02dc = p (0 = building)
02f4 = i (1 = building)
0304 = pColony
0308 = 03759cd8
030c = ini struct hp ....
struct Colony:
0000 = 00d3f348
1b14 = xxxxxxx0 (player´s)
2608 = i-200 (player´s)
2a08 = pBasicResources
2cb0 = xxxx0101 (player´s)
struct BasicResources:
0000 = 00d4b528
0004 = 00d123b4
0154 = pColony
0158 = iMaxCapacity
0160 = ppResources
struct pResources:
0000 = p1stResource
0004 = p2ndResource
0008 = p3rdResource
000c = i0
0010 = i0
1701.exe+15a9fd:
mov eax,[ecx+edx*8+000000e8]
mov edx,[ecx+edx*8+000000ec]
mov cl,0a
1701.exe+1c4af7:
mov ecx,[eax+14]
lea esi,[eax+18]
lea edx,[esp+1c]
cmp edx,esi
1701.exe+183b7e:
mov edx,[ebp+ecx*4+08]
add eax,edx
cmp eax,000186a0
jnge cgameengine::loadlevel+342b0
mov eax,000186a0
mov [ebp+ecx*4+08],eax
================================================
AddOn: Sunken Dragon:
|
That´s it.
Cheers!
| Description: |
|
 Download |
| Filename: |
1701AD_GM_More.CEA |
| Filesize: |
7.94 KB |
| Downloaded: |
840 Time(s) |
|
|
| Back to top |
|
 |
davethewave_83 Advanced Cheater
Reputation: 0
Joined: 03 May 2006 Posts: 59
|
Posted: Sun Sep 23, 2012 3:54 pm Post subject: Re: 1701 A.D. (gold) V 1.0.4.1902 (GM and more) |
|
|
Error in line 59 (1701.exe+15a9fd:) This address specifier is not valid
_________________
All hail our glorious leader!
The forum rules make our lives so much easier. We don't have to think anymore, all thanks to our leader!
Don't you agree, comrade ? |
|
| Back to top |
|
 |
Geri I post too much
Reputation: 76
Joined: 05 Feb 2010 Posts: 4027
|
Posted: Sun Sep 23, 2012 4:35 pm Post subject: |
|
|
If you attach Cheat Engine to the game (1701.exe) before you copy-paste the script, it will probably work.
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|