#1
|
|||
|
|||
Stronghold3 Trainer source code (by sicheats) Added god mode
This is the source code for the sicheats trainer, to run is necesary a dll included in the download rar. source of dll is not need, only loads a lua script and handle the onKeyDown function.
EDITED: added resources option. Fixed: environment script execution fixed in the dll. link to dll http://www.megaupload.com/?d=UO8TMT05 Code:
--StrongHold3 trainer by cocodrilo. --can you make your own options. -- www.sicheats.com function getLocalPlayer() local e = { GameLib.GetEstates() } for n,tmp in ipairs(e) do if tmp and tmp:GetPlayer():IsHumanControlled() then return tmp end end return nil end function addGold(gValue) local miPlayer = getLocalPlayer() if miPlayer~=nil then miPlayer.m_gameState.iGold = miPlayer.m_gameState.iGold + gValue end end function addHonour(hValue) local miPlayer = getLocalPlayer() if miPlayer~=nil then miPlayer.m_gameState.iHonour = miPlayer.m_gameState.iHonour + hValue end end function addResources(rValue) local miPlayer = getLocalPlayer() if miPlayer~=nil then for i=1,31 do miPlayer.m_gameState.hResources[i] = Inc(miPlayer.m_gameState.hResources[i],rValue) end end end function Inc(a,b) return a+b end --Hooked Damage function. simply return, not call the original. function miDamage() return end function setGodMode() local ent = GameLib.GetEntityUnderMouse() if ent~=nil then ent.Damage = miDamage end end function onKeyDown(key) if key==112 then --F1: add gold addGold(5000) elseif key==113 then --F2: add honour addHonour(1000) elseif key==114 then --F3: no build costs Game.Options.Cheats.bNoBuildCosts = true elseif key==115 then --F4: add resources addResources(1000) elseif key == 116 then -- F5: add god mode to selected unit setGodMode() end end Last edited by cocodrilo; 28-10-2011 at 17:25. |
Sponsored Links |
#2
|
|||
|
|||
How do you run the dll though?
I saw your trainer also on sicheats but its down at the moment. |
#3
|
|||
|
|||
winject or another injector.
|
#4
|
|||
|
|||
Thanks man. I got it working. Nice trainer.
|
#5
|
|||
|
|||
Huh not really a source, the title is misguiding. It is just your dll that people have to manually inject themselves instead of using your main trainer gui (which might be good, peeps don't have to go through the drm stuff)
The lua script is even using custom key codes for hotkeys, you should mention all the key codes so at least users can change the hotkeys. This might help. http://en.wikipedia.org/wiki/Source_code
__________________
DEViATED - We are seriously iNSANE! |
#6
|
|||
|
|||
Quote:
¿what is my GUI? I don't have a GUI. there are a lot of injectors ¿I need to write another?. Quote:
if this is not the source code ¿what is it?. the dll only calls to lua_loadfile and lua_pcall to load this source code in game. and have a custom windowproc to handle keys in lua script ¿is this interestings?. |
#7
|
|||
|
|||
I was talking about the addresses since that included would make a complete source. And the hotkeys, yeah they are virtual keycodes actually but in decimel. I thought they were your customs ones since MSDN etc brings hex codes and i was thinking in hex.
Anyway, yeah its pretty customizable so i guess it counts as a source.
__________________
DEViATED - We are seriously iNSANE! |
#8
|
|||
|
|||
Quote:
this game uses lua from a dll, not is statically linked. I using GetProcAddress to get functions from lua. in statically linked versions is need to find a pattern (per function), but isn't this case. |
#9
|
|||
|
|||
plz can anybody reupload the dll ?!
|
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Announcement and final word on the CheatHappens vs. h4x0r trainer war | Joe Forster/STA | Game Trainers | 7 | 12-07-2010 08:31 |
trainer and source code... | pikachu5501 | Game Coders | 2 | 14-05-2007 23:18 |