ish12321 How do I cheat?
Reputation: 0
Joined: 17 Sep 2015 Posts: 1 Location: 12122222221
|
Posted: Thu Sep 17, 2015 6:38 am Post subject: NEED HELP IN LUA |
|
|
I am making a form using luascripting
im not new just learnt coding by seeing codes
i m sure error is in combobox 2 which i copied from combobox 1 to get listbox the codes there
THIS IS LUA SCRIPT WITH ERROR :::
----------------------------------------- VARIABLES -----------------------------------------
title="War Commander"
credits=" created by Ish Chhabra 09/14/2015"
white= "0x00F21200"
black1= "0x000000FF"
yellow2= "0x00000099"
white= "0x00FFFFFF"
red= "0x00000FFF"
green= "0x0000FF00"
pink= "0x00000000"
function setHack_Information()
t =
{
{'Instant Resources',
[[
LuaCall(Aobswap("D0 30 D1 D0 66 DD 0E 46 1F 00 0E 3A 00 00 60 5F 27 60 02 2D CD 5A 46 01 01 85 D1 A0 60 02 2D B5 2F 46 01 01 85 A0 D0 66 DD 0E 46 1F 00 A0 60 02","D0 30 47 D0 66 DD 0E 46 1F 00 0E 3A 00 00 60 5F 27 60 02 2D CD 5A 46 01 01 85 D1 A0 60 02 2D B5 2F 46 01 01 85 A0 D0 66 DD 0E 46 1F 00 A0 60 02"))
Luacall(Aobswap("D0 30 60 42 24 00 14 03 00 00 24 00 48 60 B3 04 60 42 46 CF 03 01 66 DE 29 73","D0 30 D0 25 B0 EA 01 48 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02"))
]],
[[Resource Pump never gets empty]]},
{'Instant Repair',
[[LuaCall(Aobswap("0F 14 00 00 D0 D0 66","0D 14 00 00 D0 D0 66"))]],
[[Repair units instantly]]},
{'Instant Mines',
[[
LuaCall(Aobswap("0D 12 00 00 5D 94 1C 60 B5 07 46 1F 00 24 01 C5","0F ?? ?? ?? ??"))
]],
[[Build and Upgrade mines instantly]]},
{'Instant Bunker Swap',
[[LuaCall(Aobswap("0D 05 00 00 D0 4F B9 37 00 47 00 00 C1 1B 03 01","0F ?? ?? ?? ??"))]],
[[Swap your bunker instantly]]},
{'Instant Building Upgrade',
[[LuaCall(Aobswap("0D 05 00 00 D0 4F 89 0F 00 10 4D 00 00 D0 66 FC","0F ?? ?? ?? ??"))]],
[[Upgrade your building with no time]]},
{'Instant Building Set',
[[LuaCall(Aobswap("0D 05 00 00 D0 4F AB 08 00 60 41 46 ED 03 00 11","0F ?? ?? ?? ??"))]],
[[Get any building on your base with no time]]},
{'Unit Upgrade 2 to 20',
[[LuaCall(Aobswap("D2 66 43 24 01 C5 61 43 60 A9 04 4F F7 10 00 5D 8E 15 D1 46 8E 15 01","?? ?? ?? ?? 13"))]],
[[Upgrade any unit to lvl 2 and it will be lvl 20]]},
{'Unit Upgrade Time Bypass',
[[LuaCall(Aobswap("63 06 62 05 62 06 14 2D 00 00 62 04 66 90 01 D1 0E","?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 0D"))
]],
[[Upgrade any unit with no time]]},
{'Missiles lvl 1 to lvl 11',
[[Luacall(Aobswap("D2 66 43 24 01 C5 61 43 60 A9 04 4F F7 10 00 5D 8E 15 D1 46 8E 15 01","?? ?? ?? ?? 0B"))
]],
[[Upgrade any missile to lvl 1 and it will be lvl 1]]},
{'Instant Unit Production',
[[
LuaCall(Aobswap("AE 2A 12 08 00 00 29 60 28 46 CD 2B 00 76 2A 12 46 00 00 29 D2 66 90 8B","B0 ?? ?? ?? ?? ??"))
]],
[[Build any unit with no time]]},
{'Turret Swap',
[[LuaCall(Aobswap("01 4F AE 2E 01 D0 66 96 31 D1 66 EC 0D 4F F9","?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 0F"))]],
[[Swap defense turrets with no time]]},
{'Turret Upgrade',
[[LuaCall(Aobswap("01 76 12 28 00 00 D2 66 8C 01 D1 0E 0E 00 00 D2 D2","?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 0D"))]],
[[Upgrade turret with no time]]},
{'Workhop 5k design',
[[LuaCall(Aobswap("61 ?? 2a 24 ?? 25 ?? ??","61 ?? 2a 24 ?? 25 88 27"))]],
[[Get capacity of each design in workshop to 5000]]},
{'Workshop Epic Tech',
[[LuaCall(Aobswap("D1 66 B1 35 12 02 00 00 26 48 D1 66 F6 27 60 F3 02 66 9F 2A","D1 66 ?? ?? 12 02 00 00 27 48 D1 66 ?? ?? 60 ?? ?? 66 ?? ??"))]],
[[Get all epich techs unlocked]]},
{'Workshop Red Tech',
[[LuaCall(Aobswap("60 AE 05 66 16 D0 66 CB 51 46 FA 2C 01 46 1F 00 4F","25 F9 02 02 02 02 02 02 02 02 02 02 02 02 02 02 4f"))]],
[[Get all epich techs unlocked with infinite amount]]},
{'Workshop Resources Bypass',
[[
LuaCall(Aobswap("60 A7 03 66 3F 65 01 6C 06 65 01 6C 05 65 01 6C 08 65 01 6C 09","60 A7 03 66 3F 65 01 6C 06 65 01 6C 05 65 01 6C 08 65 01 6C 08"))
Luacall(Aobswap("6D 06 60 A7 03 66 3F 65 01 6C 06 65 01 6C 05 65 01 6C 07 65 01 6C 08","6D 06 60 A7 03 66 3F 65 01 6C 06 65 01 6C 05 65 01 6C 07 65 01 6C 07"))
]],
[[Upgrade any workshop item and equip them without any resources]]},
{'Workshop Instant Research',
[[LuaCall(Aobswap("66 ?? ?? 46 1D 00 24 00 0D","66 ?? ?? 46 1D 00 24 00 0F"))]],
[[Research any workshop item without any time]]},
{'Gogobar Hack',
[[LuaCall(Aobswap("5F 2D 5F 5F 5F 2D 5F 5F 5F 02 72 45 0E 2D 2D 5F","?? ?? ?? ?? ?? ?? ?? ?? ?? 02 63 55 ?? ?? ?? ??"))]],
[[No Description Available]]},
{'Instant Building Repair',
[[LuaCall(Aobswap("5F 2D 2D 5F 2D 2D 2D 5F 2D 02 68 70 02 69 69 0F","?? ?? ?? ?? ?? ?? ?? ?? ?? 02 68 73 ?? ?? ?? ??"))]],
[[No Description Available]]}
}
end
-------------------------------------------------------AOBS of 2nd-----------------------------------------------------------------
function setHack_Information2()
a =
{
{'Gogobar Hack',
[[LuaCall(Aobswap("5F 2D 5F 5F 5F 2D 5F 5F 5F 02 72 45 0E 2D 2D 5F","?? ?? ?? ?? ?? ?? ?? ?? ?? 02 63 55 ?? ?? ?? ??"))]],
[[No Description Available]]},
{'Instant Building Repair',
[[LuaCall(Aobswap("5F 2D 2D 5F 2D 2D 2D 5F 2D 02 68 70 02 69 69 0F","?? ?? ?? ?? ?? ?? ?? ?? ?? 02 68 73 ?? ?? ?? ??"))]],
[[No Description Available]]}
}
end
----------------------------------------- MAIN GUI -----------------------------------------
MainGUI = {}
MainGUI[1] = createForm(false)
MainGUI[2] = createPanel(MainGUI[1])
MainGUI[4] = createLabel(MainGUI[2])
MainGUI[5] = createGroupBox(MainGUI[2])
MainGUI[6] = createLabel(MainGUI[5])
MainGUI[7] = createLabel(MainGUI[5])
MainGUI[8] = createLabel(MainGUI[2])
MainGUI[9] = createLabel(MainGUI[5])
MainGUI[10] = createComboBox(MainGUI[5])
MainGUI[11] = createGroupBox(MainGUI[2])
MainGUI[12] = createButton(MainGUI[5])
MainGUI[13] = createLabel(MainGUI[2])
MainGUI[14] = createLabel(MainGUI[11])
MainGUI[15] = createListBox(MainGUI[11])
MainGUI[16] = createButton(MainGUI[11])
MainGUI[17] = createButton(MainGUI[11])
MainGUI[18] = createLabel(MainGUI[11])
MainGUI[19] = createLabel(MainGUI[11])
MainGUI[23] = createButton(MainGUI[11])
MainGUI[25] = createListBox(MainGUI[11])
MainGUI[26] = createLabel(MainGUI[11])
MainGUI[27] = createLabel(MainGUI[11])
MainGUI[28] = createButton(MainGUI[11])
MainGUI[29] = createButton(MainGUI[11])
MainGUI[30] = createLabel(MainGUI[11])
MainGUI[31] = createLabel(MainGUI[11])
MainGUI[32] = createButton(MainGUI[11])
----------------------------------------- PROPERTIES -----------------------------------------
setProperty(MainGUI[1] , "color", red2)
setProperty(MainGUI[1] , "ShowInTaskBar", 'stAlways')
setProperty(MainGUI[1] , "Position", "poScreenCenter")
setProperty(MainGUI[1] , "BiDiMode", "bdLeftToRight")
setProperty(MainGUI[2] , "BiDiMode", "bdLeftToRight")
setProperty(MainGUI[2] , "BiDiMode", "bdLeftToRight")
setProperty(MainGUI[10] , "ReadOnly", "True")
FontHeight = getProperty(MainGUI[4] , "Font")
setProperty(FontHeight , "Style", "[fsBold, fsitalic]")
setProperty(FontHeight , "Height", "26")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[5] , "Font")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[8] , "Font")
setProperty(FontHeight , "Style", "[fsBold, fsitalic]")
setProperty(FontHeight , "Height", "26")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[9] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "16")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[10] , "Font")
setProperty(FontHeight , "Height", "18")
FontHeight = getProperty(MainGUI[12] , "Font")
setProperty(FontHeight , "Height", "13")
FontHeight = getProperty(MainGUI[13] , "Font")
setProperty(FontHeight , "Style", "[fsBold, fsitalic]")
setProperty(FontHeight , "Height", "16")
setProperty(FontHeight , "Color", white)
setProperty(MainGUI[13], "Cursor", "-21")
FontHeight = getProperty(MainGUI[14] , "Font")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[15] , "Font")
setProperty(FontHeight , "Height", "18")
FontHeight = getProperty(MainGUI[18] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[19] , "Font")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[25] , "Font")
setProperty(FontHeight , "Height", "18")
FontHeight = getProperty(MainGUI[26] , "Font")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[27] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
FontHeight = getProperty(MainGUI[31] , "Font")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
-----------------------------------------SIZE + POS -----------------------------------------
control_setSize(MainGUI[1], 807, 480)
x,y = control_getSize(MainGUI[1])
control_setSize(MainGUI[2], x,y)
control_setSize(MainGUI[5], 787, 129)
control_setSize(MainGUI[10], 645, 21)
control_setSize(MainGUI[11], 787, 230)
control_setSize(MainGUI[12], 107, 2
control_setSize(MainGUI[15], 255, 106)
control_setSize(MainGUI[16], 107, 26)
control_setSize(MainGUI[17], 107, 26)
control_setSize(MainGUI[23], 107, 26)
control_setPosition(MainGUI[4], 15, 10)
control_setPosition(MainGUI[5], 10, 35)
control_setPosition(MainGUI[6], 10, 5)
control_setPosition(MainGUI[8], 15, 175)
control_setPosition(MainGUI[9], 10, 75)
control_setPosition(MainGUI[10], 10, 35)
control_setPosition(MainGUI[11], 10, 205)
control_setPosition(MainGUI[12], 670, 35)
control_setPosition(MainGUI[13], 12, 460)
control_setPosition(MainGUI[14], 10, 5)
control_setPosition(MainGUI[15], 10, 35)
control_setPosition(MainGUI[16], 280, 35)
control_setPosition(MainGUI[17], 280, 76)
control_setPosition(MainGUI[18], 10, 155)
control_setPosition(MainGUI[19], 11, 180)
control_setPosition(MainGUI[23], 280, 116)
control_setSize(MainGUI[25], 255, 106)
control_setPosition(MainGUI[25], 400, 35)
control_setSize(MainGUI[28], 107, 26)
control_setSize(MainGUI[29], 107, 26)
control_setSize(MainGUI[30], 107, 26)
control_setSize(MainGUI[32], 107, 26)
control_setPosition(MainGUI[26], 400, 5)
control_setPosition(MainGUI[27], 400, 155)
control_setPosition(MainGUI[28], 670, 35)
control_setPosition(MainGUI[29], 670, 76)
control_setPosition(MainGUI[30], 400, 155)
control_setPosition(MainGUI[31], 401, 180)
control_setPosition(MainGUI[32], 670, 116)
----------------------------------------- CAPTION -----------------------------------------
control_setCaption(MainGUI[1], title.." Hacks By Ish Chhabra")
control_setCaption(MainGUI[4], title.." By Ish Chhabra")
control_setCaption(MainGUI[6], "Select your browser. Make sure the game is loaded.")
control_setCaption(MainGUI[8], "Available hacks for this game")
control_setCaption(MainGUI[9], "Attached to PID: waiting...")
control_setCaption(MainGUI[12], "Select")
control_setCaption(MainGUI[13], "v1.7.36097" ..credits)
control_setCaption(MainGUI[14], "Enable hacks 80%.")
control_setCaption(MainGUI[16], 'Enable selected')
control_setCaption(MainGUI[17], 'Enable all')
control_setCaption(MainGUI[18],"Description:")
control_setCaption(MainGUI[19],"no hack selected")
control_setCaption(MainGUI[23], 'Reset all')
control_setEnabled(MainGUI[16], false)
control_setEnabled(MainGUI[17], false)
control_setEnabled(MainGUI[23], false)
control_setEnabled(MainGUI[28], false)
control_setEnabled(MainGUI[29], false)
control_setEnabled(MainGUI[32], false)
control_setCaption(MainGUI[26], "Enable hacks at loading sector.")
control_setCaption(MainGUI[27],"Description:")
control_setCaption(MainGUI[29], 'Enable all')
control_setCaption(MainGUI[28], 'Enable selected')
control_setCaption(MainGUI[31],"no hack selected")
control_setCaption(MainGUI[32], 'Reset all')
----------------------------------------- PROGRESSBAR -----------------------------------------
MainGUI[20] = createProgressBar(MainGUI[11])
control_setPosition(MainGUI[20], 11, 180)
control_setSize(MainGUI[20], 255, 14)
control_setVisible(MainGUI[20], false)
MainGUI[21] = createLabel(MainGUI[11])
FontHeight = getProperty(MainGUI[21] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "18")
setProperty(FontHeight , "Color", white)
control_setPosition(MainGUI[21], 10, 155)
control_setVisible(MainGUI[21], false)
MainGUI[22] = createLabel(MainGUI[11])
FontHeight = getProperty(MainGUI[22] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "18")
control_setPosition(MainGUI[22], 10, 205)
control_setVisible(MainGUI[22], false)
----------------------------------------- COMBOBOX CONTENT -----------------------------------------
setHack_Information()
al = combobox_getItems(MainGUI[10])
strings_clear(al)
strings_add(al, 'Browser list...')
strings_add(al, 'Firefox')
strings_add(al, 'Google Chrome')
strings_add(al, 'Internex Explorer')
setProperty(MainGUI[10] , "ItemIndex", "0")
all_enabled = 0
success = 1
TeL = listbox_getItems(MainGUI[15])
TempSave = {}
strings_clear(TeL)
check = 0
i = 0
repeat
if t[i+1]==nil then
check = 1
else
i = i+1
strings_add(TeL, t[i][1])
TempSave[i] = {}
TempSave[i][1] = t[i][1]
TempSave[i][2] = t[i][2]
TempSave[i][3] = t[i][3]
TempSave[i][4] = 2
TempSave[i][5] = 0
check = 0
end
until check == 1
errorOnLookupFailure(false)
alreadycheckedPIDS={}
openNextProcTimer = createTimer(nil,false)
timer_setInterval(openNextProcTimer, 1000)
timer_onTimer(openNextProcTimer,
function(sender)
local tempPIDtable = getPids()
if #tempPIDtable == 0 then return end
timer_setEnabled(sender,false)
openProcess(tempPIDtable[1])
end)
-----------------------------------------------COMBO BOX2-----------------------------------------------------
setHack_Information2()
aeL = listbox_getItems(MainGUI[25])
TempSave = {}
strings_clear(aeL)
check = 0
i = 0
repeat
if a[i+1]==nil then
check = 1
else
i = i+1
strings_add(aeL, a[i][1])
TempSave[i] = {}
TempSave[i][1] = a[i][1]
TempSave[i][2] = a[i][2]
TempSave[i][3] = a[i][3]
TempSave[i][4] = 2
TempSave[i][5] = 0
check = 0
end
until check == 1
errorOnLookupFailure(false)
alreadycheckedPIDS={}
openNextProcTimer = createTimer(nil,false)
timer_setInterval(openNextProcTimer, 1000)
timer_onTimer(openNextProcTimer,
function(sender)
local tempPIDtable = getPids()
if #tempPIDtable == 0 then return end
timer_setEnabled(sender,false)
openProcess(tempPIDtable[1])
end)
----------------------------------------- CHECKPROCESS / PIDS -----------------------------------------
function checkProcessMajor()
reinitializeSymbolhandler()
if getAddress("pepflashplayer.dll")~=0 or getAddress("AdobeCPGetAPI") ~=0 then
return true
end
return false
end
function getPids()
local SL=createStringlist()
getProcesslist(SL)
local tempPIDtable={}
for i=0,strings_getCount(SL)-1 do
local entry = strings_getString(SL,i)
local processname = entry:sub(10,255)
local PID = tonumber('0x'..entry:sub(1, )
if processname == "chrome.exe" then
if alreadycheckedPIDS[PID]~=true then
table.insert(tempPIDtable,PID)
end
end
end
object_destroy(SL)
return tempPIDtable
end
function checkProcess(sender)
timer_setEnabled(sender,false)
alreadycheckedPIDS[getOpenedProcessID()]=true
if checkProcessMajor() then
timer_setEnabled(openNextProcTimer,false)
alreadycheckedPIDS={}
enableHacks()
else
timer_setEnabled(openNextProcTimer,true)
end
end
checkProcessTimer = createTimer(nil,false)
timer_setInterval(checkProcessTimer, 100)
timer_onTimer(checkProcessTimer, checkProcess)
function onOpenProcess()
if success == 1 then return end
timer_setEnabled(checkProcessTimer,true)
end
----------------------------------------- BROWSER SELECT -----------------------------------------
function scanBrowser()
AttachItems = combobox_getItems(MainGUI[10])
AttachIndex = combobox_getItemIndex(MainGUI[10])
control_setEnabled(MainGUI[16], false)
control_setEnabled(MainGUI[17], false)
control_setEnabled(MainGUI[23], false)
control_setEnabled(MainGUI[28], false)
control_setEnabled(MainGUI[29], false)
control_setEnabled(MainGUI[32], false)
local font = getProperty(MainGUI[9] , "Font")
setProperty(font, "Color", red)
control_setCaption(MainGUI[9], "Attached to PID: " .. "Scanning Process...")
processMessages()
if AttachIndex == -1 then return end
if AttachIndex == 0 then
control_setCaption(MainGUI[9], "Attached to PID: " .. "no Browser selected.")
return
end
local check = strings_getString(AttachItems,AttachIndex)
if check == 'Google Chrome' then
success = 0
local test = openProcess("chrome.exe")
if test == nil then
setProperty(font , "Color", white)
control_setCaption(MainGUI[9], "Attached to PID: " .. "Chrome not found.")
timer_setEnabled(openNextProcTimer,false)
return
end
strings_add(getAutoAttachList(),"chrome.exe")
timer_setEnabled(openNextProcTimer,true)
return
end
if check == 'Firefox' or check == 'Internet Explorer' then openProcess("FlashPlayerPlugin") end
errorOnLookupFailure(false)
reinitializeSymbolhandler()
err=getAddress("kernel32.dll")==0
if err==true then
setProperty(font , "Color", white)
control_setCaption(MainGUI[9], "Attached to PID: " .. "Flash player plugin not found")
else
local PID=getOpenedProcessID()
setProperty(font, "Color", white)
control_setCaption(MainGUI[9], "Attached to PID: " .. PID .. " - flash player plugin")
control_setEnabled(MainGUI[16], true)
control_setEnabled(MainGUI[17], true)
control_setEnabled(MainGUI[23], true)
control_setEnabled(MainGUI[28], true)
control_setEnabled(MainGUI[29], true)
control_setEnabled(MainGUI[32], true)
end
end
----------------------------------------- ENABLE HACKS -----------------------------------------
function enableHacks()
setProperty(getProperty(MainGUI[9] , "Font"), "Color", white)
local PID=getOpenedProcessID()
local check = strings_getString(AttachItems,AttachIndex)
if check == 'Firefox' or check == 'Internet Explorer' then
control_setCaption(MainGUI[9], "Attached to PID: " .. PID .. " - flash player plugin")
elseif check == 'Google Chrome' then
control_setCaption(MainGUI[9], "Attached to PID: " .. PID .. " - chrome.exe")
end
success = 1
control_setEnabled(MainGUI[16], true)
control_setEnabled(MainGUI[17], true)
control_setEnabled(MainGUI[23], true)
control_setEnabled(MainGUI[28], true)
control_setEnabled(MainGUI[29], true)
control_setEnabled(MainGUI[32], true)
end
----------------------------------------- PROGRESS BAR -----------------------------------------
function show_progressbar()
control_setPosition(MainGUI[22], 10, 205)
control_setCaption(MainGUI[22], '')
control_setVisible(MainGUI[18], false)
control_setVisible(MainGUI[19], false)
control_setVisible(MainGUI[20], true)
control_setVisible(MainGUI[21], true)
control_setVisible(MainGUI[22], true)
progressbar_setPosition(MainGUI[20], 0)
end
function hide_progressbar()
control_setVisible(MainGUI[20], false)
control_setVisible(MainGUI[21], false)
control_setVisible(MainGUI[22], false)
control_setVisible(MainGUI[18], true)
control_setVisible(MainGUI[19], true)
end
----------------------------------------- EXECUTE HACKS -----------------------------------------
function ExecuteHacks()
HLS = listbox_getItemIndex(MainGUI[15])
LIST = listbox_getItems(MainGUI[15])
if HLS == -1 then return end
i = HLS+1
font=getProperty(MainGUI[21], 'Font')
control_setVisible(MainGUI[18], false)
control_setVisible(MainGUI[19], false)
control_setVisible(MainGUI[20], false)
control_setVisible(MainGUI[21], true)
control_setVisible(MainGUI[22], false)
if t[i][2]==nil then
setProperty(font, 'Color', white)
control_setCaption(MainGUI[21], "You already enabled this hack !")
return
end
control_setEnabled(MainGUI[16], false)
control_setEnabled(MainGUI[17], false)
control_setEnabled(MainGUI[23], false)
control_setCaption(MainGUI[21], "Executing hack...")
control_setVisible(MainGUI[22], true)
control_setCaption(MainGUI[22], '')
control_setPosition(MainGUI[22], 10, 185)
strings_setString(LIST, HLS, t[i][1])
processMessages()
if TempSave[i][4] == 2 then
Asm = autoAssemble(t[i][2])
font=getProperty(MainGUI[22], 'Font')
control_setCaption(MainGUI[21], "Executing hack. Finished.")
if AobSwapCheck~=true then
TempText = t[i][1]..' - Failed'
TempSave[i][5] = t[i][1]..' - Failed'
strings_setString(LIST, HLS, TempText)
setProperty(font, 'Color', red1)
control_setCaption(MainGUI[22], 'Failed to enable !\nHack already enabled or game was updated.')
else
TempText = t[i][1]..' - Enabled'
TempSave[i][5] = t[i][1]..' - Enabled'
strings_setString(LIST, HLS, TempText)
setProperty(font, 'Color', white)
control_setCaption(MainGUI[22], 'Hack enabled. Enjoy it !')
t[i][2] = nil
TempSave[i][4] = 1
end
end
if TempSave[i][4] == 0 then TempSave[i][4] = 2 end
control_setEnabled(MainGUI[16], true)
control_setEnabled(MainGUI[17], true)
control_setEnabled(MainGUI[23], true)
end
--------------------------------------- EXECUTE HACKS 2-----------------------------------------
function ExecuteHacks2()
HLS = listbox_getItemIndex(MainGUI[25])
LIST = listbox_getItems(MainGUI[25])
if HLS == -1 then return end
x = HLS+1
font=getProperty(MainGUI[21], 'Font')
control_setVisible(MainGUI[18], false)
control_setVisible(MainGUI[19], false)
control_setVisible(MainGUI[20], false)
control_setVisible(MainGUI[21], true)
control_setVisible(MainGUI[22], false)
if a[x][2]==nil then
setProperty(font, 'Color', white)
control_setCaption(MainGUI[21], "You already enabled this hack !")
return
end
control_setEnabled(MainGUI[28], false)
control_setEnabled(MainGUI[29], false)
control_setEnabled(MainGUI[32], false)
control_setCaption(MainGUI[21], "Executing hack...")
control_setVisible(MainGUI[22], true)
control_setCaption(MainGUI[22], '')
control_setPosition(MainGUI[22], 10, 185)
strings_setString(LIST, HLS, a[x][1])
processMessages()
if TempSave[x][4] == 2 then
Asm = autoAssemble(a[x][2])
font=getProperty(MainGUI[22], 'Font')
control_setCaption(MainGUI[21], "Executing hack. Finished.")
if AobSwapCheck~=true then
TempText = a[x][1]..' - Failed'
TempSave[x][5] = a[x][1]..' - Failed'
strings_setString(LIST, HLS, TempText)
setProperty(font, 'Color', red)
control_setCaption(MainGUI[22], 'Failed to enable !\nHack already enabled or game was updated.')
else
TempText = a[x][1]..' - Enabled'
TempSave[x][5] = a[x][1]..' - Enabled'
strings_setString(LIST, HLS, TempText)
setProperty(font, 'Color', white)
control_setCaption(MainGUI[22], 'Hack enabled. Enjoy it !')
a[x][2] = nil
TempSave[x][4] = 1
end
end
if TempSave[x][4] == 0 then TempSave[x][4] = 2 end
control_setEnabled(MainGUI[28], true)
control_setEnabled(MainGUI[29], true)
control_setEnabled(MainGUI[32], true)
end
----------------------------------------- EXECUTE ALL HACKS -----------------------------------------
function ExecuteAllHacks()
font=getProperty(MainGUI[21], 'Font')
if all_enabled == 1 then
control_setVisible(MainGUI[18], false)
control_setVisible(MainGUI[19], false)
control_setVisible(MainGUI[20], false)
control_setVisible(MainGUI[21], true)
control_setVisible(MainGUI[22], false)
setProperty(font, 'Color', white)
control_setCaption(MainGUI[21], "You allready enabled all hacks !")
return
end
lb = listbox_getItems(MainGUI[15])
LIST = listbox_getItems(MainGUI[15])
control_setEnabled(MainGUI[16], false)
control_setEnabled(MainGUI[17], false)
control_setEnabled(MainGUI[23], false)
show_progressbar()
progressbar_setMax(MainGUI[20], strings_getCount(lb))
for i = 1, strings_getCount(lb) do
strings_setString(LIST, i-1, t[i][1])
end
count = 0
for i = 1, strings_getCount(lb) do
control_setCaption(MainGUI[21], "Executing hack: "..t[i][1])
progressbar_setPosition(MainGUI[20], i)
processMessages()
if TempSave[i][4] == 2 then
Asm = autoAssemble(t[i][2])
if AobSwapCheck~=true then
TempSave[i][5] = t[i][1]..' - Failed'
strings_setString(LIST, i-1, TempSave[i][5])
else
TempSave[i][5] = t[i][1]..' - Enabled'
strings_setString(LIST, i-1, TempSave[i][5])
t[i][2] = nil
TempSave[i][4] = 1
count = count + 1
end
else
count = count + 1
TempSave[i][5] = t[i][1]..' - Enabled'
strings_setString(LIST, i-1, TempSave[i][5])
end
if TempSave[i][4] == 0 then TempSave[i][4] = 2 end
end
control_setEnabled(MainGUI[16], true)
control_setEnabled(MainGUI[17], true)
control_setEnabled(MainGUI[23], true)
control_setCaption(MainGUI[21], "Executing hack. Finished ! ")
font=getProperty(MainGUI[22], 'Font')
if count == strings_getCount(lb) then
setProperty(font, 'Color', white)
control_setCaption(MainGUI[22], 'All hacks enabled. Enjoy it !')
all_enabled = 1
else
diff = strings_getCount(lb) - count
if diff == 1 then
text = "hack"
else
text = "hacks"
end
setProperty(font, 'Color', red1)
control_setCaption(MainGUI[22], 'Failed to enable ' .. diff .. ' ' .. text .. ' !')
end
end
----------------------------------------- RESET HACKS -----------------------------------------
function ResetAllHacks()
lb = listbox_getItems(MainGUI[15])
ct = strings_getCount(lb)
for i = 1, ct do
strings_setString(lb, i-1, t[i][1])
TempSave[i][4] = 2
t[i][2]= TempSave[i][2]
end
all_enabled = 0
hide_progressbar()
control_setVisible(MainGUI[19], false)
control_setCaption(MainGUI[18], 'All hacks reseted.')
end
----------------------------------------- AOB SWAP -----------------------------------------
function DEC_HEX(IN)
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
if IN<1 then
OUT=0
return OUT
end
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),math.mod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
function Aobswap(search, change)
aobs = AOBScan(search, "+W")
if(aobs == nil) then
AobSwapCheck=false
else
j = stringlist_getCount(aobs)
for i = 1, j do
address=stringlist_getString(aobs,i-1)
for i = 1, string.len(change), 3 do
z = string.sub(change, i, i+2)
x, y = string.find(z, "%?+")
if (x == nil) then
script=[[
]]..address.."+"..(DEC_HEX((i-1)/3))..[[:
db ]]..z..[[
]]
autoAssemble(script)
end
end
end
object_destroy(aobs);
aobs=nil
AobSwapCheck=true
end
end
----------------------------------------- HACK DESCRIPTION -----------------------------------------
function HackDescriptionsChange()
hide_progressbar()
control_setCaption(MainGUI[18], 'Description:')
HLS = listbox_getItemIndex(MainGUI[15])
if HLS == -1 then return end
i = HLS+1
if t[i][3]~='' and t[i][3]~=nil then
control_setCaption(MainGUI[19] ,t[i][3])
else
control_setCaption(MainGUI[19], "no description available.")
end
end
----------------------------------------- ONCLICK EVENTS -----------------------------------------
control_onClick(MainGUI[12], scanBrowser)
control_onClick(MainGUI[13], OpenKonghack)
control_onClick(MainGUI[16], ExecuteHacks)
control_onClick(MainGUI[28], ExecuteHacks2)
control_onClick(MainGUI[17], ExecuteAllHacks)
control_onClick(MainGUI[23], ResetAllHacks)
setMethodProperty(MainGUI[15], 'OnSelectionChange', HackDescriptionsChange)
form_onClose(MainGUI[1], CloseTrainer)
form_show(MainGUI[1])
|
|