Advertisement
Guest User

Untitled

a guest
May 13th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {$lua}
  2.   if(getCEVersion() < 6.5) then
  3.     ShowMessage('Sorry. CE version should be 6.5 or above')
  4.   end
  5. {$asm}
  6.  
  7. //=========================================
  8. // Checking Selected Process
  9. {$lua}
  10.   if(process == nil) then
  11.     ShowMessage('No process was selected')
  12.   elseif (process ~= "stellaris.exe") then
  13.     ShowMessage('Error. Expected Process = stellaris.exe')
  14.   end
  15. {$asm}
  16.  
  17. //=========================================
  18. // Definitions
  19. define(LUDO,"stellaris.exe")
  20. define(MOHP,stellaris.exe+0046d484) //###====###=X==#=
  21. define(MOSC,stellaris.exe+0012e024) //==#====#======X=
  22. define(MOSS,stellaris.exe+002ffa0f) //=======X======#=
  23. define(MOSF,stellaris.exe+005579db) //=======X===X==#=
  24. define(MOSP,stellaris.exe+004af827) //==#====#===#==X#
  25. define(MSTE,stellaris.exe+00493f48) //N=#====#===#====
  26. define(MSTP,stellaris.exe+00340eb3) //-------N===X====
  27. define(MORP,stellaris.exe+00342c81) //=##===#X===#====
  28. define(MOTP,stellaris.exe+00230cc3) //==#====#===X====
  29. define(MOIP,stellaris.exe+00231a0f) //==#====#===X===#
  30. define(MOPP,stellaris.exe+003a98c0) //==#====#========
  31. define(MPP2,stellaris.exe+00386185) //==#====#===#==##
  32. define(MPP3,stellaris.exe+001c71b7) //-N#====#===#==##
  33.  
  34. define(MOCP,stellaris.exe+0021a42f) //==#====#===X==##
  35. define(MCP2,stellaris.exe+0022e7c1) //-------N========
  36. define(MOBP,stellaris.exe+003860c0) //==#====X===#==##
  37. define(MBP2,stellaris.exe+0022ba94) //==#====#===X===#
  38. define(MOPT,stellaris.exe+00121c11) //==#====#=#=#==##
  39. define(MOSH,stellaris.exe+002fe245) //==#====#===#====
  40. define(MOFW,stellaris.exe+0041e69e) //N=#====X========
  41. define(MOPF,stellaris.exe+001c845e) //N##====###=#==##
  42. define(MOTH,stellaris.exe+0033e622) //N=#====#===#====
  43. define(MOTM,stellaris.exe+0033ec97) //N=#====#========
  44. define(MTM2,stellaris.exe+0033ece2) //N=#====#========
  45. define(MOCX,stellaris.exe+0012c58c) //--------------N=
  46.  
  47. define(MRIO,stellaris.exe+004cf0f5) //N#=====#===X====
  48. define(MOTC,stellaris.exe+001c6e53) //-N#====X===X==##
  49. define(MOML,stellaris.exe+0015de68) //-N#====#===#==#=
  50. define(MOWH,stellaris.exe+0038ddfa) //-----N=#========
  51. define(MBP3,stellaris.exe+0022d6e9) //-----N=#=#=====#
  52. define(MOFH,stellaris.exe+0041e74d) //------N#========
  53. define(MBP4,stellaris.exe+00239ca6) //-----------N==#=
  54.  
  55. define(MOIM,stellaris.exe+0041f6fb) //--------N==#====
  56. define(MIM2,stellaris.exe+0041e79f) //--------N=======
  57. define(MIM3,stellaris.exe+0041b2bb) //--------N=======
  58. define(MIM4,stellaris.exe+0041b5cb) //--------N=======
  59. define(MIM5,stellaris.exe+002fb466) //--------N=======
  60. define(MIM6,stellaris.exe+0038ddd8) //-----------N====
  61. define(OOIM,stellaris.exe+00f7b055) //--------N==#====
  62.  
  63. define(MOPA,stellaris.exe+002b63be) //-----------N==##
  64. define(MOAR,stellaris.exe+002b4811) //-----------N====
  65. define(MAR2,stellaris.exe+002b4845) //-----------N====
  66. define(MOSM,stellaris.exe+005ab9cf) //-------------N#=
  67.  
  68. define(MAXINDEX,#1133)
  69.  
  70. //=========================================
  71. // Constants used in the script (that can be changed)
  72. define(ctCE66,(float)6.6)
  73.  
  74. //=========================================
  75. [ENABLE]
  76. //=========================================
  77. //LuaCall(CheckVersion())
  78. //=========================================
  79. // Check if script is compatible to this game version
  80. // If false the script will not be loaded
  81.  
  82. assert(MOHP,8b 8e d0 07 00 00 8b 01 8b 40 3c ff d0 8b 0d ?? ?? ?? ?? 84 c0 ?? ??)
  83. assert(MOSC,8b b1 98 00 00 00 85 f6 ?? ?? 8b c6 5e 5f c3 81 c1 8c 00 00 00 e8 ??)
  84. assert(MOSS,8b 87 98 00 00 00 8b cf 89 45 c0 8d 45 a0 6a 00 50 e8 ?? ?? ?? ?? 8b)
  85. 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)
  86. assert(MOSP,8b b8 18 02 00 00 8b c7 25 ff ff ff 00 3b 42 10 ?? ?? 8d 0c 40 8b 42)
  87. assert(MSTE,8b 48 6c 8b 01 8b 40 04 ff d0 8d 4d d8 84 c0 0f 84 ?? ?? ?? ?? 6a 05)
  88. assert(MSTP,8b 49 28 89 0a 8d 4d bc e8 ?? ?? ?? ?? 50 68 ?? ?? ?? ?? ba ?? ?? ??)
  89. assert(MORP,8b 73 04 8b 01 8b 40 1c ff d0 84 c0 ?? ?? ff 73 08 8d 45 f8 50 8d 8f)
  90. 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)
  91. 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)
  92. assert(MOPP,8b 4e 2c 33 c0 3b 4d fc 5f 5e 0f 9d c0 5b 8b e5 5d c3 cc ?? ?? ?? ??)
  93. 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)
  94. assert(MPP3,01 41 2c 8b 0f 8b 09 e8 ?? ?? ?? ?? 84 c0 0f 84 ?? ?? ?? ?? 8b 07 c6)
  95.  
  96. assert(MOCP,8b 36 03 77 24 3b 35 ?? ?? ?? ?? ?? ?? c7 47 24 18 fc ff ff c7 47 20)
  97. assert(MCP2,01 43 48 5e 5f 5b 5d c2 04 00 8b 4b 04 8b 01 8b 40 1c ff d0 84 c0 ??)
  98. assert(MOBP,89 5d e0 83 7b 08 00 0f 8c ?? ?? ?? ?? ff 43 08 8b 15 ?? ?? ?? ?? 85)
  99. 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)
  100. assert(MOPT,8b 4b 6c 8b 01 8b 40 04 ff d0 84 c0 ?? ?? 5b 8b 4d f4 64 89 0d 00 00)
  101. assert(MOSH,29 b7 80 00 00 00 8b 0d ?? ?? ?? ?? 83 c1 7c 8d 41 04 f7 d9 1b c9 23)
  102. 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)
  103. assert(MOPF,89 83 b8 02 00 00 8d 45 ec 8b 35 ?? ?? ?? ?? 50 e8 ?? ?? ?? ?? 8b 8b)
  104. assert(MOTH,8b 07 29 43 28 8d 83 a4 00 00 00 8b 4b 24 50 8d 45 08 50 e8 ?? ?? ??)
  105. assert(MOTM,8b 45 08 29 56 60 8b 4e 60 5e 89 08 8b e5 5d c2 08 00 85 d2 ?? ?? 8b)
  106. assert(MTM2,8b 45 08 29 56 60 8b 4e 60 5e 89 08 8b e5 5d c2 08 00 cc cc ?? ?? ??)
  107. assert(MOCX,8b 4f 70 3b 08 ?? ?? 6a 01 8b cf e8 ?? ?? ?? ?? 8b 47 74 3b 05 ?? ??)
  108.  
  109. assert(MRIO,8b 7a 04 2b 3a c1 ff 02 85 ff 0f 8e ?? ?? ?? ?? 8b 83 dc 05 00 00 03)
  110. assert(MOTC,69 46 40 e8 03 00 00 39 46 48 0f 9d c0 84 c0 0f 84 ?? ?? ?? ?? 8b 46)
  111. assert(MOML,8a 80 2d 26 00 00 84 c0 ?? ?? 8b 4c cb 04 8b 15 ?? ?? ?? ?? 3b ca ??)
  112. 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)
  113. assert(MBP3,01 47 34 5f 5e 5b 8b e5 5d c2 04 00 a1 ?? ?? ?? ?? 6b cb 64 80 7c 01)
  114. assert(MOFH,ff 87 98 00 00 00 39 87 98 00 00 00 0f 8c ?? ?? ?? ?? 8b cf e8 ?? ??)
  115. 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)
  116.  
  117. assert(MOIM,80 3d ?? ?? ?? ?? 00 53 8b d9 57 89 5d e8 ?? ?? 8b 55 08 8b 42 04 89)
  118. assert(MIM2,80 3d ?? ?? ?? ?? 00 8d 77 3c ?? ?? e8 ?? ?? ?? ?? 50 8b ce e8 ?? ??)
  119. assert(MIM3,80 3d ?? ?? ?? ?? 00 53 56 8b f1 57 89 75 ec ?? ?? 33 c0 8b 4d f4 64)
  120. assert(MIM4,80 3d ?? ?? ?? ?? 00 53 56 8b f1 57 89 75 ec ?? ?? 33 c0 8b 4d f4 64)
  121. assert(MIM5,80 3d ?? ?? ?? ?? 00 53 56 57 8b fa 8b d9 89 7d e8 89 5d e4 ?? ?? a1)
  122. assert(MIM6,80 3d ?? ?? ?? ?? 00 ?? ?? b0 01 5f 5e 5b 8b e5 5d c3 6a 00 8d 45 fc)
  123.  
  124. assert(MOPA,89 4d f8 8b 4d 0c 57 e8 ?? ?? ?? ?? 8b f8 8b 8f cc 07 00 00 8b 01 8b)
  125. assert(MOAR,03 ce 03 c1 b9 e8 03 00 00 f7 e9 6a 00 68 a0 86 01 00 52 50 e8 ?? ??)
  126. assert(MAR2,3d 8c 6c e7 ff 0f 8e ?? ?? ?? ?? 3d 9b c4 20 00 0f 8d ?? ?? ?? ?? 69)
  127. assert(MOSM,8b 89 a8 00 00 00 85 c9 ?? ?? 83 c9 ff ?? ?? 8b 46 28 3d 8c 6c e7 ff)
  128.  
  129. //=========================================
  130. alloc(MyCode,4096,$process)
  131. //=========================================
  132. // Declaration section
  133. label(_MonHumanPlayer)
  134. label(_BackMHP)
  135. label(_ExitMHP)
  136. label(_MonSelChar)
  137. label(_BackMSC)
  138. label(_ExitMSC)
  139. label(_MonSelShip)
  140. label(_BackMSS)
  141. label(_ExitMSS)
  142. label(_MonSelFleet)
  143. label(_BackMSF)
  144. label(_ExitMSF)
  145. label(_MonSelPlanet)
  146. label(_BackMSP)
  147. label(_ExitMSP)
  148. label(_MonSelTile)
  149. label(_BackSTE)
  150. label(_ExitSTE)
  151. label(_MonSelTroop)
  152. label(_BackMST)
  153. label(_ExitMST)
  154. label(_MonResearchProg)
  155. label(_MonRP00)
  156. label(_BackMRP)
  157. label(_ExitMRP)
  158. label(_MonTaskProg)
  159. label(_BackMTP)
  160. label(_ExitMTP)
  161. label(_MonInvestigationProg)
  162. label(_BackMIP)
  163. label(_ExitMIP)
  164. label(_MonProdProg)
  165. label(_BackMPP)
  166. label(_ExitMPP)
  167. label(_MonProdProg2)
  168. label(_BackPP2)
  169. label(_ExitPP2)
  170. label(_MonProdProg3)
  171. label(_BackPP3)
  172. label(_ExitPP3)
  173.  
  174. label(_MonColProg)
  175. label(_BackMCP)
  176. label(_ExitMCP)
  177. label(_MonColProg2)
  178. label(_BackCP2)
  179. label(_ExitCP2)
  180. label(_MonBuildProg)
  181. label(_BackMBP)
  182. label(_ExitMBP)
  183. label(_MonBuildProg2)
  184. label(_BackBP2)
  185. label(_ExitBP2)
  186. label(_MonPlanetTiles)
  187. label(_BackMPT)
  188. label(_ExitMPT)
  189. label(_MonShipHull)
  190. label(_BackMSH)
  191. label(_ExitMSH)
  192. label(_MonFleetWarpWD)
  193. label(_BackMFW)
  194. label(_ExitMFW)
  195. label(_MonPlanetFortification)
  196. label(_BackMPF)
  197. label(_ExitMPF)
  198. label(_MonTroopHealth)
  199. label(_BackMTH)
  200. label(_ExitMTH)
  201. label(_MonTroopMorale)
  202. label(_BackMTM)
  203. label(_ExitMTM)
  204. label(_MonTroopMorale2)
  205. label(_BackTM2)
  206. label(_ExitTM2)
  207. label(_MonCharXP)
  208. label(_BackMCX)
  209. label(_ExitMCX)
  210.  
  211. label(_MonResourceInfo)
  212. label(_BackRIO)
  213. label(_ExitRIO)
  214. label(_MonTileConst)
  215. label(_BackMTC)
  216. label(_ExitMTC)
  217. label(_MonMaxLeaders)
  218. label(_BackMML)
  219. label(_ExitMML)
  220. label(_MonWormhole)
  221. label(_BackMWH)
  222. label(_ExitMWH)
  223. label(_MonBuildProg3)
  224. label(_BackBP3)
  225. label(_ExitBP3)
  226. label(_MonFleetHyper)
  227. label(_BackMFH)
  228. label(_ExitMFH)
  229. label(_MonBuildProg4)
  230. label(_BackBP4)
  231. label(_ExitBP4)
  232.  
  233. label(_MonInstantMove)
  234. label(_BackMIM)
  235. label(_ExitMIM)
  236. label(_MonInstantMove2)
  237. label(_BackIM2)
  238. label(_ExitIM2)
  239. label(_MonInstantMove3)
  240. label(_BackIM3)
  241. label(_ExitIM3)
  242. label(_MonInstantMove4)
  243. label(_BackIM4)
  244. label(_ExitIM4)
  245. label(_MonInstantMove5)
  246. label(_BackIM5)
  247. label(_ExitIM5)
  248. label(_MonInstantMove6)
  249. label(_BackIM6)
  250. label(_ExitIM6)
  251.  
  252. label(_MonPlanetAnomaly)
  253. label(_BackMPA)
  254. label(_ExitMPA)
  255. label(_MonAnomalyRisk)
  256. label(_BackMAR)
  257. label(_ExitMAR)
  258. label(_MonAnomalyRisk2)
  259. label(_BackAR2)
  260. label(_ExitAR2)
  261.  
  262. label(_MonSelMega)
  263. label(_BackMSM)
  264. label(_ExitMSM)
  265.  
  266. label(iEnableMMR)
  267. label(iEnableMSR)
  268. label(iEnableMRP)
  269. label(iEnableMTP)
  270. label(iEnableMPP)
  271. label(iEnableMCP)
  272. label(iEnableMBP)
  273. label(iEnableMPT)
  274. label(iEnableGMD)
  275. label(iEnableMFW)
  276. label(iEnableMTM)
  277. label(iEnableQRP)
  278. label(iEnableMML)
  279. label(iEnableMTF)
  280. label(iEnableQCP)
  281. label(iEnableMIM)
  282. label(iEnableSPO)
  283. label(iEnableRIU)
  284. label(iEnableMBM)
  285. label(iEnableMPA)
  286. label(iEnableMAR)
  287. label(iEnableIPR)
  288. label(iEnableMCX)
  289.  
  290. label(iOwnerID)
  291. label(iStatusID)
  292. label(iResIndex)
  293. label(iResMax)
  294. label(iMinUnity)
  295.  
  296. label(pPlayer)
  297. label(pRuler)
  298. label(pChar)
  299. label(pPlanet)
  300. label(pShip)
  301. label(pFleet)
  302. label(pCommon)
  303. label(pStatusInfo)
  304. label(pProd)
  305. label(pTile)
  306. label(pResInfo)
  307. label(pTroop)
  308. label(pMega)
  309.  
  310. //=========================================
  311. // Registering Symbols
  312. registersymbol(MyCode)
  313. registersymbol(iEnableMMR)
  314. registersymbol(iEnableMSR)
  315. registersymbol(iEnableMRP)
  316. registersymbol(iEnableMTP)
  317. registersymbol(iEnableMPP)
  318. registersymbol(iEnableMCP)
  319. registersymbol(iEnableMBP)
  320. registersymbol(iEnableMPT)
  321. registersymbol(iEnableGMD)
  322. registersymbol(iEnableMFW)
  323. registersymbol(iEnableMTM)
  324. registersymbol(iEnableQRP)
  325. registersymbol(iEnableMML)
  326. registersymbol(iEnableMTF)
  327. registersymbol(iEnableQCP)
  328. registersymbol(iEnableMIM)
  329. registersymbol(iEnableSPO)
  330. registersymbol(iEnableRIU)
  331. registersymbol(iEnableMBM)
  332. registersymbol(iEnableMPA)
  333. registersymbol(iEnableMAR)
  334. registersymbol(iEnableIPR)
  335. registersymbol(iEnableMCX)
  336.  
  337. registersymbol(iOwnerID)
  338. registersymbol(iStatusID)
  339. registersymbol(iResIndex)
  340. registersymbol(iResMax)
  341. registersymbol(iMinUnity)
  342.  
  343. registersymbol(pPlayer)
  344. registersymbol(pRuler)
  345. registersymbol(pChar)
  346. registersymbol(pPlanet)
  347. registersymbol(pShip)
  348. registersymbol(pFleet)
  349. registersymbol(pCommon)
  350. registersymbol(pStatusInfo)
  351. registersymbol(pTile)
  352. registersymbol(pResInfo)
  353. registersymbol(pTroop)
  354. registersymbol(pMega)
  355.  
  356. //=========================================
  357. MyCode:
  358. //========================================= 160
  359. // At main game screen
  360. _MonHumanPlayer:
  361.  push eax
  362.  push ebx
  363.  push edx
  364.  push edi
  365.  
  366.  mov edi,esi
  367.  
  368.  mov ecx,[edi+08]
  369.  test ecx,ecx
  370.  js _ExitMHP
  371.  
  372.  mov [pPlayer],edi
  373.  mov [iOwnerID],ecx
  374.  mov ecx,[edi+00000114]
  375.  mov [pCommon],ecx
  376.  
  377.  cmp dword ptr [iEnableMSR],0
  378.  je _MonHPZZ                       // Jump if feature is disabled
  379.  
  380.  mov ecx,#200000
  381.  mov ebx,[edi+00000178]
  382.  cmp ebx,ecx
  383.  cmovs ebx,ecx
  384.  mov [edi+00000178],ebx
  385.  
  386.  mov ebx,[edi+0000017c]
  387.  cmp ebx,ecx
  388.  cmovs ebx,ecx
  389.  mov [edi+0000017c],ebx
  390.  
  391.  mov ebx,[edi+00000180]
  392.  cmp ebx,ecx
  393.  cmovs ebx,ecx
  394.  mov [edi+00000180],ebx
  395.  
  396. _MonHPZZ:
  397.  mov ecx,[edi+000007d0]
  398.  test ecx,ecx
  399.  jz _ExitMHP
  400.  
  401.  cmp dword ptr [iEnableMMR],0
  402.  je _ExitMHP                       // Jump if feature is disabled
  403.  
  404.  mov ebx,[ecx+58]
  405.  test ebx,ebx
  406.  jz _ExitMHP
  407.  
  408.  mov edx,[ecx+5c]
  409.  test edx,edx
  410.  jz _ExitMHP
  411.  
  412. _MonHP00:
  413.  cmp ebx,edx
  414.  jns _ExitMHP
  415.  
  416.  mov ecx,[ebx]
  417.  mov eax,[ecx+0c]
  418.  cmp eax,'unit'
  419.  je _MonHPNU
  420.  
  421.  mov eax,[ecx+84]
  422.  test eax,eax
  423.  jns _MonHPNS
  424.  
  425.  jmp _MonHP01
  426.  
  427. _MonHPNU:
  428.  cmp dword ptr [iEnableRIU],0
  429.  je _MonHP01                       // Jump if feature is disabled
  430.  
  431.  mov eax,[iMinUnity]
  432.  imul eax,eax,#2000
  433.  
  434. _MonHPNS:
  435.  shr eax,1
  436.  
  437.  mov ecx,[ecx+000000b4]             // Get Res ID
  438.  call _ChkAdditionalRes
  439.  add eax,ecx
  440.  
  441.  test eax,eax
  442.  jnz _MonHPNZ
  443.  
  444. _MonHPNZ:
  445.  cmp eax,[ebx+04]
  446.  js _MonHP01
  447.  
  448.  mov [ebx+04],eax
  449.  
  450. _MonHP01:
  451.  lea ebx,[ebx+10]
  452.  jmp _MonHP00
  453.  
  454. _ExitMHP:
  455.  pop edi
  456.  pop edx
  457.  pop ebx
  458.  pop eax
  459.  
  460.  mov ecx,[esi+000007D0]            // Original code (get pResourcesInfo)
  461.  jmp _BackMHP                      // Back to main code
  462.  
  463. //========================================= 160 X
  464. // Character Under Cursor (displaying age)
  465. _MonSelChar:
  466.  mov [pChar],ecx
  467.  
  468. _ExitMSC:
  469.  mov esi,[ecx+00000098]            // Original code (get age)
  470.  jmp _BackMSC                      // Back to main code
  471.  
  472. //========================================= 160 *
  473. // Last selected ship/station (UC on flee view)
  474. _MonSelShip:
  475.  mov [pShip],edi
  476.  
  477. _ExitMSS:
  478.  mov eax,[edi+00000098]            // Original code (get cHull)
  479.  jmp _BackMSS                      // Back to main code
  480.  
  481. //========================================= 160
  482. // Last selected fleet/station
  483. _MonSelFleet:
  484.  mov [pFleet],eax
  485.  
  486. _ExitMSF:
  487.  mov esi,[eax+000006C4]            // Original code (get Total Hull)
  488.  jmp _BackMSF                      // Back to main code
  489.  
  490. //========================================= 161 *
  491. // Last selected planet/sun/asteroid
  492. _MonSelPlanet:
  493.  mov [pPlanet],eax
  494.  
  495. _ExitMSP:
  496.  mov edi,[eax+00000218]            // Original code (get value)
  497.  jmp _BackMSP                      // Back to main code
  498.  
  499. //========================================= 150 ok
  500. // Last selected Tile
  501. _MonSelTile:
  502.  mov [pTile],eax
  503.  
  504. _ExitSTE:
  505.  mov ecx,[eax+6C]                  // Original code (get pInfo)
  506.  mov eax,[ecx]                     // Original code
  507.  jmp _BackSTE                      // Back to main code
  508.  
  509. //========================================= 131 ok
  510. // Last Troop Under Cursor
  511. _MonSelTroop:
  512.  mov [pTroop],ecx
  513.  
  514. _ExitMST:
  515.  mov ecx,[ecx+28]                  // Original code (get HP)
  516.  mov [edx],ecx                     // Original code
  517.  jmp _BackMST                      // Back to main code
  518.  
  519. //========================================= 150 ok
  520. // Every day
  521. _MonResearchProg:
  522.  cmp dword ptr [iEnableMRP],0
  523.  je _ExitMRP                       // Jump if feature is disabled
  524.  
  525.  cmp edi,[pPlayer]
  526.  jne _ExitMRP
  527.  
  528.  mov esi,[ebx+04]
  529.  test esi,esi
  530.  jz _ExitMRP
  531.  
  532.  cmp dword ptr [iEnableSPO],0
  533.  je _MonRP00                       // Jump if feature is disabled
  534.  
  535.  cmp dword ptr [ecx+24],3
  536.  jne _ExitMRP
  537.  
  538. _MonRP00:
  539.  mov esi,#660000000
  540.  cmp [ebx+04],esi
  541.  jns _ExitMRP
  542.  
  543.  mov [ebx+04],esi
  544.  
  545. _ExitMRP:
  546.  mov esi,[ebx+04]                  // Original code (get prog)
  547.  mov eax,[ecx]                     // Original code
  548.  jmp _BackMRP                      // Back to main code
  549.  
  550. //========================================= 150 ok
  551. // During updating (min = 90%) Science
  552. _MonTaskProg:
  553.  mov ecx,eax
  554.  mov edi,edx
  555.  
  556.  cmp dword ptr [iEnableMTP],0
  557.  je _ExitMTP                       // Jump if feature is disabled
  558.  
  559.  test esi,esi
  560.  jz _ExitMTP
  561.  
  562.  mov eax,[esi+00000090]
  563.  cmp eax,[iOwnerID]
  564.  jne _ExitMTP
  565.  
  566.  mov eax,[ecx]
  567.  imul eax,eax,#90
  568.  
  569.  xor edx,edx
  570.  mov esi,#100
  571.  div esi
  572.  
  573.  cmp [ebx+1c],eax
  574.  jns _ExitMTP
  575.  
  576.  mov [ebx+1c],eax
  577.  
  578. _ExitMTP:
  579.  mov eax,ecx
  580.  mov edx,edi
  581.  
  582.  mov ecx,[ebx+1C]                  // Original code (get prog)
  583.  pop edi                           // Original code
  584.  pop esi                           // Original code
  585.  jmp _BackMTP                      // Back to main code
  586.  
  587. //========================================= 161
  588. // During updating (min = 98%)
  589. _MonInvestigationProg:
  590.  cmp dword ptr [iEnableMTP],0
  591.  je _ExitMIP                       // Jump if feature is disabled
  592.  
  593.  mov eax,[ebp+08]
  594.  test eax,eax
  595.  jz _ExitMIP
  596.  
  597.  mov eax,[eax+00000090]
  598.  cmp eax,[iOwnerID]
  599.  jne _ExitMIP
  600.  
  601.  mov eax,#98000
  602.  cmp [esi+1c],eax
  603.  jns _ExitMIP
  604.  
  605.  mov [esi+1c],eax
  606.  
  607. _ExitMIP:
  608.  mov ecx,[esi+1C]                  // Original code (get prog)
  609.  lea eax,[ebp+08]                  // Original code
  610.  jmp _BackMIP                      // Back to main code
  611.  
  612. //========================================= 130 ok
  613. // Right After updating (ships/Yards)
  614. _MonProdProg:
  615.  cmp dword ptr [iEnableMPP],0
  616.  je _ExitMPP                       // Jump if feature is disabled
  617.  
  618.  cmp esi,[pProd]
  619.  jne _ExitMPP
  620.  
  621.  mov dword ptr [pProd],55555555
  622.  
  623.  mov eax,[ebp-04]
  624.  lea eax,[eax-7d0]
  625.  cmp eax,[esi+2c]
  626.  js _ExitMPP
  627.  
  628.  mov [esi+2c],eax
  629.  
  630. _ExitMPP:
  631.  mov ecx,[esi+2C]                  // Original code (get prod prog)
  632.  xor eax,eax                       // Original code
  633.  jmp _BackMPP                      // Back to main code
  634.  
  635. //========================================= 161
  636. // When updating (prepare environment for previous script)
  637. _MonProdProg2:
  638.  add [ecx+2C],eax                  // Original code (set prod prog)
  639.  
  640.  mov eax,[ebx+04]
  641.  test eax,eax
  642.  jz _ExitPP2
  643.  
  644.  mov eax,[eax+00000218]
  645.  cmp eax,[iOwnerID]
  646.  jne _ExitPP2
  647.  
  648.  mov [pProd],ecx
  649.  
  650. _ExitPP2:
  651.  xor cl,cl                         // Original code
  652.  jmp _BackPP2                      // Back to main code
  653.  
  654. //========================================= 161
  655. // When updating soldiers (prepare environment for same script as previous one)
  656. _MonProdProg3:
  657.  push eax
  658.  
  659.  mov eax,[ebx+00000218]
  660.  cmp eax,[iOwnerID]
  661.  jne _ExitPP3
  662.  
  663.  mov [pProd],ecx
  664.  
  665. _ExitPP3:
  666.  pop eax
  667.  
  668.  add [ecx+2C],eax                  // Original code (upd prog)
  669.  mov ecx,[edi]                     // Original code
  670.  jmp _BackPP3                      // Back to main code
  671.  
  672. //========================================= 161 *
  673. // When updating (population growth on tiles and planets)
  674. _MonColProg:
  675.  push ebx
  676.  push ecx
  677.  
  678.  cmp dword ptr [iEnableMCP],0
  679.  je _ExitMCP                       // Jump if feature is disabled
  680.  
  681.  mov ebx,[edi+24]
  682.  test ebx,ebx
  683.  js _ExitMCP
  684.  
  685.  mov ebx,[esi]
  686.  test ebx,ebx
  687.  js _ExitMCP
  688.  
  689.  test ecx,ecx
  690.  jz _MonCP01
  691.  
  692.  cmp ecx,[ebp+000000ac]
  693.  jne _MonCP00
  694.  
  695.  cmp dword ptr [ecx+00000288],'plan'
  696.  je _MonCP02
  697.  
  698. _MonCP00:
  699.  cmp ecx,[ebp-14]
  700.  jne _MonCP01
  701.  
  702.  cmp dword ptr [ecx+00000288],'plan'
  703.  je _MonCP02
  704.  
  705. _MonCP01:
  706.  cmp edi,[ebp-04]
  707.  jne _ExitMCP
  708.  
  709.  lea ecx,[edi-60]
  710.  
  711.  cmp dword ptr [ecx+00000288],'plan'
  712.  jne _ExitMCP
  713.  
  714. _MonCP02:
  715.  mov ebx,[ecx+00000218]
  716.  cmp ebx,[iOwnerID]
  717.  jne _ExitMCP
  718.  
  719.  mov ebx,#1660000
  720.  cmp [edi+1c],ebx
  721.  jns _ExitMCP
  722.  
  723.  mov [edi+24],ebx
  724.  
  725. _ExitMCP:
  726.  pop ecx
  727.  pop ebx
  728.  
  729.  mov esi,[esi]                     // Original code
  730.  add esi,[edi+24]                  // Original code
  731.  jmp _BackMCP                      // Back to main code
  732.  
  733. //========================================= 131 ok
  734. // When updating (colonization) 80% (x100)
  735. _MonColProg2:
  736.  add [ebx+48],eax                  // Original code (upd prog)
  737.  
  738.  cmp dword ptr [iEnableQCP],0
  739.  je _ExitCP2                       // Jump if feature is disabled
  740.  
  741.  test edi,edi
  742.  jz _ExitCP2
  743.  
  744.  mov esi,[edi+00000090]
  745.  cmp esi,[iOwnerID]
  746.  jne _ExitCP2
  747.  
  748.  mov esi,#8000
  749.  cmp [ebx+48],esi
  750.  jns _ExitCP2
  751.  
  752.  mov [ebx+48],esi
  753.  
  754. _ExitCP2:
  755.  pop esi                           // Original code
  756.  pop edi                           // Original code
  757.  jmp _BackCP2                      // Back to main code
  758.  
  759. //========================================= 161
  760. // When updating (Building at Planets - Orbital Stations) (days)
  761. _MonBuildProg:
  762.  push eax
  763.  
  764.  cmp dword ptr [iEnableMBP],0
  765.  je _ExitMBP                       // Jump if feature is disabled
  766.  
  767.  mov eax,[ebx+08]
  768.  test eax,eax
  769.  js _ExitMBP
  770.  
  771.  mov eax,[ebx+04]
  772.  test eax,eax
  773.  jz _ExitMBP
  774.  
  775.  mov eax,[eax+00000218]
  776.  cmp eax,[iOwnerID]
  777.  jne _ExitMBP
  778.  
  779.  mov eax,#355
  780.  cmp [ebx+08],eax
  781.  jns _ExitMBP
  782.  
  783.  mov [ebx+08],eax
  784.  
  785. _ExitMBP:
  786.  pop eax
  787.  
  788.  mov [ebp-20],ebx                  // Original code
  789.  cmp dword ptr [ebx+08],00         // Original code (chk #days passed < 0)
  790.  jmp _BackMBP                      // Back to main code
  791.  
  792. //========================================= 161
  793. // When constructing by ship constructor (ex.: outpost)(%)
  794. // EDI = pFleet
  795. _MonBuildProg2:
  796.  cmp dword ptr [iEnableMBP],0
  797.  je _ExitBP2                       // Jump if feature is disabled
  798.  
  799.  mov ecx,[ebp+08]
  800.  test ecx,ecx
  801.  jz _ExitBP2
  802.  
  803.  mov ecx,[ecx+00000090]
  804.  cmp ecx,[iOwnerID]
  805.  jne _ExitBP2
  806.  
  807.  mov ecx,#97000
  808.  cmp [esi+24],ecx
  809.  jns _ExitBP2
  810.  
  811.  mov [esi+24],ecx
  812.  
  813. _ExitBP2:
  814.  mov ecx,[esi+24]                  // Original code (get % prog)
  815.  mov [ebp+08],eax                  // Original code
  816.  jmp _BackBP2                      // Back to main code
  817.  
  818. //========================================= 161
  819. // When looking at the planet surface (min existing res = 10)
  820. _MonPlanetTiles:
  821.  push edx
  822.  
  823.  cmp dword ptr [iEnableMPT],0
  824.  je _ExitMPT                       // Jump if feature is disabled
  825.  
  826.  mov eax,[ebx+10]
  827.  test eax,eax
  828.  jz _ExitMPT
  829.  
  830.  mov ecx,[ebx+04]
  831.  test ecx,ecx
  832.  jz _ExitMPT
  833.  
  834.  mov ecx,[ecx+00000218]
  835.  cmp ecx,[iOwnerID]
  836.  jne _ExitMPT
  837.  
  838.  mov ecx,[ebx+1c]
  839.  test ecx,ecx
  840.  jz _ExitMPT
  841.  
  842.  mov edx,[ebx+20]
  843.  test edx,edx
  844.  jz _ExitMPT
  845.  
  846.  mov eax,#10000
  847.  
  848. _MonPT00:
  849.  cmp ecx,edx
  850.  jge _ExitMPT
  851.  
  852.  cmp eax,[ecx+04]
  853.  js _MonPT01
  854.  
  855.  mov [ecx+04],eax
  856.  
  857. _MonPT01:
  858.  lea ecx,[ecx+10]
  859.  jmp _MonPT00
  860. //--
  861. _ExitMPT:
  862.  pop edx
  863.  
  864.  mov ecx,[ebx+6C]                  // Original code (get pType)
  865.  mov eax,[ecx]                     // Original code
  866.  jmp _BackMPT                      // Back to main code
  867.  
  868. //========================================= 150 OK
  869. // During Battle (ship/stations)
  870. _MonShipHull:
  871.  cmp dword ptr [iEnableGMD],0
  872.  je _ExitMSH                       // Jump if feature is disabled
  873.  
  874.  mov eax,[edi+30]
  875.  call _ChkPlayerFleet
  876.  jne _ExitMSH
  877.  
  878.  xor esi,esi
  879.  
  880. _ExitMSH:
  881.  sub [edi+00000080],esi            // Original code (dec cHull)
  882.  jmp _BackMSH                      // Back to main code
  883.  
  884. //========================================= 131 OK
  885. // When updating Warp Wind-down
  886. _MonFleetWarpWD:
  887.  inc [edi+0000009C]                // Original code (upd WWD)
  888.  
  889.  cmp dword ptr [iEnableMFW],0
  890.  je _ExitMFW                       // Jump if feature is disabled
  891.  
  892.  mov esi,[edi+04]
  893.  test esi,esi
  894.  jz _ExitMFW
  895.  
  896.  mov esi,[esi+00000090]
  897.  cmp esi,[iOwnerID]
  898.  jne _ExitMFW
  899.  
  900.  mov esi,#6600
  901.  cmp [edi+0000009C],esi
  902.  jns _ExitMFW
  903.  
  904.  mov [edi+0000009C],esi
  905.  
  906. _ExitMFW:
  907.  jmp _BackMFW                      // Back to main code
  908.  
  909. //========================================= 161 *
  910. // When updating Planetary Fortification
  911. _MonPlanetFortification:
  912.  cmp dword ptr [iEnableGMD],0
  913.  je _ExitMPF                       // Jump if feature is disabled
  914.  
  915.  mov esi,[ebx+00000218]
  916.  cmp esi,[iOwnerID]
  917.  jne _ExitMPF
  918.  
  919.  mov esi,[ebx+000002b8]
  920.  test esi,esi
  921.  js _ExitMPF
  922.  
  923.  cmp eax,esi
  924.  cmovs eax,esi
  925.  
  926. _ExitMPF:
  927.  mov [ebx+000002B8],eax            // Original code (upd Fort...)
  928.  jmp _BackMPF                      // Back to main code
  929.  
  930. //========================================= 150 OK
  931. // During Battle (Troops)
  932. _MonTroopHealth:
  933.  cmp dword ptr [iEnableGMD],0
  934.  je _ExitMTH                       // Jump if feature is disabled
  935.  
  936.  mov eax,[ebx+08]
  937.  call _ChkPlayerTroop
  938.  jne _ExitMTH
  939.  
  940.  xor eax,eax
  941.  mov [edi],eax
  942.  
  943. _ExitMTH:
  944.  mov eax,[edi]                     // Original code
  945.  sub [ebx+28],eax                  // Original code (dec cHealth)
  946.  jmp _BackMTH                      // Back to main code
  947.  
  948. //========================================= 131 OK
  949. // During Battle (Troops)(defender)
  950. _MonTroopMorale:
  951.  cmp dword ptr [iEnableMTM],0
  952.  je _ExitMTM                       // Jump if feature is disabled
  953.  
  954.  mov eax,[esi+08]
  955.  call _ChkPlayerTroop
  956.  jne _ExitMTM
  957.  
  958.  xor edx,edx
  959.  
  960. _ExitMTM:
  961.  mov eax,[ebp+08]                  // Original code
  962.  sub [esi+60],edx                  // Original code (dec Morale)
  963.  jmp _BackMTM                      // Back to main code
  964.  
  965. //========================================= 131 OK
  966. // During Battle (Troops)(attacker)
  967. _MonTroopMorale2:
  968.  cmp dword ptr [iEnableMTM],0
  969.  je _ExitTM2                       // Jump if feature is disabled
  970.  
  971.  mov eax,[esi+08]
  972.  call _ChkPlayerTroop
  973.  jne _ExitTM2
  974.  
  975.  xor edx,edx
  976.  
  977. _ExitTM2:
  978.  mov eax,[ebp+08]                  // Original code
  979.  sub [esi+60],edx                  // Original code (dec Morale)
  980.  jmp _BackTM2                      // Back to main code
  981.  
  982. //========================================= 160 new
  983. // Character will level up to max when getting any XP
  984. _MonCharXP:
  985.  mov ecx,eax
  986.  
  987.  cmp dword ptr [iEnableMCX],0
  988.  je _ExitMCX                       // Jump if feature is disabled
  989.  
  990.  mov eax,[edi+08]
  991.  call _ChkPlayerChars
  992.  jnz _ExitMCX
  993.  
  994.  mov eax,[ecx]
  995.  cmp [edi+70],eax
  996.  jns _ExitMCX
  997.  
  998.  mov [edi+70],eax
  999.  
  1000. _ExitMCX:
  1001.  mov eax,ecx
  1002.  
  1003.  mov ecx,[edi+70]                  // Original code
  1004.  cmp ecx,[eax]                     // Original code
  1005.  jmp _BackMCX                      // Back to main code
  1006.  
  1007. //========================================= 150 OK
  1008. // Find out the resource info of a given Index
  1009. _MonResourceInfo:
  1010.  push ebx
  1011.  
  1012.  mov edi,[edx+04]
  1013.  sub edi,[edx]
  1014.  
  1015.  mov dword ptr [iResMax],00
  1016.  
  1017.  test edi,edi
  1018.  jz _ExitRIO
  1019.  
  1020.  sar edi,02
  1021.  mov [iResMax],edi
  1022.  cmp edi,[iResIndex]
  1023.  js _ExitRIO
  1024.  
  1025.  mov edi,[iResIndex]
  1026.  test edi,edi
  1027.  jz _ExitRIO
  1028.  
  1029.  mov ebx,[edx]
  1030.  mov edi,[ebx+edi*4-04]
  1031.  mov [pResInfo],edi
  1032.  
  1033. _ExitRIO:
  1034.  pop ebx
  1035.  
  1036.  mov edi,[edx+04]                  // Original code (get pEnd)
  1037.  sub edi,[edx]                     // Original code (pBegin)
  1038.  jmp _BackRIO                      // Back to main code
  1039.  
  1040. //========================================= 161
  1041. // When checking const prog during turn (for tiles)
  1042. _MonTileConst:
  1043.  push ecx
  1044.  
  1045.  imul eax,[esi+40],000003E8        // Original code (get #Days)
  1046.  
  1047.  cmp dword ptr [iEnableMBP],0
  1048.  je _ExitMTC                       // Jump if feature is disabled
  1049.  
  1050.  mov ecx,[ebx+00000218]
  1051.  cmp ecx,[iOwnerID]
  1052.  jne _ExitMTC
  1053.  
  1054.  mov [esi+48],eax
  1055.  
  1056. _ExitMTC:
  1057.  pop ecx
  1058.  jmp _BackMTC                      // Back to main code
  1059.  
  1060. //========================================= 160 *
  1061. // At the pick one leader up screen (additional leader researched)
  1062. _MonMaxLeaders:
  1063.  push eax
  1064.  
  1065.  cmp dword ptr [iEnableMML],0
  1066.  je _ExitMML                       // Jump if feature is disabled
  1067.  
  1068.  mov eax,[ebp-10]
  1069.  cmp eax,[pPlayer]
  1070.  jne _ExitMML
  1071.  
  1072.  mov eax,#66000
  1073.  cmp [ebx+ecx*8+04],eax
  1074.  jns _ExitMML
  1075.  
  1076.  mov [ebx+ecx*8+04],eax            // Additional # of leaders (66)
  1077.  
  1078. _ExitMML:
  1079.  pop eax
  1080.  
  1081.  mov al,[eax+0000262D]             // Original code
  1082.  jmp _BackMML                      // Back to main code
  1083.  
  1084. //========================================= 131 OK
  1085. // When updating Warmhole time
  1086. _MonWormhole:
  1087.  cmp dword ptr [iEnableMFW],0
  1088.  je _ExitMWH                       // Jump if feature is disabled
  1089.  
  1090.  mov ebx,[ebp-10]
  1091.  test ebx,ebx
  1092.  jz _ExitMWH
  1093.  
  1094.  cmp ebx,[ebp+08]
  1095.  jne _ExitMWH
  1096.  
  1097.  mov ebx,[ebx+04]
  1098.  test ebx,ebx
  1099.  jz _ExitMWH
  1100.  
  1101.  mov ebx,[ebx+00000090]
  1102.  cmp ebx,[iOwnerID]
  1103.  jne _ExitMWH
  1104.  
  1105.  mov [esi+20],eax
  1106.  
  1107. _ExitMWH:
  1108.  cmp eax,[esi+20]                  // Original code (chk prog)
  1109.  setle al                          // Original code
  1110.  jmp _BackMWH                      // Back to main code
  1111.  
  1112. //========================================= 161
  1113. // When constructing by ship constructor (ex.: wormhole)(%x1000)
  1114. _MonBuildProg3:
  1115.  add [edi+34],eax                  // Original code (upd % prog)
  1116.  
  1117.  cmp dword ptr [iEnableMBP],0
  1118.  je _ExitBP3                       // Jump if feature is disabled
  1119.  
  1120.  mov eax,[ebp-3C]
  1121.  test eax,eax
  1122.  jz _ExitBP3
  1123.  
  1124.  mov eax,[eax+00000090]
  1125.  cmp eax,[iOwnerID]
  1126.  jne _ExitBP3
  1127.  
  1128.  mov eax,#97000
  1129.  cmp [edi+34],eax
  1130.  jns _ExitBP3
  1131.  
  1132.  mov [edi+34],eax
  1133.  
  1134. _ExitBP3:
  1135.  pop edi                           // Original code
  1136.  pop esi                           // Original code
  1137.  jmp _BackBP3                      // Back to main code
  1138.  
  1139. //========================================= 131 OK
  1140. // When Entering Hyperlane
  1141. _MonFleetHyper:
  1142.  push esi
  1143.  
  1144.  inc [edi+00000098]                // Original code (upd prog)
  1145.  
  1146.  cmp dword ptr [iEnableMFW],0
  1147.  je _ExitMFH                       // Jump if feature is disabled
  1148.  
  1149.  mov esi,[edi+04]
  1150.  test esi,esi
  1151.  jz _ExitMFH
  1152.  
  1153.  mov esi,[esi+00000090]
  1154.  cmp esi,[iOwnerID]
  1155.  jne _ExitMFH
  1156.  
  1157.  mov [edi+00000098],eax
  1158.  
  1159. _ExitMFH:
  1160.  pop esi
  1161.  jmp _BackMFH                      // Back to main code
  1162.  
  1163. //========================================= 160
  1164. // When constructing by ship constructor (ex.: MEGA)
  1165. _MonBuildProg4:
  1166.  mov eax,[eax]                     // Original code
  1167.  add [ebx+5C],eax                  // Original code (upd prog)
  1168.  
  1169.  cmp dword ptr [iEnableMBM],0
  1170.  je _ExitBP4                       // Jump if feature is disabled
  1171.  
  1172.  test edi,edi
  1173.  jz _ExitBP4
  1174.  
  1175.  mov esi,[edi+00000090]
  1176.  cmp esi,[iOwnerID]
  1177.  jne _ExitBP4
  1178.  
  1179.  mov esi,[ebx+18]
  1180.  test esi,esi
  1181.  jz _ExitBP4
  1182.  
  1183.  mov eax,[esi+000000a8]
  1184.  imul eax,eax,#99
  1185.  
  1186.  push edx
  1187.  xor edx,edx
  1188.  mov esi,#100
  1189.  div esi
  1190.  pop edx
  1191.  
  1192.  cmp [ebx+5C],eax
  1193.  jns _ExitBP4
  1194.  
  1195.  mov [ebx+5C],eax
  1196.  
  1197. _ExitBP4:
  1198.  pop esi                           // Original code
  1199.  jmp _BackBP4                      // Back to main code
  1200.  
  1201. //========================================= 132 (v6.8) OK
  1202. // When Moving Fleet (original by transcendperfection)
  1203. _MonInstantMove:
  1204.  push eax
  1205.  push esi
  1206.  
  1207.  movzx eax,byte ptr [OOIM]
  1208.  
  1209.  cmp dword ptr [iEnableMIM],0
  1210.  je _ExitMIM                       // Jump if feature is disabled
  1211.  
  1212.  mov esi,[ecx+04]
  1213.  test esi,esi
  1214.  jz _ExitMIM
  1215.  
  1216.  mov esi,[esi+00000090]
  1217.  cmp esi,[iOwnerID]
  1218.  jne _ExitMIM
  1219.  
  1220.  inc eax
  1221.  
  1222. _ExitMIM:
  1223.  test eax,eax
  1224.  
  1225.  pop esi
  1226.  pop eax
  1227.  jmp _BackMIM                      // Back to main code
  1228.  
  1229. //========================================= 132 (v6.8) OK
  1230. // When Moving Fleet (original by transcendperfection)
  1231. _MonInstantMove2:
  1232.  push eax
  1233.  push esi
  1234.  
  1235.  movzx eax,byte ptr [OOIM]
  1236.  
  1237.  cmp dword ptr [iEnableMIM],0
  1238.  je _ExitIM2                       // Jump if feature is disabled
  1239.  
  1240.  mov esi,[edi+04]
  1241.  test esi,esi
  1242.  jz _ExitIM2
  1243.  
  1244.  mov esi,[esi+00000090]
  1245.  cmp esi,[iOwnerID]
  1246.  jne _ExitIM2
  1247.  
  1248.  inc eax
  1249.  
  1250. _ExitIM2:
  1251.  test eax,eax
  1252.  
  1253.  pop esi
  1254.  pop eax
  1255.  jmp _BackIM2                      // Back to main code
  1256.  
  1257. //========================================= 132 OK (v6.9)
  1258. // When Moving Fleet (original by transcendperfection)
  1259. _MonInstantMove3:
  1260.  push eax
  1261.  push esi
  1262.  
  1263.  movzx eax,byte ptr [OOIM]
  1264.  
  1265.  cmp dword ptr [iEnableMIM],0
  1266.  je _ExitIM3                       // Jump if feature is disabled
  1267.  
  1268.  mov esi,[ecx+1c]
  1269.  test esi,esi
  1270.  jz _ExitIM3
  1271.  
  1272.  mov esi,[esi+00000090]
  1273.  cmp esi,[iOwnerID]
  1274.  jne _ExitIM3
  1275.  
  1276.  inc eax
  1277.  
  1278. _ExitIM3:
  1279.  test eax,eax
  1280.  
  1281.  pop esi
  1282.  pop eax
  1283.  jmp _BackIM3                      // Back to main code
  1284.  
  1285. //========================================= 132 OK (v6.9)
  1286. // When Moving Fleet (original by transcendperfection)
  1287. _MonInstantMove4:
  1288.  push eax
  1289.  push esi
  1290.  
  1291.  movzx eax,byte ptr [OOIM]
  1292.  
  1293.  cmp dword ptr [iEnableMIM],0
  1294.  je _ExitIM4                       // Jump if feature is disabled
  1295.  
  1296.  mov esi,[ecx+1c]
  1297.  test esi,esi
  1298.  jz _ExitIM4
  1299.  
  1300.  mov esi,[esi+00000090]
  1301.  cmp esi,[iOwnerID]
  1302.  jne _ExitIM4
  1303.  
  1304.  inc eax
  1305.  
  1306. _ExitIM4:
  1307.  test eax,eax
  1308.  
  1309.  pop esi
  1310.  pop eax
  1311.  jmp _BackIM4                      // Back to main code
  1312.  
  1313. //========================================= 132 OK (v6.9)
  1314. // When Moving Ship (original by transcendperfection)
  1315. _MonInstantMove5:
  1316.  push eax
  1317.  push esi
  1318.  
  1319.  movzx esi,byte ptr [OOIM]
  1320.  
  1321.  cmp dword ptr [iEnableMIM],0
  1322.  je _ExitIM5                       // Jump if feature is disabled
  1323.  
  1324.  mov eax,[ecx+48]
  1325.  call _ChkPlayerFleet
  1326.  jnz _ExitIM5
  1327.  
  1328.  inc esi
  1329.  
  1330. _ExitIM5:
  1331.  test esi,esi
  1332.  
  1333.  pop esi
  1334.  pop eax
  1335.  jmp _BackIM5                      // Back to main code
  1336.  
  1337. //========================================= 150 OK (v7.0) Fix (v7.2)
  1338. // When Moving Ship
  1339. _MonInstantMove6:
  1340.  push eax
  1341.  push esi
  1342.  
  1343.  movzx esi,byte ptr [OOIM]
  1344.  
  1345.  cmp dword ptr [iEnableMIM],0
  1346.  je _ExitIM6                       // Jump if feature is disabled
  1347.  
  1348.  mov eax,[ebp-14]
  1349.  cmp eax,[ebp+08]
  1350.  jne _ExitIM6
  1351.  
  1352.  mov eax,[eax+04]
  1353.  test eax,eax
  1354.  jz _ExitIM6
  1355.  
  1356.  mov eax,[eax+00000090]
  1357.  cmp eax,[iOwnerID]
  1358.  jne _ExitIM6
  1359.  
  1360.  inc esi
  1361.  
  1362. _ExitIM6:
  1363.  test esi,esi
  1364.  
  1365.  pop esi
  1366.  pop eax
  1367.  jmp _BackIM6                      // Back to main code
  1368.  
  1369. //========================================= 161 (v7.2)(v7.3)
  1370. // When surveying a planet/star (original by transcendperfection)
  1371. _MonPlanetAnomaly:
  1372.  push eax
  1373.  
  1374.  cmp dword ptr [iEnableMPA],0
  1375.  je _ExitMPA                       // Jump if feature is disabled
  1376.  
  1377.  cmp ebx,[pPlayer]
  1378.  jne _ExitMPA
  1379.  
  1380.  test edi,edi
  1381.  jz _MonPA00
  1382.  
  1383.  cmp dword ptr [edi+00000288],'plan'
  1384.  jne _MonPA00
  1385.  
  1386.  mov eax,[edi+00000390]
  1387.  or eax,[edi+000003d4]
  1388.  or eax,[edi+000009b4]
  1389.  or eax,[edi+00000be8]
  1390.  jz _MonPA00
  1391.  
  1392.  cmp dword ptr [iEnableIPR],0
  1393.  je _ExitMPA                       // Jump if feature is disabled
  1394.  
  1395. _MonPA00:
  1396.  mov esi,#1000                     // Chance of a planet of having an anomaly
  1397.  
  1398. _ExitMPA:
  1399.  pop eax
  1400.  
  1401.  mov [ebp-08],ecx                  // Original code
  1402.  mov ecx,[ebp+0C]                  // Original code
  1403.  jmp _BackMPA                      // Back to main code
  1404.  
  1405. //========================================= 150 OK (v7.2)
  1406. // When viewing anomaly risk (original by transcendperfection)
  1407. _MonAnomalyRisk:
  1408.  cmp dword ptr [iEnableMAR],0
  1409.  je _ExitMAR                       // Jump if feature is disabled
  1410.  
  1411.  push eax
  1412.  mov eax, [esp+50]
  1413.  mov eax, [eax-160]
  1414.  call _ChkPlayerChars
  1415.  pop eax
  1416.  jnz _ExitMAR
  1417.  
  1418.  mov esi,#-100000                  // No Risk
  1419.  
  1420. _ExitMAR:
  1421.  add ecx,esi                       // Original code
  1422.  add eax,ecx                       // Original code
  1423.  mov ecx,000003E8                  // Original code
  1424.  jmp _BackMAR                      // Back to main code
  1425.  
  1426. //========================================= 150 OK (v7.2)
  1427. // When viewing anomaly risk (original by transcendperfection)
  1428. _MonAnomalyRisk2:
  1429.  cmp dword ptr [iEnableMAR],0
  1430.  je _ExitAR2                       // Jump if feature is disabled
  1431.  
  1432.  push eax
  1433.  mov eax, [esp+50]
  1434.  mov eax, [eax-160]
  1435.  call _ChkPlayerChars
  1436.  pop eax
  1437.  jnz _ExitAR2
  1438.  
  1439.  mov eax,#-100000                  // No Risk
  1440.  
  1441. _ExitAR2:
  1442.  cmp eax,FFE76C8C                  // Original code
  1443.  jmp _BackAR2                      // Back to main code
  1444.  
  1445. //========================================= 160 *
  1446. // Last selected megastructure during upgrade (game paused)
  1447. _MonSelMega:
  1448.  mov [pMega],esi
  1449.  
  1450. _ExitMSM:
  1451.  mov ecx,[ecx+000000A8]            // Original code
  1452.  jmp _BackMSM                      // Back to main code
  1453.  
  1454. //========================================= 150 OK
  1455. // Check if it is a player's ship/Station (based on its fleet id)
  1456. // Input : EAX = FleetID
  1457. // Output: Z = found and NZ = Not Found
  1458. _ChkPlayerFleet:
  1459. push ebx
  1460. push ecx
  1461.  
  1462. mov ebx,[pPlayer]
  1463. mov ecx,[ebx+0000061c]
  1464. mov ebx,[ebx+00000618]
  1465. test ebx,ebx
  1466. jz _ChkPF01
  1467.  
  1468. _ChkPF00:
  1469. cmp ecx,ebx
  1470. jle _ChkPF01
  1471.  
  1472. cmp eax,[ebx]
  1473. je _ChkPF02
  1474.  
  1475. lea ebx,[ebx+04]
  1476. jmp _ChkPF00
  1477. //==
  1478. _ChkPF01:
  1479. inc eax
  1480. test eax,eax
  1481.  
  1482. _ChkPF02:
  1483. pop ecx
  1484. pop ebx
  1485. ret
  1486.  
  1487. //========================================= 150 OK
  1488. // Check if it is a player's troop (based on its id)
  1489. // Input : EAX = TroopID
  1490. // Output: Z = found and NZ = Not Found
  1491. _ChkPlayerTroop:
  1492.  push ebx
  1493.  push ecx
  1494.  
  1495.  mov ebx,[pPlayer]
  1496.  mov ecx,[ebx+00000628]
  1497.  mov ebx,[ebx+00000624]
  1498.  test ebx,ebx
  1499.  jz _ChkPT01
  1500.  
  1501. _ChkPT00:
  1502.  cmp ecx,ebx
  1503.  jle _ChkPF01
  1504.  
  1505.  cmp eax,[ebx]
  1506.  je _ChkPT02
  1507.  
  1508.  lea ebx,[ebx+04]
  1509.  jmp _ChkPT00
  1510. //--
  1511. _ChkPT01:
  1512.  inc eax
  1513.  test eax,eax
  1514.  
  1515. _ChkPT02:
  1516.  pop ecx
  1517.  pop ebx
  1518.  ret
  1519.  
  1520. //========================================= 150 OK (v7.2)
  1521. // Check if it is a player's character (based on its id)
  1522. // Input : EAX = CharID
  1523. // Output: Z = found and NZ = Not Found
  1524. _ChkPlayerChars:
  1525. push ebx
  1526. push ecx
  1527.  
  1528. mov ebx,[pPlayer]
  1529. mov ecx,[ebx+00000610]
  1530. mov ebx,[ebx+0000060c]
  1531. test ebx,ebx
  1532. jz _ChkPC01
  1533.  
  1534. _ChkPC00:
  1535. cmp ecx,ebx
  1536. jle _ChkPC01
  1537.  
  1538. cmp eax,[ebx]
  1539. je _ChkPC02
  1540.  
  1541. lea ebx,[ebx+04]
  1542. jmp _ChkPC00
  1543. //==
  1544. _ChkPC01:
  1545. inc eax
  1546. test eax,eax
  1547.  
  1548. _ChkPC02:
  1549. pop ecx
  1550. pop ebx
  1551. ret
  1552.  
  1553. //========================================= 150 OK
  1554. // Check for additional resource max value (via id)
  1555. // Input : ECX = Resource ID
  1556. // Output: ECX = Additinal value or Zero
  1557. _ChkAdditionalRes:
  1558. push ebx
  1559. push edx
  1560.  
  1561. mov ebx,[pPlayer]
  1562. mov edx,[ebx+00000910]
  1563. mov ebx,[ebx+0000090c]
  1564. test ebx,ebx
  1565. jz _ChkAR02
  1566.  
  1567. _ChkAR00:
  1568. cmp edx,ebx
  1569. jle _ChkAR02
  1570.  
  1571. cmp ecx,[ebx]
  1572. je _ChkAR01
  1573.  
  1574. lea ebx,[ebx+08]
  1575. jmp _ChkAR00
  1576. //--
  1577. _ChkAR01:
  1578. mov ecx,[ebx+04]
  1579. test ecx,ecx
  1580. jns _ChkAR03
  1581.  
  1582. _ChkAR02:
  1583. xor ecx,ecx
  1584.  
  1585. _ChkAR03:
  1586. pop edx
  1587. pop ebx
  1588. ret
  1589.  
  1590. //=========================================
  1591. db '======================================>'
  1592. db 'CE6.6 Script by Recifense 051217'
  1593. //=========================================
  1594. // Variables
  1595. iEnableMMR:
  1596. dd 0
  1597. iEnableMSR:
  1598. dd 0
  1599. iEnableMRP:
  1600. dd 0
  1601. iEnableMTP:
  1602. dd 0
  1603. iEnableMPP:
  1604. dd 0
  1605. iEnableMCP:
  1606. dd 0
  1607. iEnableMBP:
  1608. dd 0
  1609. iEnableMPT:
  1610. dd 0
  1611. iEnableGMD:
  1612. dd 0
  1613. iEnableMFW:
  1614. dd 0
  1615. iEnableMTM:
  1616. dd 0
  1617. iEnableQRP:
  1618. dd 0
  1619. iEnableMML:
  1620. dd 0
  1621. iEnableMTF:
  1622. dd 0
  1623. iEnableQCP:
  1624. dd 0
  1625. iEnableMIM:
  1626. dd 0
  1627. iEnableSPO:
  1628. dd 0
  1629. iEnableRIU:
  1630. dd 0
  1631. iEnableMBM:
  1632. dd 0
  1633. iEnableMPA:
  1634. dd 0
  1635. iEnableMAR:
  1636. dd 0
  1637. iEnableIPR:
  1638. dd 0
  1639. iEnableMCX:
  1640. dd 0
  1641. iOwnerID:
  1642. dd #999
  1643. iStatusID:
  1644. dd 0
  1645. iResIndex:
  1646. dd 2
  1647. iResMax:
  1648. dd 2
  1649. iMinUnity:
  1650. dd #660
  1651. pPlayer:
  1652. dd MyCode
  1653. pRuler:
  1654. dd 0
  1655. pChar:
  1656. dd 0
  1657. pPlanet:
  1658. dd 0
  1659. pShip:
  1660. dd 0
  1661. pFleet:
  1662. dd 0
  1663. pTile:
  1664. dd 0
  1665. pResInfo:
  1666. dd 0
  1667. pCommon:
  1668. dd MyCode
  1669. pStatusInfo:
  1670. dd 0
  1671. pProd:
  1672. dd MyCode
  1673. pTroop:
  1674. dd 0
  1675. pMega:
  1676. dd 0
  1677.  
  1678. //=========================================
  1679. // Hacking Points
  1680. MOHP:
  1681. jmp _MonHumanPlayer
  1682. nop
  1683. _BackMHP:
  1684.  
  1685. MOSC:
  1686. jmp _MonSelChar
  1687. nop
  1688. _BackMSC:
  1689.  
  1690. MOSS:
  1691. jmp _MonSelShip
  1692. nop
  1693. _BackMSS:
  1694.  
  1695. MOSF:
  1696. jmp _MonSelFleet
  1697. nop
  1698. _BackMSF:
  1699.  
  1700. MOSP:
  1701. jmp _MonSelPlanet
  1702. nop
  1703. _BackMSP:
  1704.  
  1705. MSTE:
  1706. jmp _MonSelTile
  1707. _BackSTE:
  1708.  
  1709. MSTP:
  1710. jmp _MonSelTroop
  1711. _BackMST:
  1712.  
  1713. MORP:
  1714. jmp _MonResearchProg
  1715. _BackMRP:
  1716.  
  1717. MOTP:
  1718. jmp _MonTaskProg
  1719. _BackMTP:
  1720.  
  1721. MOIP:
  1722. jmp _MonInvestigationProg
  1723. nop
  1724. _BackMIP:
  1725.  
  1726. MOPP:
  1727. jmp _MonProdProg
  1728. _BackMPP:
  1729.  
  1730. MPP2:
  1731. jmp _MonProdProg2
  1732. _BackPP2:
  1733.  
  1734. MPP3:
  1735. jmp _MonProdProg3
  1736. _BackPP3:
  1737.  
  1738. MOCP:
  1739. jmp _MonColProg
  1740. _BackMCP:
  1741.  
  1742. MCP2:
  1743. jmp _MonColProg2
  1744. _BackCP2:
  1745.  
  1746. MOBP:
  1747. jmp _MonBuildProg
  1748. nop
  1749. nop
  1750. _BackMBP:
  1751.  
  1752. MBP2:
  1753. jmp _MonBuildProg2
  1754. nop
  1755. _BackBP2:
  1756.  
  1757. MOPT:
  1758. jmp _MonPlanetTiles
  1759. _BackMPT:
  1760.  
  1761. MOSH:
  1762. jmp _MonShipHull
  1763. nop
  1764. _BackMSH:
  1765.  
  1766. MOFW:
  1767. jmp _MonFleetWarpWD
  1768. nop
  1769. _BackMFW:
  1770.  
  1771. MOPF:
  1772. jmp _MonPlanetFortification
  1773. nop
  1774. _BackMPF:
  1775.  
  1776. MOTH:
  1777. jmp _MonTroopHealth
  1778. _BackMTH:
  1779.  
  1780. MOTM:
  1781. jmp _MonTroopMorale
  1782. nop
  1783. _BackMTM:
  1784.  
  1785. MTM2:
  1786. jmp _MonTroopMorale2
  1787. nop
  1788. _BackTM2:
  1789.  
  1790. MOCX:
  1791. jmp _MonCharXP
  1792. _BackMCX:
  1793.  
  1794. MRIO:
  1795. jmp _MonResourceInfo
  1796. _BackRIO:
  1797.  
  1798. MOTC:
  1799. jmp _MonTileConst
  1800. nop
  1801. nop
  1802. _BackMTC:
  1803.  
  1804. MOML:
  1805. jmp _MonMaxLeaders
  1806. nop
  1807. _BackMML:
  1808.  
  1809. MOWH:
  1810. jmp _MonWormhole
  1811. nop
  1812. _BackMWH:
  1813.  
  1814. MBP3:
  1815. jmp _MonBuildProg3
  1816. _BackBP3:
  1817.  
  1818. MBP4:
  1819. jmp _MonBuildProg4
  1820. nop
  1821. _BackBP4:
  1822.  
  1823. MOFH:
  1824. jmp _MonFleetHyper
  1825. nop
  1826. _BackMFH:
  1827.  
  1828. MOIM:
  1829. jmp _MonInstantMove
  1830. nop
  1831. nop
  1832. _BackMIM:
  1833.  
  1834. MIM2:
  1835. jmp _MonInstantMove2
  1836. nop
  1837. nop
  1838. _BackIM2:
  1839.  
  1840. MIM3:
  1841. jmp _MonInstantMove3
  1842. nop
  1843. nop
  1844. _BackIM3:
  1845.  
  1846. MIM4:
  1847. jmp _MonInstantMove4
  1848. nop
  1849. nop
  1850. _BackIM4:
  1851.  
  1852. MIM5:
  1853. jmp _MonInstantMove5
  1854. nop
  1855. nop
  1856. _BackIM5:
  1857.  
  1858. MIM6:
  1859. jmp _MonInstantMove6
  1860. nop
  1861. nop
  1862. _BackIM6:
  1863.  
  1864. MOPA:
  1865. jmp _MonPlanetAnomaly
  1866. nop
  1867. _BackMPA:
  1868.  
  1869. MOAR:
  1870. jmp _MonAnomalyRisk
  1871. nop
  1872. nop
  1873. nop
  1874. nop
  1875. _BackMAR:
  1876.  
  1877. MAR2:
  1878. jmp _MonAnomalyRisk2
  1879. _BackAR2:
  1880.  
  1881. MOSM:
  1882. jmp _MonSelMega
  1883. nop
  1884. _BackMSM:
  1885.  
  1886. //=========================================
  1887. // Script for Restoring Original Codes
  1888. [DISABLE]
  1889. MOHP:
  1890. // mov ecx,[esi+000007D0]
  1891. db 8b 8e d0 07 00 00
  1892.  
  1893. MOSC:
  1894. // mov esi,[ecx+00000098]
  1895. db 8b b1 98 00 00 00
  1896.  
  1897. MOSS:
  1898. // mov eax,[edi+00000098]
  1899. db 8b 87 98 00 00 00
  1900.  
  1901. MOSF:
  1902. // mov esi,[eax+000006C4]
  1903. db 8b b0 c4 06 00 00
  1904.  
  1905. MOSP:
  1906. // mov edi,[eax+00000218]
  1907. db 8b b8 18 02 00 00
  1908.  
  1909. MSTE:
  1910. // mov ecx,[eax+6C]
  1911. // mov eax,[ecx]
  1912. db 8b 48 6c 8b 01
  1913.  
  1914. MSTP:
  1915. // mov ecx,[ecx+28]
  1916. // mov [edx],ecx
  1917. db 8b 49 28 89 0a
  1918.  
  1919. MORP:
  1920. // mov esi,[ebx+04]
  1921. // mov eax,[ecx]
  1922. db 8b 73 04 8b 01
  1923.  
  1924. MOTP:
  1925. // mov ecx,[ebx+1C]
  1926. // pop edi
  1927. // pop esi
  1928. db 8b 4b 1c 5f 5e
  1929.  
  1930. MOIP:
  1931. // mov ecx,[esi+1C]
  1932. // lea eax,[ebp+08]
  1933. db 8b 4e 1c 8d 45 08
  1934.  
  1935. MOPP:
  1936. // mov ecx,[esi+2C]
  1937. // xor eax,eax
  1938. db 8b 4e 2c 33 c0
  1939.  
  1940. MPP2:
  1941. // add [ecx+2C],eax
  1942. // xor cl,cl
  1943. db 01 41 2c 32 c9
  1944.  
  1945. MPP3:
  1946. // add [ecx+2C],eax
  1947. // mov ecx,[edi]
  1948. db 01 41 2c 8b 0f
  1949.  
  1950. MOCP:
  1951. // mov esi,[esi]
  1952. // add esi,[edi+24]
  1953. db 8b 36 03 77 24
  1954.  
  1955. MCP2:
  1956. // add [ebx+48],eax
  1957. // pop esi
  1958. // pop edi
  1959. db 01 43 48 5e 5f
  1960.  
  1961. MOBP:
  1962. // mov [ebp-20],ebx
  1963. // cmp dword ptr [ebx+08],00
  1964. db 89 5d e0 83 7b 08 00
  1965.  
  1966. MBP2:
  1967. // mov ecx,[esi+24]
  1968. // mov [ebp+08],eax
  1969. db 8b 4e 24 89 45 08
  1970.  
  1971. MOPT:
  1972. // mov ecx,[ebx+6C]
  1973. // mov eax,[ecx]
  1974. db 8b 4b 6c 8b 01
  1975.  
  1976. MOSH:
  1977. // sub [edi+00000080],esi
  1978. db 29 b7 80 00 00 00
  1979.  
  1980. MOFW:
  1981. // inc [edi+0000009C]
  1982. db ff 87 9c 00 00 00
  1983.  
  1984. MOPF:
  1985. // mov [ebx+000002B8],eax
  1986. db 89 83 b8 02 00 00
  1987.  
  1988. MOTH:
  1989. // smov eax,[edi]
  1990. // sub [ebx+28],eax
  1991. db 8b 07 29 43 28
  1992.  
  1993. MOTM:
  1994. // mov eax,[ebp+08]
  1995. // sub [esi+60],edx
  1996. db 8b 45 08 29 56 60
  1997.  
  1998. MTM2:
  1999. // mov eax,[ebp+08]
  2000. // sub [esi+60],edx
  2001. db 8b 45 08 29 56 60
  2002.  
  2003. MOCX:
  2004. // mov ecx,[edi+70]
  2005. // cmp ecx,[eax]
  2006. db 8b 4f 70 3b 08
  2007.  
  2008. MRIO:
  2009. // mov edi,[edx+04]
  2010. // sub edi,[edx]
  2011. db 8b 7a 04 2b 3a
  2012.  
  2013. MOTC:
  2014. // imul eax,[esi+40],000003E8
  2015. db 69 46 40 e8 03 00 00
  2016.  
  2017. MOML:
  2018. // mov al,[eax+0000262D]
  2019. db 8a 80 2d 26 00 00
  2020.  
  2021. MOWH:
  2022. // cmp eax,[esi+20]
  2023. // setle al
  2024. db 3b 46 20 0f 9e c0
  2025.  
  2026. MBP3:
  2027. // add [edi+34],eax
  2028. // pop edi
  2029. // pop esi
  2030. db 01 47 34 5f 5e
  2031.  
  2032. MBP4:
  2033. // pop esi
  2034. // mov eax,[eax]
  2035. // add [ebx+5C],eax
  2036. db 5e 8b 00 01 43 5c
  2037.  
  2038. MOFH:
  2039. // inc [edi+00000098]
  2040. db ff 87 98 00 00 00
  2041.  
  2042. MOIM:
  2043. cmp byte ptr [OOIM],00
  2044.  
  2045. MIM2:
  2046. cmp byte ptr [OOIM],00
  2047.  
  2048. MIM3:
  2049. cmp byte ptr [OOIM],00
  2050.  
  2051. MIM4:
  2052. cmp byte ptr [OOIM],00
  2053.  
  2054. MIM5:
  2055. cmp byte ptr [OOIM],00
  2056.  
  2057. MIM6:
  2058. cmp byte ptr [OOIM],00
  2059.  
  2060. MOPA:
  2061. // mov [ebp-08],ecx
  2062. // mov ecx,[ebp+0C]
  2063. db 89 4d f8 8b 4d 0c
  2064.  
  2065. MOAR:
  2066. // add ecx,esi
  2067. // add eax,ecx
  2068. // mov ecx,000003E8
  2069. db 03 ce 03 c1 b9 e8 03 00 00
  2070.  
  2071. MAR2:
  2072. // cmp eax,FFE76C8C
  2073. db 3d 8c 6c e7 ff
  2074.  
  2075. MOSM:
  2076. // mov ecx,[ecx+000000A8]
  2077. db 8b 89 a8 00 00 00
  2078.  
  2079. //=========================================
  2080. // Unregistering Symbols
  2081. unregistersymbol(MyCode)
  2082. unregistersymbol(iEnableMMR)
  2083. unregistersymbol(iEnableMSR)
  2084. unregistersymbol(iEnableMRP)
  2085. unregistersymbol(iEnableMTP)
  2086. unregistersymbol(iEnableMPP)
  2087. unregistersymbol(iEnableMCP)
  2088. unregistersymbol(iEnableMBP)
  2089. unregistersymbol(iEnableMPT)
  2090. unregistersymbol(iEnableGMD)
  2091. unregistersymbol(iEnableMFW)
  2092. unregistersymbol(iEnableMTM)
  2093. unregistersymbol(iEnableQRP)
  2094. unregistersymbol(iEnableMML)
  2095. unregistersymbol(iEnableMTF)
  2096. unregistersymbol(iEnableQCP)
  2097. unregistersymbol(iEnableMIM)
  2098. unregistersymbol(iEnableSPO)
  2099. unregistersymbol(iEnableRIU)
  2100. unregistersymbol(iEnableMBM)
  2101. unregistersymbol(iEnableMPA)
  2102. unregistersymbol(iEnableMAR)
  2103. unregistersymbol(iEnableIPR)
  2104. unregistersymbol(iEnableMCX)
  2105.  
  2106. unregistersymbol(iOwnerID)
  2107. unregistersymbol(iStatusID)
  2108. unregistersymbol(iResIndex)
  2109. unregistersymbol(iResMax)
  2110. unregistersymbol(iMinUnity)
  2111.  
  2112. unregistersymbol(pPlayer)
  2113. unregistersymbol(pRuler)
  2114. unregistersymbol(pChar)
  2115. unregistersymbol(pPlanet)
  2116. unregistersymbol(pShip)
  2117. unregistersymbol(pFleet)
  2118. unregistersymbol(pCommon)
  2119. unregistersymbol(pStatusInfo)
  2120. unregistersymbol(pTile)
  2121. unregistersymbol(pResInfo)
  2122. unregistersymbol(pTroop)
  2123. unregistersymbol(pMega)
  2124.  
  2125. //=========================================
  2126. dealloc(MyCode)
  2127. //============= Scripts End ===============
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement