Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$lua}
- if(getCEVersion() < 6.5) then
- ShowMessage('Sorry. CE version should be 6.5 or above')
- end
- {$asm}
- //=========================================
- // Checking Selected Process
- {$lua}
- if(process == nil) then
- ShowMessage('No process was selected')
- elseif (process ~= "stellaris.exe") then
- ShowMessage('Error. Expected Process = stellaris.exe')
- end
- {$asm}
- //=========================================
- // Definitions
- define(LUDO,"stellaris.exe")
- define(MOHP,stellaris.exe+0046d484) //###====###=X==#=
- define(MOSC,stellaris.exe+0012e024) //==#====#======X=
- define(MOSS,stellaris.exe+002ffa0f) //=======X======#=
- define(MOSF,stellaris.exe+005579db) //=======X===X==#=
- define(MOSP,stellaris.exe+004af827) //==#====#===#==X#
- define(MSTE,stellaris.exe+00493f48) //N=#====#===#====
- define(MSTP,stellaris.exe+00340eb3) //-------N===X====
- define(MORP,stellaris.exe+00342c81) //=##===#X===#====
- define(MOTP,stellaris.exe+00230cc3) //==#====#===X====
- define(MOIP,stellaris.exe+00231a0f) //==#====#===X===#
- define(MOPP,stellaris.exe+003a98c0) //==#====#========
- define(MPP2,stellaris.exe+00386185) //==#====#===#==##
- define(MPP3,stellaris.exe+001c71b7) //-N#====#===#==##
- define(MOCP,stellaris.exe+0021a42f) //==#====#===X==##
- define(MCP2,stellaris.exe+0022e7c1) //-------N========
- define(MOBP,stellaris.exe+003860c0) //==#====X===#==##
- define(MBP2,stellaris.exe+0022ba94) //==#====#===X===#
- define(MOPT,stellaris.exe+00121c11) //==#====#=#=#==##
- define(MOSH,stellaris.exe+002fe245) //==#====#===#====
- define(MOFW,stellaris.exe+0041e69e) //N=#====X========
- define(MOPF,stellaris.exe+001c845e) //N##====###=#==##
- define(MOTH,stellaris.exe+0033e622) //N=#====#===#====
- define(MOTM,stellaris.exe+0033ec97) //N=#====#========
- define(MTM2,stellaris.exe+0033ece2) //N=#====#========
- define(MOCX,stellaris.exe+0012c58c) //--------------N=
- define(MRIO,stellaris.exe+004cf0f5) //N#=====#===X====
- define(MOTC,stellaris.exe+001c6e53) //-N#====X===X==##
- define(MOML,stellaris.exe+0015de68) //-N#====#===#==#=
- define(MOWH,stellaris.exe+0038ddfa) //-----N=#========
- define(MBP3,stellaris.exe+0022d6e9) //-----N=#=#=====#
- define(MOFH,stellaris.exe+0041e74d) //------N#========
- define(MBP4,stellaris.exe+00239ca6) //-----------N==#=
- define(MOIM,stellaris.exe+0041f6fb) //--------N==#====
- define(MIM2,stellaris.exe+0041e79f) //--------N=======
- define(MIM3,stellaris.exe+0041b2bb) //--------N=======
- define(MIM4,stellaris.exe+0041b5cb) //--------N=======
- define(MIM5,stellaris.exe+002fb466) //--------N=======
- define(MIM6,stellaris.exe+0038ddd8) //-----------N====
- define(OOIM,stellaris.exe+00f7b055) //--------N==#====
- define(MOPA,stellaris.exe+002b63be) //-----------N==##
- define(MOAR,stellaris.exe+002b4811) //-----------N====
- define(MAR2,stellaris.exe+002b4845) //-----------N====
- define(MOSM,stellaris.exe+005ab9cf) //-------------N#=
- define(MAXINDEX,#1133)
- //=========================================
- // Constants used in the script (that can be changed)
- define(ctCE66,(float)6.6)
- //=========================================
- [ENABLE]
- //=========================================
- //LuaCall(CheckVersion())
- //=========================================
- // Check if script is compatible to this game version
- // If false the script will not be loaded
- assert(MOHP,8b 8e d0 07 00 00 8b 01 8b 40 3c ff d0 8b 0d ?? ?? ?? ?? 84 c0 ?? ??)
- assert(MOSC,8b b1 98 00 00 00 85 f6 ?? ?? 8b c6 5e 5f c3 81 c1 8c 00 00 00 e8 ??)
- assert(MOSS,8b 87 98 00 00 00 8b cf 89 45 c0 8d 45 a0 6a 00 50 e8 ?? ?? ?? ?? 8b)
- assert(MOSF,8b b0 c4 06 00 00 3b fe b8 47 00 00 00 0f 4c c1 8d 4d b4 89 45 d8 e8)
- assert(MOSP,8b b8 18 02 00 00 8b c7 25 ff ff ff 00 3b 42 10 ?? ?? 8d 0c 40 8b 42)
- assert(MSTE,8b 48 6c 8b 01 8b 40 04 ff d0 8d 4d d8 84 c0 0f 84 ?? ?? ?? ?? 6a 05)
- assert(MSTP,8b 49 28 89 0a 8d 4d bc e8 ?? ?? ?? ?? 50 68 ?? ?? ?? ?? ba ?? ?? ??)
- assert(MORP,8b 73 04 8b 01 8b 40 1c ff d0 84 c0 ?? ?? ff 73 08 8d 45 f8 50 8d 8f)
- assert(MOTP,8b 4b 1c 5f 5e 3b 08 5b 0f 9d c0 8b 4d f4 64 89 0d 00 00 00 00 8b e5)
- assert(MOIP,8b 4e 1c 8d 45 08 c7 45 08 a0 86 01 00 3b 08 5e 0f 9d c0 5d c2 04 00)
- assert(MOPP,8b 4e 2c 33 c0 3b 4d fc 5f 5e 0f 9d c0 5b 8b e5 5d c3 cc ?? ?? ?? ??)
- assert(MPP2,01 41 2c 32 c9 8b 43 48 2b 43 44 c1 f8 02 88 4d ee 89 45 e8 85 c0 0f)
- assert(MPP3,01 41 2c 8b 0f 8b 09 e8 ?? ?? ?? ?? 84 c0 0f 84 ?? ?? ?? ?? 8b 07 c6)
- assert(MOCP,8b 36 03 77 24 3b 35 ?? ?? ?? ?? ?? ?? c7 47 24 18 fc ff ff c7 47 20)
- assert(MCP2,01 43 48 5e 5f 5b 5d c2 04 00 8b 4b 04 8b 01 8b 40 1c ff d0 84 c0 ??)
- assert(MOBP,89 5d e0 83 7b 08 00 0f 8c ?? ?? ?? ?? ff 43 08 8b 15 ?? ?? ?? ?? 85)
- assert(MBP2,8b 4e 24 89 45 08 8d 45 08 3b 08 5e 0f 9d c0 5d c2 04 00 8b 4e 24 3b)
- assert(MOPT,8b 4b 6c 8b 01 8b 40 04 ff d0 84 c0 ?? ?? 5b 8b 4d f4 64 89 0d 00 00)
- assert(MOSH,29 b7 80 00 00 00 8b 0d ?? ?? ?? ?? 83 c1 7c 8d 41 04 f7 d9 1b c9 23)
- assert(MOFW,ff 87 9c 00 00 00 8b b7 9c 00 00 00 89 4d e0 8d 4d c4 6a 00 c7 45 c4)
- assert(MOPF,89 83 b8 02 00 00 8d 45 ec 8b 35 ?? ?? ?? ?? 50 e8 ?? ?? ?? ?? 8b 8b)
- assert(MOTH,8b 07 29 43 28 8d 83 a4 00 00 00 8b 4b 24 50 8d 45 08 50 e8 ?? ?? ??)
- assert(MOTM,8b 45 08 29 56 60 8b 4e 60 5e 89 08 8b e5 5d c2 08 00 85 d2 ?? ?? 8b)
- assert(MTM2,8b 45 08 29 56 60 8b 4e 60 5e 89 08 8b e5 5d c2 08 00 cc cc ?? ?? ??)
- assert(MOCX,8b 4f 70 3b 08 ?? ?? 6a 01 8b cf e8 ?? ?? ?? ?? 8b 47 74 3b 05 ?? ??)
- assert(MRIO,8b 7a 04 2b 3a c1 ff 02 85 ff 0f 8e ?? ?? ?? ?? 8b 83 dc 05 00 00 03)
- assert(MOTC,69 46 40 e8 03 00 00 39 46 48 0f 9d c0 84 c0 0f 84 ?? ?? ?? ?? 8b 46)
- assert(MOML,8a 80 2d 26 00 00 84 c0 ?? ?? 8b 4c cb 04 8b 15 ?? ?? ?? ?? 3b ca ??)
- assert(MOWH,3b 46 20 0f 9e c0 5f 5e 5b 8b e5 5d c3 5f 5e 32 c0 5b 8b e5 5d c3 ff)
- assert(MBP3,01 47 34 5f 5e 5b 8b e5 5d c2 04 00 a1 ?? ?? ?? ?? 6b cb 64 80 7c 01)
- assert(MOFH,ff 87 98 00 00 00 39 87 98 00 00 00 0f 8c ?? ?? ?? ?? 8b cf e8 ?? ??)
- assert(MBP4,5e 8b 00 01 43 5c 5b 8b e5 5d c2 04 00 8b 4b 04 8b 01 8b 40 1c ff d0)
- assert(MOIM,80 3d ?? ?? ?? ?? 00 53 8b d9 57 89 5d e8 ?? ?? 8b 55 08 8b 42 04 89)
- assert(MIM2,80 3d ?? ?? ?? ?? 00 8d 77 3c ?? ?? e8 ?? ?? ?? ?? 50 8b ce e8 ?? ??)
- assert(MIM3,80 3d ?? ?? ?? ?? 00 53 56 8b f1 57 89 75 ec ?? ?? 33 c0 8b 4d f4 64)
- assert(MIM4,80 3d ?? ?? ?? ?? 00 53 56 8b f1 57 89 75 ec ?? ?? 33 c0 8b 4d f4 64)
- assert(MIM5,80 3d ?? ?? ?? ?? 00 53 56 57 8b fa 8b d9 89 7d e8 89 5d e4 ?? ?? a1)
- assert(MIM6,80 3d ?? ?? ?? ?? 00 ?? ?? b0 01 5f 5e 5b 8b e5 5d c3 6a 00 8d 45 fc)
- assert(MOPA,89 4d f8 8b 4d 0c 57 e8 ?? ?? ?? ?? 8b f8 8b 8f cc 07 00 00 8b 01 8b)
- assert(MOAR,03 ce 03 c1 b9 e8 03 00 00 f7 e9 6a 00 68 a0 86 01 00 52 50 e8 ?? ??)
- assert(MAR2,3d 8c 6c e7 ff 0f 8e ?? ?? ?? ?? 3d 9b c4 20 00 0f 8d ?? ?? ?? ?? 69)
- assert(MOSM,8b 89 a8 00 00 00 85 c9 ?? ?? 83 c9 ff ?? ?? 8b 46 28 3d 8c 6c e7 ff)
- //=========================================
- alloc(MyCode,4096,$process)
- //=========================================
- // Declaration section
- label(_MonHumanPlayer)
- label(_BackMHP)
- label(_ExitMHP)
- label(_MonSelChar)
- label(_BackMSC)
- label(_ExitMSC)
- label(_MonSelShip)
- label(_BackMSS)
- label(_ExitMSS)
- label(_MonSelFleet)
- label(_BackMSF)
- label(_ExitMSF)
- label(_MonSelPlanet)
- label(_BackMSP)
- label(_ExitMSP)
- label(_MonSelTile)
- label(_BackSTE)
- label(_ExitSTE)
- label(_MonSelTroop)
- label(_BackMST)
- label(_ExitMST)
- label(_MonResearchProg)
- label(_MonRP00)
- label(_BackMRP)
- label(_ExitMRP)
- label(_MonTaskProg)
- label(_BackMTP)
- label(_ExitMTP)
- label(_MonInvestigationProg)
- label(_BackMIP)
- label(_ExitMIP)
- label(_MonProdProg)
- label(_BackMPP)
- label(_ExitMPP)
- label(_MonProdProg2)
- label(_BackPP2)
- label(_ExitPP2)
- label(_MonProdProg3)
- label(_BackPP3)
- label(_ExitPP3)
- label(_MonColProg)
- label(_BackMCP)
- label(_ExitMCP)
- label(_MonColProg2)
- label(_BackCP2)
- label(_ExitCP2)
- label(_MonBuildProg)
- label(_BackMBP)
- label(_ExitMBP)
- label(_MonBuildProg2)
- label(_BackBP2)
- label(_ExitBP2)
- label(_MonPlanetTiles)
- label(_BackMPT)
- label(_ExitMPT)
- label(_MonShipHull)
- label(_BackMSH)
- label(_ExitMSH)
- label(_MonFleetWarpWD)
- label(_BackMFW)
- label(_ExitMFW)
- label(_MonPlanetFortification)
- label(_BackMPF)
- label(_ExitMPF)
- label(_MonTroopHealth)
- label(_BackMTH)
- label(_ExitMTH)
- label(_MonTroopMorale)
- label(_BackMTM)
- label(_ExitMTM)
- label(_MonTroopMorale2)
- label(_BackTM2)
- label(_ExitTM2)
- label(_MonCharXP)
- label(_BackMCX)
- label(_ExitMCX)
- label(_MonResourceInfo)
- label(_BackRIO)
- label(_ExitRIO)
- label(_MonTileConst)
- label(_BackMTC)
- label(_ExitMTC)
- label(_MonMaxLeaders)
- label(_BackMML)
- label(_ExitMML)
- label(_MonWormhole)
- label(_BackMWH)
- label(_ExitMWH)
- label(_MonBuildProg3)
- label(_BackBP3)
- label(_ExitBP3)
- label(_MonFleetHyper)
- label(_BackMFH)
- label(_ExitMFH)
- label(_MonBuildProg4)
- label(_BackBP4)
- label(_ExitBP4)
- label(_MonInstantMove)
- label(_BackMIM)
- label(_ExitMIM)
- label(_MonInstantMove2)
- label(_BackIM2)
- label(_ExitIM2)
- label(_MonInstantMove3)
- label(_BackIM3)
- label(_ExitIM3)
- label(_MonInstantMove4)
- label(_BackIM4)
- label(_ExitIM4)
- label(_MonInstantMove5)
- label(_BackIM5)
- label(_ExitIM5)
- label(_MonInstantMove6)
- label(_BackIM6)
- label(_ExitIM6)
- label(_MonPlanetAnomaly)
- label(_BackMPA)
- label(_ExitMPA)
- label(_MonAnomalyRisk)
- label(_BackMAR)
- label(_ExitMAR)
- label(_MonAnomalyRisk2)
- label(_BackAR2)
- label(_ExitAR2)
- label(_MonSelMega)
- label(_BackMSM)
- label(_ExitMSM)
- label(iEnableMMR)
- label(iEnableMSR)
- label(iEnableMRP)
- label(iEnableMTP)
- label(iEnableMPP)
- label(iEnableMCP)
- label(iEnableMBP)
- label(iEnableMPT)
- label(iEnableGMD)
- label(iEnableMFW)
- label(iEnableMTM)
- label(iEnableQRP)
- label(iEnableMML)
- label(iEnableMTF)
- label(iEnableQCP)
- label(iEnableMIM)
- label(iEnableSPO)
- label(iEnableRIU)
- label(iEnableMBM)
- label(iEnableMPA)
- label(iEnableMAR)
- label(iEnableIPR)
- label(iEnableMCX)
- label(iOwnerID)
- label(iStatusID)
- label(iResIndex)
- label(iResMax)
- label(iMinUnity)
- label(pPlayer)
- label(pRuler)
- label(pChar)
- label(pPlanet)
- label(pShip)
- label(pFleet)
- label(pCommon)
- label(pStatusInfo)
- label(pProd)
- label(pTile)
- label(pResInfo)
- label(pTroop)
- label(pMega)
- //=========================================
- // Registering Symbols
- registersymbol(MyCode)
- registersymbol(iEnableMMR)
- registersymbol(iEnableMSR)
- registersymbol(iEnableMRP)
- registersymbol(iEnableMTP)
- registersymbol(iEnableMPP)
- registersymbol(iEnableMCP)
- registersymbol(iEnableMBP)
- registersymbol(iEnableMPT)
- registersymbol(iEnableGMD)
- registersymbol(iEnableMFW)
- registersymbol(iEnableMTM)
- registersymbol(iEnableQRP)
- registersymbol(iEnableMML)
- registersymbol(iEnableMTF)
- registersymbol(iEnableQCP)
- registersymbol(iEnableMIM)
- registersymbol(iEnableSPO)
- registersymbol(iEnableRIU)
- registersymbol(iEnableMBM)
- registersymbol(iEnableMPA)
- registersymbol(iEnableMAR)
- registersymbol(iEnableIPR)
- registersymbol(iEnableMCX)
- registersymbol(iOwnerID)
- registersymbol(iStatusID)
- registersymbol(iResIndex)
- registersymbol(iResMax)
- registersymbol(iMinUnity)
- registersymbol(pPlayer)
- registersymbol(pRuler)
- registersymbol(pChar)
- registersymbol(pPlanet)
- registersymbol(pShip)
- registersymbol(pFleet)
- registersymbol(pCommon)
- registersymbol(pStatusInfo)
- registersymbol(pTile)
- registersymbol(pResInfo)
- registersymbol(pTroop)
- registersymbol(pMega)
- //=========================================
- MyCode:
- //========================================= 160
- // At main game screen
- _MonHumanPlayer:
- push eax
- push ebx
- push edx
- push edi
- mov edi,esi
- mov ecx,[edi+08]
- test ecx,ecx
- js _ExitMHP
- mov [pPlayer],edi
- mov [iOwnerID],ecx
- mov ecx,[edi+00000114]
- mov [pCommon],ecx
- cmp dword ptr [iEnableMSR],0
- je _MonHPZZ // Jump if feature is disabled
- mov ecx,#200000
- mov ebx,[edi+00000178]
- cmp ebx,ecx
- cmovs ebx,ecx
- mov [edi+00000178],ebx
- mov ebx,[edi+0000017c]
- cmp ebx,ecx
- cmovs ebx,ecx
- mov [edi+0000017c],ebx
- mov ebx,[edi+00000180]
- cmp ebx,ecx
- cmovs ebx,ecx
- mov [edi+00000180],ebx
- _MonHPZZ:
- mov ecx,[edi+000007d0]
- test ecx,ecx
- jz _ExitMHP
- cmp dword ptr [iEnableMMR],0
- je _ExitMHP // Jump if feature is disabled
- mov ebx,[ecx+58]
- test ebx,ebx
- jz _ExitMHP
- mov edx,[ecx+5c]
- test edx,edx
- jz _ExitMHP
- _MonHP00:
- cmp ebx,edx
- jns _ExitMHP
- mov ecx,[ebx]
- mov eax,[ecx+0c]
- cmp eax,'unit'
- je _MonHPNU
- mov eax,[ecx+84]
- test eax,eax
- jns _MonHPNS
- jmp _MonHP01
- _MonHPNU:
- cmp dword ptr [iEnableRIU],0
- je _MonHP01 // Jump if feature is disabled
- mov eax,[iMinUnity]
- imul eax,eax,#2000
- _MonHPNS:
- shr eax,1
- mov ecx,[ecx+000000b4] // Get Res ID
- call _ChkAdditionalRes
- add eax,ecx
- test eax,eax
- jnz _MonHPNZ
- _MonHPNZ:
- cmp eax,[ebx+04]
- js _MonHP01
- mov [ebx+04],eax
- _MonHP01:
- lea ebx,[ebx+10]
- jmp _MonHP00
- _ExitMHP:
- pop edi
- pop edx
- pop ebx
- pop eax
- mov ecx,[esi+000007D0] // Original code (get pResourcesInfo)
- jmp _BackMHP // Back to main code
- //========================================= 160 X
- // Character Under Cursor (displaying age)
- _MonSelChar:
- mov [pChar],ecx
- _ExitMSC:
- mov esi,[ecx+00000098] // Original code (get age)
- jmp _BackMSC // Back to main code
- //========================================= 160 *
- // Last selected ship/station (UC on flee view)
- _MonSelShip:
- mov [pShip],edi
- _ExitMSS:
- mov eax,[edi+00000098] // Original code (get cHull)
- jmp _BackMSS // Back to main code
- //========================================= 160
- // Last selected fleet/station
- _MonSelFleet:
- mov [pFleet],eax
- _ExitMSF:
- mov esi,[eax+000006C4] // Original code (get Total Hull)
- jmp _BackMSF // Back to main code
- //========================================= 161 *
- // Last selected planet/sun/asteroid
- _MonSelPlanet:
- mov [pPlanet],eax
- _ExitMSP:
- mov edi,[eax+00000218] // Original code (get value)
- jmp _BackMSP // Back to main code
- //========================================= 150 ok
- // Last selected Tile
- _MonSelTile:
- mov [pTile],eax
- _ExitSTE:
- mov ecx,[eax+6C] // Original code (get pInfo)
- mov eax,[ecx] // Original code
- jmp _BackSTE // Back to main code
- //========================================= 131 ok
- // Last Troop Under Cursor
- _MonSelTroop:
- mov [pTroop],ecx
- _ExitMST:
- mov ecx,[ecx+28] // Original code (get HP)
- mov [edx],ecx // Original code
- jmp _BackMST // Back to main code
- //========================================= 150 ok
- // Every day
- _MonResearchProg:
- cmp dword ptr [iEnableMRP],0
- je _ExitMRP // Jump if feature is disabled
- cmp edi,[pPlayer]
- jne _ExitMRP
- mov esi,[ebx+04]
- test esi,esi
- jz _ExitMRP
- cmp dword ptr [iEnableSPO],0
- je _MonRP00 // Jump if feature is disabled
- cmp dword ptr [ecx+24],3
- jne _ExitMRP
- _MonRP00:
- mov esi,#660000000
- cmp [ebx+04],esi
- jns _ExitMRP
- mov [ebx+04],esi
- _ExitMRP:
- mov esi,[ebx+04] // Original code (get prog)
- mov eax,[ecx] // Original code
- jmp _BackMRP // Back to main code
- //========================================= 150 ok
- // During updating (min = 90%) Science
- _MonTaskProg:
- mov ecx,eax
- mov edi,edx
- cmp dword ptr [iEnableMTP],0
- je _ExitMTP // Jump if feature is disabled
- test esi,esi
- jz _ExitMTP
- mov eax,[esi+00000090]
- cmp eax,[iOwnerID]
- jne _ExitMTP
- mov eax,[ecx]
- imul eax,eax,#90
- xor edx,edx
- mov esi,#100
- div esi
- cmp [ebx+1c],eax
- jns _ExitMTP
- mov [ebx+1c],eax
- _ExitMTP:
- mov eax,ecx
- mov edx,edi
- mov ecx,[ebx+1C] // Original code (get prog)
- pop edi // Original code
- pop esi // Original code
- jmp _BackMTP // Back to main code
- //========================================= 161
- // During updating (min = 98%)
- _MonInvestigationProg:
- cmp dword ptr [iEnableMTP],0
- je _ExitMIP // Jump if feature is disabled
- mov eax,[ebp+08]
- test eax,eax
- jz _ExitMIP
- mov eax,[eax+00000090]
- cmp eax,[iOwnerID]
- jne _ExitMIP
- mov eax,#98000
- cmp [esi+1c],eax
- jns _ExitMIP
- mov [esi+1c],eax
- _ExitMIP:
- mov ecx,[esi+1C] // Original code (get prog)
- lea eax,[ebp+08] // Original code
- jmp _BackMIP // Back to main code
- //========================================= 130 ok
- // Right After updating (ships/Yards)
- _MonProdProg:
- cmp dword ptr [iEnableMPP],0
- je _ExitMPP // Jump if feature is disabled
- cmp esi,[pProd]
- jne _ExitMPP
- mov dword ptr [pProd],55555555
- mov eax,[ebp-04]
- lea eax,[eax-7d0]
- cmp eax,[esi+2c]
- js _ExitMPP
- mov [esi+2c],eax
- _ExitMPP:
- mov ecx,[esi+2C] // Original code (get prod prog)
- xor eax,eax // Original code
- jmp _BackMPP // Back to main code
- //========================================= 161
- // When updating (prepare environment for previous script)
- _MonProdProg2:
- add [ecx+2C],eax // Original code (set prod prog)
- mov eax,[ebx+04]
- test eax,eax
- jz _ExitPP2
- mov eax,[eax+00000218]
- cmp eax,[iOwnerID]
- jne _ExitPP2
- mov [pProd],ecx
- _ExitPP2:
- xor cl,cl // Original code
- jmp _BackPP2 // Back to main code
- //========================================= 161
- // When updating soldiers (prepare environment for same script as previous one)
- _MonProdProg3:
- push eax
- mov eax,[ebx+00000218]
- cmp eax,[iOwnerID]
- jne _ExitPP3
- mov [pProd],ecx
- _ExitPP3:
- pop eax
- add [ecx+2C],eax // Original code (upd prog)
- mov ecx,[edi] // Original code
- jmp _BackPP3 // Back to main code
- //========================================= 161 *
- // When updating (population growth on tiles and planets)
- _MonColProg:
- push ebx
- push ecx
- cmp dword ptr [iEnableMCP],0
- je _ExitMCP // Jump if feature is disabled
- mov ebx,[edi+24]
- test ebx,ebx
- js _ExitMCP
- mov ebx,[esi]
- test ebx,ebx
- js _ExitMCP
- test ecx,ecx
- jz _MonCP01
- cmp ecx,[ebp+000000ac]
- jne _MonCP00
- cmp dword ptr [ecx+00000288],'plan'
- je _MonCP02
- _MonCP00:
- cmp ecx,[ebp-14]
- jne _MonCP01
- cmp dword ptr [ecx+00000288],'plan'
- je _MonCP02
- _MonCP01:
- cmp edi,[ebp-04]
- jne _ExitMCP
- lea ecx,[edi-60]
- cmp dword ptr [ecx+00000288],'plan'
- jne _ExitMCP
- _MonCP02:
- mov ebx,[ecx+00000218]
- cmp ebx,[iOwnerID]
- jne _ExitMCP
- mov ebx,#1660000
- cmp [edi+1c],ebx
- jns _ExitMCP
- mov [edi+24],ebx
- _ExitMCP:
- pop ecx
- pop ebx
- mov esi,[esi] // Original code
- add esi,[edi+24] // Original code
- jmp _BackMCP // Back to main code
- //========================================= 131 ok
- // When updating (colonization) 80% (x100)
- _MonColProg2:
- add [ebx+48],eax // Original code (upd prog)
- cmp dword ptr [iEnableQCP],0
- je _ExitCP2 // Jump if feature is disabled
- test edi,edi
- jz _ExitCP2
- mov esi,[edi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitCP2
- mov esi,#8000
- cmp [ebx+48],esi
- jns _ExitCP2
- mov [ebx+48],esi
- _ExitCP2:
- pop esi // Original code
- pop edi // Original code
- jmp _BackCP2 // Back to main code
- //========================================= 161
- // When updating (Building at Planets - Orbital Stations) (days)
- _MonBuildProg:
- push eax
- cmp dword ptr [iEnableMBP],0
- je _ExitMBP // Jump if feature is disabled
- mov eax,[ebx+08]
- test eax,eax
- js _ExitMBP
- mov eax,[ebx+04]
- test eax,eax
- jz _ExitMBP
- mov eax,[eax+00000218]
- cmp eax,[iOwnerID]
- jne _ExitMBP
- mov eax,#355
- cmp [ebx+08],eax
- jns _ExitMBP
- mov [ebx+08],eax
- _ExitMBP:
- pop eax
- mov [ebp-20],ebx // Original code
- cmp dword ptr [ebx+08],00 // Original code (chk #days passed < 0)
- jmp _BackMBP // Back to main code
- //========================================= 161
- // When constructing by ship constructor (ex.: outpost)(%)
- // EDI = pFleet
- _MonBuildProg2:
- cmp dword ptr [iEnableMBP],0
- je _ExitBP2 // Jump if feature is disabled
- mov ecx,[ebp+08]
- test ecx,ecx
- jz _ExitBP2
- mov ecx,[ecx+00000090]
- cmp ecx,[iOwnerID]
- jne _ExitBP2
- mov ecx,#97000
- cmp [esi+24],ecx
- jns _ExitBP2
- mov [esi+24],ecx
- _ExitBP2:
- mov ecx,[esi+24] // Original code (get % prog)
- mov [ebp+08],eax // Original code
- jmp _BackBP2 // Back to main code
- //========================================= 161
- // When looking at the planet surface (min existing res = 10)
- _MonPlanetTiles:
- push edx
- cmp dword ptr [iEnableMPT],0
- je _ExitMPT // Jump if feature is disabled
- mov eax,[ebx+10]
- test eax,eax
- jz _ExitMPT
- mov ecx,[ebx+04]
- test ecx,ecx
- jz _ExitMPT
- mov ecx,[ecx+00000218]
- cmp ecx,[iOwnerID]
- jne _ExitMPT
- mov ecx,[ebx+1c]
- test ecx,ecx
- jz _ExitMPT
- mov edx,[ebx+20]
- test edx,edx
- jz _ExitMPT
- mov eax,#10000
- _MonPT00:
- cmp ecx,edx
- jge _ExitMPT
- cmp eax,[ecx+04]
- js _MonPT01
- mov [ecx+04],eax
- _MonPT01:
- lea ecx,[ecx+10]
- jmp _MonPT00
- //--
- _ExitMPT:
- pop edx
- mov ecx,[ebx+6C] // Original code (get pType)
- mov eax,[ecx] // Original code
- jmp _BackMPT // Back to main code
- //========================================= 150 OK
- // During Battle (ship/stations)
- _MonShipHull:
- cmp dword ptr [iEnableGMD],0
- je _ExitMSH // Jump if feature is disabled
- mov eax,[edi+30]
- call _ChkPlayerFleet
- jne _ExitMSH
- xor esi,esi
- _ExitMSH:
- sub [edi+00000080],esi // Original code (dec cHull)
- jmp _BackMSH // Back to main code
- //========================================= 131 OK
- // When updating Warp Wind-down
- _MonFleetWarpWD:
- inc [edi+0000009C] // Original code (upd WWD)
- cmp dword ptr [iEnableMFW],0
- je _ExitMFW // Jump if feature is disabled
- mov esi,[edi+04]
- test esi,esi
- jz _ExitMFW
- mov esi,[esi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitMFW
- mov esi,#6600
- cmp [edi+0000009C],esi
- jns _ExitMFW
- mov [edi+0000009C],esi
- _ExitMFW:
- jmp _BackMFW // Back to main code
- //========================================= 161 *
- // When updating Planetary Fortification
- _MonPlanetFortification:
- cmp dword ptr [iEnableGMD],0
- je _ExitMPF // Jump if feature is disabled
- mov esi,[ebx+00000218]
- cmp esi,[iOwnerID]
- jne _ExitMPF
- mov esi,[ebx+000002b8]
- test esi,esi
- js _ExitMPF
- cmp eax,esi
- cmovs eax,esi
- _ExitMPF:
- mov [ebx+000002B8],eax // Original code (upd Fort...)
- jmp _BackMPF // Back to main code
- //========================================= 150 OK
- // During Battle (Troops)
- _MonTroopHealth:
- cmp dword ptr [iEnableGMD],0
- je _ExitMTH // Jump if feature is disabled
- mov eax,[ebx+08]
- call _ChkPlayerTroop
- jne _ExitMTH
- xor eax,eax
- mov [edi],eax
- _ExitMTH:
- mov eax,[edi] // Original code
- sub [ebx+28],eax // Original code (dec cHealth)
- jmp _BackMTH // Back to main code
- //========================================= 131 OK
- // During Battle (Troops)(defender)
- _MonTroopMorale:
- cmp dword ptr [iEnableMTM],0
- je _ExitMTM // Jump if feature is disabled
- mov eax,[esi+08]
- call _ChkPlayerTroop
- jne _ExitMTM
- xor edx,edx
- _ExitMTM:
- mov eax,[ebp+08] // Original code
- sub [esi+60],edx // Original code (dec Morale)
- jmp _BackMTM // Back to main code
- //========================================= 131 OK
- // During Battle (Troops)(attacker)
- _MonTroopMorale2:
- cmp dword ptr [iEnableMTM],0
- je _ExitTM2 // Jump if feature is disabled
- mov eax,[esi+08]
- call _ChkPlayerTroop
- jne _ExitTM2
- xor edx,edx
- _ExitTM2:
- mov eax,[ebp+08] // Original code
- sub [esi+60],edx // Original code (dec Morale)
- jmp _BackTM2 // Back to main code
- //========================================= 160 new
- // Character will level up to max when getting any XP
- _MonCharXP:
- mov ecx,eax
- cmp dword ptr [iEnableMCX],0
- je _ExitMCX // Jump if feature is disabled
- mov eax,[edi+08]
- call _ChkPlayerChars
- jnz _ExitMCX
- mov eax,[ecx]
- cmp [edi+70],eax
- jns _ExitMCX
- mov [edi+70],eax
- _ExitMCX:
- mov eax,ecx
- mov ecx,[edi+70] // Original code
- cmp ecx,[eax] // Original code
- jmp _BackMCX // Back to main code
- //========================================= 150 OK
- // Find out the resource info of a given Index
- _MonResourceInfo:
- push ebx
- mov edi,[edx+04]
- sub edi,[edx]
- mov dword ptr [iResMax],00
- test edi,edi
- jz _ExitRIO
- sar edi,02
- mov [iResMax],edi
- cmp edi,[iResIndex]
- js _ExitRIO
- mov edi,[iResIndex]
- test edi,edi
- jz _ExitRIO
- mov ebx,[edx]
- mov edi,[ebx+edi*4-04]
- mov [pResInfo],edi
- _ExitRIO:
- pop ebx
- mov edi,[edx+04] // Original code (get pEnd)
- sub edi,[edx] // Original code (pBegin)
- jmp _BackRIO // Back to main code
- //========================================= 161
- // When checking const prog during turn (for tiles)
- _MonTileConst:
- push ecx
- imul eax,[esi+40],000003E8 // Original code (get #Days)
- cmp dword ptr [iEnableMBP],0
- je _ExitMTC // Jump if feature is disabled
- mov ecx,[ebx+00000218]
- cmp ecx,[iOwnerID]
- jne _ExitMTC
- mov [esi+48],eax
- _ExitMTC:
- pop ecx
- jmp _BackMTC // Back to main code
- //========================================= 160 *
- // At the pick one leader up screen (additional leader researched)
- _MonMaxLeaders:
- push eax
- cmp dword ptr [iEnableMML],0
- je _ExitMML // Jump if feature is disabled
- mov eax,[ebp-10]
- cmp eax,[pPlayer]
- jne _ExitMML
- mov eax,#66000
- cmp [ebx+ecx*8+04],eax
- jns _ExitMML
- mov [ebx+ecx*8+04],eax // Additional # of leaders (66)
- _ExitMML:
- pop eax
- mov al,[eax+0000262D] // Original code
- jmp _BackMML // Back to main code
- //========================================= 131 OK
- // When updating Warmhole time
- _MonWormhole:
- cmp dword ptr [iEnableMFW],0
- je _ExitMWH // Jump if feature is disabled
- mov ebx,[ebp-10]
- test ebx,ebx
- jz _ExitMWH
- cmp ebx,[ebp+08]
- jne _ExitMWH
- mov ebx,[ebx+04]
- test ebx,ebx
- jz _ExitMWH
- mov ebx,[ebx+00000090]
- cmp ebx,[iOwnerID]
- jne _ExitMWH
- mov [esi+20],eax
- _ExitMWH:
- cmp eax,[esi+20] // Original code (chk prog)
- setle al // Original code
- jmp _BackMWH // Back to main code
- //========================================= 161
- // When constructing by ship constructor (ex.: wormhole)(%x1000)
- _MonBuildProg3:
- add [edi+34],eax // Original code (upd % prog)
- cmp dword ptr [iEnableMBP],0
- je _ExitBP3 // Jump if feature is disabled
- mov eax,[ebp-3C]
- test eax,eax
- jz _ExitBP3
- mov eax,[eax+00000090]
- cmp eax,[iOwnerID]
- jne _ExitBP3
- mov eax,#97000
- cmp [edi+34],eax
- jns _ExitBP3
- mov [edi+34],eax
- _ExitBP3:
- pop edi // Original code
- pop esi // Original code
- jmp _BackBP3 // Back to main code
- //========================================= 131 OK
- // When Entering Hyperlane
- _MonFleetHyper:
- push esi
- inc [edi+00000098] // Original code (upd prog)
- cmp dword ptr [iEnableMFW],0
- je _ExitMFH // Jump if feature is disabled
- mov esi,[edi+04]
- test esi,esi
- jz _ExitMFH
- mov esi,[esi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitMFH
- mov [edi+00000098],eax
- _ExitMFH:
- pop esi
- jmp _BackMFH // Back to main code
- //========================================= 160
- // When constructing by ship constructor (ex.: MEGA)
- _MonBuildProg4:
- mov eax,[eax] // Original code
- add [ebx+5C],eax // Original code (upd prog)
- cmp dword ptr [iEnableMBM],0
- je _ExitBP4 // Jump if feature is disabled
- test edi,edi
- jz _ExitBP4
- mov esi,[edi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitBP4
- mov esi,[ebx+18]
- test esi,esi
- jz _ExitBP4
- mov eax,[esi+000000a8]
- imul eax,eax,#99
- push edx
- xor edx,edx
- mov esi,#100
- div esi
- pop edx
- cmp [ebx+5C],eax
- jns _ExitBP4
- mov [ebx+5C],eax
- _ExitBP4:
- pop esi // Original code
- jmp _BackBP4 // Back to main code
- //========================================= 132 (v6.8) OK
- // When Moving Fleet (original by transcendperfection)
- _MonInstantMove:
- push eax
- push esi
- movzx eax,byte ptr [OOIM]
- cmp dword ptr [iEnableMIM],0
- je _ExitMIM // Jump if feature is disabled
- mov esi,[ecx+04]
- test esi,esi
- jz _ExitMIM
- mov esi,[esi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitMIM
- inc eax
- _ExitMIM:
- test eax,eax
- pop esi
- pop eax
- jmp _BackMIM // Back to main code
- //========================================= 132 (v6.8) OK
- // When Moving Fleet (original by transcendperfection)
- _MonInstantMove2:
- push eax
- push esi
- movzx eax,byte ptr [OOIM]
- cmp dword ptr [iEnableMIM],0
- je _ExitIM2 // Jump if feature is disabled
- mov esi,[edi+04]
- test esi,esi
- jz _ExitIM2
- mov esi,[esi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitIM2
- inc eax
- _ExitIM2:
- test eax,eax
- pop esi
- pop eax
- jmp _BackIM2 // Back to main code
- //========================================= 132 OK (v6.9)
- // When Moving Fleet (original by transcendperfection)
- _MonInstantMove3:
- push eax
- push esi
- movzx eax,byte ptr [OOIM]
- cmp dword ptr [iEnableMIM],0
- je _ExitIM3 // Jump if feature is disabled
- mov esi,[ecx+1c]
- test esi,esi
- jz _ExitIM3
- mov esi,[esi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitIM3
- inc eax
- _ExitIM3:
- test eax,eax
- pop esi
- pop eax
- jmp _BackIM3 // Back to main code
- //========================================= 132 OK (v6.9)
- // When Moving Fleet (original by transcendperfection)
- _MonInstantMove4:
- push eax
- push esi
- movzx eax,byte ptr [OOIM]
- cmp dword ptr [iEnableMIM],0
- je _ExitIM4 // Jump if feature is disabled
- mov esi,[ecx+1c]
- test esi,esi
- jz _ExitIM4
- mov esi,[esi+00000090]
- cmp esi,[iOwnerID]
- jne _ExitIM4
- inc eax
- _ExitIM4:
- test eax,eax
- pop esi
- pop eax
- jmp _BackIM4 // Back to main code
- //========================================= 132 OK (v6.9)
- // When Moving Ship (original by transcendperfection)
- _MonInstantMove5:
- push eax
- push esi
- movzx esi,byte ptr [OOIM]
- cmp dword ptr [iEnableMIM],0
- je _ExitIM5 // Jump if feature is disabled
- mov eax,[ecx+48]
- call _ChkPlayerFleet
- jnz _ExitIM5
- inc esi
- _ExitIM5:
- test esi,esi
- pop esi
- pop eax
- jmp _BackIM5 // Back to main code
- //========================================= 150 OK (v7.0) Fix (v7.2)
- // When Moving Ship
- _MonInstantMove6:
- push eax
- push esi
- movzx esi,byte ptr [OOIM]
- cmp dword ptr [iEnableMIM],0
- je _ExitIM6 // Jump if feature is disabled
- mov eax,[ebp-14]
- cmp eax,[ebp+08]
- jne _ExitIM6
- mov eax,[eax+04]
- test eax,eax
- jz _ExitIM6
- mov eax,[eax+00000090]
- cmp eax,[iOwnerID]
- jne _ExitIM6
- inc esi
- _ExitIM6:
- test esi,esi
- pop esi
- pop eax
- jmp _BackIM6 // Back to main code
- //========================================= 161 (v7.2)(v7.3)
- // When surveying a planet/star (original by transcendperfection)
- _MonPlanetAnomaly:
- push eax
- cmp dword ptr [iEnableMPA],0
- je _ExitMPA // Jump if feature is disabled
- cmp ebx,[pPlayer]
- jne _ExitMPA
- test edi,edi
- jz _MonPA00
- cmp dword ptr [edi+00000288],'plan'
- jne _MonPA00
- mov eax,[edi+00000390]
- or eax,[edi+000003d4]
- or eax,[edi+000009b4]
- or eax,[edi+00000be8]
- jz _MonPA00
- cmp dword ptr [iEnableIPR],0
- je _ExitMPA // Jump if feature is disabled
- _MonPA00:
- mov esi,#1000 // Chance of a planet of having an anomaly
- _ExitMPA:
- pop eax
- mov [ebp-08],ecx // Original code
- mov ecx,[ebp+0C] // Original code
- jmp _BackMPA // Back to main code
- //========================================= 150 OK (v7.2)
- // When viewing anomaly risk (original by transcendperfection)
- _MonAnomalyRisk:
- cmp dword ptr [iEnableMAR],0
- je _ExitMAR // Jump if feature is disabled
- push eax
- mov eax, [esp+50]
- mov eax, [eax-160]
- call _ChkPlayerChars
- pop eax
- jnz _ExitMAR
- mov esi,#-100000 // No Risk
- _ExitMAR:
- add ecx,esi // Original code
- add eax,ecx // Original code
- mov ecx,000003E8 // Original code
- jmp _BackMAR // Back to main code
- //========================================= 150 OK (v7.2)
- // When viewing anomaly risk (original by transcendperfection)
- _MonAnomalyRisk2:
- cmp dword ptr [iEnableMAR],0
- je _ExitAR2 // Jump if feature is disabled
- push eax
- mov eax, [esp+50]
- mov eax, [eax-160]
- call _ChkPlayerChars
- pop eax
- jnz _ExitAR2
- mov eax,#-100000 // No Risk
- _ExitAR2:
- cmp eax,FFE76C8C // Original code
- jmp _BackAR2 // Back to main code
- //========================================= 160 *
- // Last selected megastructure during upgrade (game paused)
- _MonSelMega:
- mov [pMega],esi
- _ExitMSM:
- mov ecx,[ecx+000000A8] // Original code
- jmp _BackMSM // Back to main code
- //========================================= 150 OK
- // Check if it is a player's ship/Station (based on its fleet id)
- // Input : EAX = FleetID
- // Output: Z = found and NZ = Not Found
- _ChkPlayerFleet:
- push ebx
- push ecx
- mov ebx,[pPlayer]
- mov ecx,[ebx+0000061c]
- mov ebx,[ebx+00000618]
- test ebx,ebx
- jz _ChkPF01
- _ChkPF00:
- cmp ecx,ebx
- jle _ChkPF01
- cmp eax,[ebx]
- je _ChkPF02
- lea ebx,[ebx+04]
- jmp _ChkPF00
- //==
- _ChkPF01:
- inc eax
- test eax,eax
- _ChkPF02:
- pop ecx
- pop ebx
- ret
- //========================================= 150 OK
- // Check if it is a player's troop (based on its id)
- // Input : EAX = TroopID
- // Output: Z = found and NZ = Not Found
- _ChkPlayerTroop:
- push ebx
- push ecx
- mov ebx,[pPlayer]
- mov ecx,[ebx+00000628]
- mov ebx,[ebx+00000624]
- test ebx,ebx
- jz _ChkPT01
- _ChkPT00:
- cmp ecx,ebx
- jle _ChkPF01
- cmp eax,[ebx]
- je _ChkPT02
- lea ebx,[ebx+04]
- jmp _ChkPT00
- //--
- _ChkPT01:
- inc eax
- test eax,eax
- _ChkPT02:
- pop ecx
- pop ebx
- ret
- //========================================= 150 OK (v7.2)
- // Check if it is a player's character (based on its id)
- // Input : EAX = CharID
- // Output: Z = found and NZ = Not Found
- _ChkPlayerChars:
- push ebx
- push ecx
- mov ebx,[pPlayer]
- mov ecx,[ebx+00000610]
- mov ebx,[ebx+0000060c]
- test ebx,ebx
- jz _ChkPC01
- _ChkPC00:
- cmp ecx,ebx
- jle _ChkPC01
- cmp eax,[ebx]
- je _ChkPC02
- lea ebx,[ebx+04]
- jmp _ChkPC00
- //==
- _ChkPC01:
- inc eax
- test eax,eax
- _ChkPC02:
- pop ecx
- pop ebx
- ret
- //========================================= 150 OK
- // Check for additional resource max value (via id)
- // Input : ECX = Resource ID
- // Output: ECX = Additinal value or Zero
- _ChkAdditionalRes:
- push ebx
- push edx
- mov ebx,[pPlayer]
- mov edx,[ebx+00000910]
- mov ebx,[ebx+0000090c]
- test ebx,ebx
- jz _ChkAR02
- _ChkAR00:
- cmp edx,ebx
- jle _ChkAR02
- cmp ecx,[ebx]
- je _ChkAR01
- lea ebx,[ebx+08]
- jmp _ChkAR00
- //--
- _ChkAR01:
- mov ecx,[ebx+04]
- test ecx,ecx
- jns _ChkAR03
- _ChkAR02:
- xor ecx,ecx
- _ChkAR03:
- pop edx
- pop ebx
- ret
- //=========================================
- db '======================================>'
- db 'CE6.6 Script by Recifense 051217'
- //=========================================
- // Variables
- iEnableMMR:
- dd 0
- iEnableMSR:
- dd 0
- iEnableMRP:
- dd 0
- iEnableMTP:
- dd 0
- iEnableMPP:
- dd 0
- iEnableMCP:
- dd 0
- iEnableMBP:
- dd 0
- iEnableMPT:
- dd 0
- iEnableGMD:
- dd 0
- iEnableMFW:
- dd 0
- iEnableMTM:
- dd 0
- iEnableQRP:
- dd 0
- iEnableMML:
- dd 0
- iEnableMTF:
- dd 0
- iEnableQCP:
- dd 0
- iEnableMIM:
- dd 0
- iEnableSPO:
- dd 0
- iEnableRIU:
- dd 0
- iEnableMBM:
- dd 0
- iEnableMPA:
- dd 0
- iEnableMAR:
- dd 0
- iEnableIPR:
- dd 0
- iEnableMCX:
- dd 0
- iOwnerID:
- dd #999
- iStatusID:
- dd 0
- iResIndex:
- dd 2
- iResMax:
- dd 2
- iMinUnity:
- dd #660
- pPlayer:
- dd MyCode
- pRuler:
- dd 0
- pChar:
- dd 0
- pPlanet:
- dd 0
- pShip:
- dd 0
- pFleet:
- dd 0
- pTile:
- dd 0
- pResInfo:
- dd 0
- pCommon:
- dd MyCode
- pStatusInfo:
- dd 0
- pProd:
- dd MyCode
- pTroop:
- dd 0
- pMega:
- dd 0
- //=========================================
- // Hacking Points
- MOHP:
- jmp _MonHumanPlayer
- nop
- _BackMHP:
- MOSC:
- jmp _MonSelChar
- nop
- _BackMSC:
- MOSS:
- jmp _MonSelShip
- nop
- _BackMSS:
- MOSF:
- jmp _MonSelFleet
- nop
- _BackMSF:
- MOSP:
- jmp _MonSelPlanet
- nop
- _BackMSP:
- MSTE:
- jmp _MonSelTile
- _BackSTE:
- MSTP:
- jmp _MonSelTroop
- _BackMST:
- MORP:
- jmp _MonResearchProg
- _BackMRP:
- MOTP:
- jmp _MonTaskProg
- _BackMTP:
- MOIP:
- jmp _MonInvestigationProg
- nop
- _BackMIP:
- MOPP:
- jmp _MonProdProg
- _BackMPP:
- MPP2:
- jmp _MonProdProg2
- _BackPP2:
- MPP3:
- jmp _MonProdProg3
- _BackPP3:
- MOCP:
- jmp _MonColProg
- _BackMCP:
- MCP2:
- jmp _MonColProg2
- _BackCP2:
- MOBP:
- jmp _MonBuildProg
- nop
- nop
- _BackMBP:
- MBP2:
- jmp _MonBuildProg2
- nop
- _BackBP2:
- MOPT:
- jmp _MonPlanetTiles
- _BackMPT:
- MOSH:
- jmp _MonShipHull
- nop
- _BackMSH:
- MOFW:
- jmp _MonFleetWarpWD
- nop
- _BackMFW:
- MOPF:
- jmp _MonPlanetFortification
- nop
- _BackMPF:
- MOTH:
- jmp _MonTroopHealth
- _BackMTH:
- MOTM:
- jmp _MonTroopMorale
- nop
- _BackMTM:
- MTM2:
- jmp _MonTroopMorale2
- nop
- _BackTM2:
- MOCX:
- jmp _MonCharXP
- _BackMCX:
- MRIO:
- jmp _MonResourceInfo
- _BackRIO:
- MOTC:
- jmp _MonTileConst
- nop
- nop
- _BackMTC:
- MOML:
- jmp _MonMaxLeaders
- nop
- _BackMML:
- MOWH:
- jmp _MonWormhole
- nop
- _BackMWH:
- MBP3:
- jmp _MonBuildProg3
- _BackBP3:
- MBP4:
- jmp _MonBuildProg4
- nop
- _BackBP4:
- MOFH:
- jmp _MonFleetHyper
- nop
- _BackMFH:
- MOIM:
- jmp _MonInstantMove
- nop
- nop
- _BackMIM:
- MIM2:
- jmp _MonInstantMove2
- nop
- nop
- _BackIM2:
- MIM3:
- jmp _MonInstantMove3
- nop
- nop
- _BackIM3:
- MIM4:
- jmp _MonInstantMove4
- nop
- nop
- _BackIM4:
- MIM5:
- jmp _MonInstantMove5
- nop
- nop
- _BackIM5:
- MIM6:
- jmp _MonInstantMove6
- nop
- nop
- _BackIM6:
- MOPA:
- jmp _MonPlanetAnomaly
- nop
- _BackMPA:
- MOAR:
- jmp _MonAnomalyRisk
- nop
- nop
- nop
- nop
- _BackMAR:
- MAR2:
- jmp _MonAnomalyRisk2
- _BackAR2:
- MOSM:
- jmp _MonSelMega
- nop
- _BackMSM:
- //=========================================
- // Script for Restoring Original Codes
- [DISABLE]
- MOHP:
- // mov ecx,[esi+000007D0]
- db 8b 8e d0 07 00 00
- MOSC:
- // mov esi,[ecx+00000098]
- db 8b b1 98 00 00 00
- MOSS:
- // mov eax,[edi+00000098]
- db 8b 87 98 00 00 00
- MOSF:
- // mov esi,[eax+000006C4]
- db 8b b0 c4 06 00 00
- MOSP:
- // mov edi,[eax+00000218]
- db 8b b8 18 02 00 00
- MSTE:
- // mov ecx,[eax+6C]
- // mov eax,[ecx]
- db 8b 48 6c 8b 01
- MSTP:
- // mov ecx,[ecx+28]
- // mov [edx],ecx
- db 8b 49 28 89 0a
- MORP:
- // mov esi,[ebx+04]
- // mov eax,[ecx]
- db 8b 73 04 8b 01
- MOTP:
- // mov ecx,[ebx+1C]
- // pop edi
- // pop esi
- db 8b 4b 1c 5f 5e
- MOIP:
- // mov ecx,[esi+1C]
- // lea eax,[ebp+08]
- db 8b 4e 1c 8d 45 08
- MOPP:
- // mov ecx,[esi+2C]
- // xor eax,eax
- db 8b 4e 2c 33 c0
- MPP2:
- // add [ecx+2C],eax
- // xor cl,cl
- db 01 41 2c 32 c9
- MPP3:
- // add [ecx+2C],eax
- // mov ecx,[edi]
- db 01 41 2c 8b 0f
- MOCP:
- // mov esi,[esi]
- // add esi,[edi+24]
- db 8b 36 03 77 24
- MCP2:
- // add [ebx+48],eax
- // pop esi
- // pop edi
- db 01 43 48 5e 5f
- MOBP:
- // mov [ebp-20],ebx
- // cmp dword ptr [ebx+08],00
- db 89 5d e0 83 7b 08 00
- MBP2:
- // mov ecx,[esi+24]
- // mov [ebp+08],eax
- db 8b 4e 24 89 45 08
- MOPT:
- // mov ecx,[ebx+6C]
- // mov eax,[ecx]
- db 8b 4b 6c 8b 01
- MOSH:
- // sub [edi+00000080],esi
- db 29 b7 80 00 00 00
- MOFW:
- // inc [edi+0000009C]
- db ff 87 9c 00 00 00
- MOPF:
- // mov [ebx+000002B8],eax
- db 89 83 b8 02 00 00
- MOTH:
- // smov eax,[edi]
- // sub [ebx+28],eax
- db 8b 07 29 43 28
- MOTM:
- // mov eax,[ebp+08]
- // sub [esi+60],edx
- db 8b 45 08 29 56 60
- MTM2:
- // mov eax,[ebp+08]
- // sub [esi+60],edx
- db 8b 45 08 29 56 60
- MOCX:
- // mov ecx,[edi+70]
- // cmp ecx,[eax]
- db 8b 4f 70 3b 08
- MRIO:
- // mov edi,[edx+04]
- // sub edi,[edx]
- db 8b 7a 04 2b 3a
- MOTC:
- // imul eax,[esi+40],000003E8
- db 69 46 40 e8 03 00 00
- MOML:
- // mov al,[eax+0000262D]
- db 8a 80 2d 26 00 00
- MOWH:
- // cmp eax,[esi+20]
- // setle al
- db 3b 46 20 0f 9e c0
- MBP3:
- // add [edi+34],eax
- // pop edi
- // pop esi
- db 01 47 34 5f 5e
- MBP4:
- // pop esi
- // mov eax,[eax]
- // add [ebx+5C],eax
- db 5e 8b 00 01 43 5c
- MOFH:
- // inc [edi+00000098]
- db ff 87 98 00 00 00
- MOIM:
- cmp byte ptr [OOIM],00
- MIM2:
- cmp byte ptr [OOIM],00
- MIM3:
- cmp byte ptr [OOIM],00
- MIM4:
- cmp byte ptr [OOIM],00
- MIM5:
- cmp byte ptr [OOIM],00
- MIM6:
- cmp byte ptr [OOIM],00
- MOPA:
- // mov [ebp-08],ecx
- // mov ecx,[ebp+0C]
- db 89 4d f8 8b 4d 0c
- MOAR:
- // add ecx,esi
- // add eax,ecx
- // mov ecx,000003E8
- db 03 ce 03 c1 b9 e8 03 00 00
- MAR2:
- // cmp eax,FFE76C8C
- db 3d 8c 6c e7 ff
- MOSM:
- // mov ecx,[ecx+000000A8]
- db 8b 89 a8 00 00 00
- //=========================================
- // Unregistering Symbols
- unregistersymbol(MyCode)
- unregistersymbol(iEnableMMR)
- unregistersymbol(iEnableMSR)
- unregistersymbol(iEnableMRP)
- unregistersymbol(iEnableMTP)
- unregistersymbol(iEnableMPP)
- unregistersymbol(iEnableMCP)
- unregistersymbol(iEnableMBP)
- unregistersymbol(iEnableMPT)
- unregistersymbol(iEnableGMD)
- unregistersymbol(iEnableMFW)
- unregistersymbol(iEnableMTM)
- unregistersymbol(iEnableQRP)
- unregistersymbol(iEnableMML)
- unregistersymbol(iEnableMTF)
- unregistersymbol(iEnableQCP)
- unregistersymbol(iEnableMIM)
- unregistersymbol(iEnableSPO)
- unregistersymbol(iEnableRIU)
- unregistersymbol(iEnableMBM)
- unregistersymbol(iEnableMPA)
- unregistersymbol(iEnableMAR)
- unregistersymbol(iEnableIPR)
- unregistersymbol(iEnableMCX)
- unregistersymbol(iOwnerID)
- unregistersymbol(iStatusID)
- unregistersymbol(iResIndex)
- unregistersymbol(iResMax)
- unregistersymbol(iMinUnity)
- unregistersymbol(pPlayer)
- unregistersymbol(pRuler)
- unregistersymbol(pChar)
- unregistersymbol(pPlanet)
- unregistersymbol(pShip)
- unregistersymbol(pFleet)
- unregistersymbol(pCommon)
- unregistersymbol(pStatusInfo)
- unregistersymbol(pTile)
- unregistersymbol(pResInfo)
- unregistersymbol(pTroop)
- unregistersymbol(pMega)
- //=========================================
- dealloc(MyCode)
- //============= Scripts End ===============
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement