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Si6+1XrMUJ+?om*#QXZ}24BS/_n-pUs2Fc}BniJ)^AT.CwYw((P[/Gy/Hr%X9n3#s07Lr3JHUZ53eG@wcE_)tw$Hh/nR@VbC(b1=cN}Dri1bu4S(q1VyLjYE/2?NKauO+L8Y:^DE0k@[$AUqJ,@gQnp}8J,hFC/9,$#vTdo}^^</UDF2>
  </Forms>
  <CheatEntries/>
  <UserdefinedSymbols/>
  <LuaScript>form_show(UDF1)
form_hide(UDF2)
function CloseGenerator()
	closeCE()
end
setProperty(UDF1 , "Position", "poScreenCenter")
setProperty(UDF1 , "Borderstyle", "bsToolWindow")
setProperty(UDF1 , "BorderIcons", "[biSystemMenu]")
setProperty(UDF1 , "BiDiMode", "bdLeftToRight")
showMessage=nil

function showMessage(...)
	messageDialog(..., mtInformation, mbOK)
end

function EnablingDisabling()
	local disable = combobox_getItemIndex(UDF1_CEComboBox1)
	if disable == 0 then
		control_setEnabled(UDF1_CEMemo4, true)
		control_setEnabled(UDF1_CEMemo5, true)
	else
		control_setCaption(UDF1_CEMemo4, '')
		control_setCaption(UDF1_CEMemo5, '')
		control_setEnabled(UDF1_CEMemo4, false)
		control_setEnabled(UDF1_CEMemo5, false)
	end
end

function ClearEverything()
	TempI=nil
	control_setCaption(UDF1_CEEdit6, '')
	control_setCaption(UDF1_CEMemo1, '')
	control_setCaption(UDF1_CEMemo2, '')
	control_setCaption(UDF1_CEMemo3, '')
	control_setCaption(UDF1_CEMemo4, '')
	control_setCaption(UDF1_CEMemo5, '')
end

function SaveTrainerAppearance()
	TrainerName = "self.trainer.form.Caption = [["..(control_getCaption(UDF1_CEEdit1)).."]]"
	GameHackName = "self.trainer.title.Caption = [["..(control_getCaption(UDF1_CEEdit2)).."]]"
	CreditHackName = "self.trainer.credits.Caption = [[ Hack was made by "..(control_getCaption(UDF1_CEEdit3)).."]]"
end

HackTable={}
function SaveHack(Id, Name, Desc, OnScript, OnMsg, YesOrNo, OffScript, OffMsg)
	if OffScript=='' then OffMsg=nil end
	if OffMsg=='' then OffMsg=nil end
	HackTable[Id]= {Name, Desc, OnScript, OnMsg, YesOrNo, OffScript, OffMsg}
end

function AddEntry() -- hack entry.. this calls teh function above, and creates a table with all created hacks
	i = listbox_getItems( UDF1_CEListBox1 )
	i = strings_getCount(i)
	local Items = combobox_getItemIndex(UDF1_CEComboBox1)
	if Items==0 then Items="true" else Items="false" end
	local a = control_getCaption(UDF1_CEEdit6)
	local b = strings_getText(memo_getLines(UDF1_CEMemo1))
	local c = strings_getText(memo_getLines(UDF1_CEMemo2))
	local d = strings_getText(memo_getLines(UDF1_CEMemo3))
	local e = Items
	local f = strings_getText(memo_getLines(UDF1_CEMemo4))
	local g = strings_getText(memo_getLines(UDF1_CEMemo5))
	if TempI~=nil then
		i=TempI
		TempI=nil
	end
	SaveHack(i,a,b,c,d,e,f,g)
	ClearEverything()
	local HackList = listbox_getItems(UDF1_CEListBox1)
	strings_add(HackList, "Hack name : "..a)
	showMessage("Hack Entry has done!")
end

function EditEntry() -- edits.. this pretty pain in the ass and confusing..
	if TempI~=nil and ID~=-1 then return messageDialog("Please finish the current entry edit", mtInformation, mbOK) end
	if HackTable[ID]==nil and ID~=-1 then
		local HackList = listbox_getItems(UDF1_CEListBox1)
		strings_delete(HackList, ID)
	else
		ClearEverything()
		if ID==-1 then return end
		control_setCaption(UDF1_CEEdit6, HackTable[ID][1])
		control_setCaption(UDF1_CEMemo1, HackTable[ID][2])
		control_setCaption(UDF1_CEMemo2, HackTable[ID][3])
		control_setCaption(UDF1_CEMemo3, HackTable[ID][4])
		control_setCaption(UDF1_CEComboBox1, HackTable[ID][5])
		control_setCaption(UDF1_CEMemo4, HackTable[ID][6])
		control_setCaption(UDF1_CEMemo5, HackTable[ID][7])
		TempI = ID
		local HackList = listbox_getItems(UDF1_CEListBox1)
		strings_delete(HackList, ID)
		HackTable[ID] = nil
	end
end

function DeleteEntry()
	CEListBox1SelectionChange()
	if ID&lt;0 then return end
	local HackList = listbox_getItems(UDF1_CEListBox1)
	strings_delete(HackList, ID)
	HackTable[ID] = nil
end

function CEListBox1SelectionChange()
	ID = listbox_getItemIndex(UDF1_CEListBox1)
end

function GetScriptsAndAppend() -- creates the table text.. pretty easy..
	AnotherTempTeb = {}
	In = 0
	for y in pairs( HackTable ) do
		In = In+1
	end
	In=In-1
	for x=0,In do
		if HackTable[x][7]==nil then HackTable[x][7]='' end
		if x==In then
			if HackTable[x]==nil then
			else
				if HackTable[x][5]=="true" then
					AnotherTempTeb[x] = "{'"..HackTable[x][1].."',[["..HackTable[x][2].."]],[["..HackTable[x][3].."]],[["..HackTable[x][4].."]], '"..HackTable[x][5].."',[["..HackTable[x][6].."]],[["..HackTable[x][7].."]]}"
					memo_append(gc[4], AnotherTempTeb[x])
				else
					AnotherTempTeb[x] = "{'"..HackTable[x][1].."',[["..HackTable[x][2].."]],[["..HackTable[x][3].."]],[["..HackTable[x][4].."]], '"..HackTable[x][5].."'}"
					memo_append(gc[4], AnotherTempTeb[x])
				end
			end
		else
			if HackTable[x]==nil then
			else
				if HackTable[x][5]=="true" then
					AnotherTempTeb[x] = "{'"..HackTable[x][1].."',[["..HackTable[x][2].."]],[["..HackTable[x][3].."]],[["..HackTable[x][4].."]], '"..HackTable[x][5].."',[["..HackTable[x][6].."]],[["..HackTable[x][7].."]]},\n"
					memo_append(gc[4], AnotherTempTeb[x])
					memo_append(gc[4], "")
				else
					AnotherTempTeb[x] = "{'"..HackTable[x][1].."',[["..HackTable[x][2].."]],[["..HackTable[x][3].."]],[["..HackTable[x][4].."]], '"..HackTable[x][5].."'},"
					memo_append(gc[4], AnotherTempTeb[x])
					memo_append(gc[4], "")
				end
			end
		end
	end
-- this the trainer window creating..
  StringTable = [[
						};
	for i=1,#self.hacktable do
		strings_add(self.listitems, self.hacktable[i][1]);
		self.hackstatus[i] = false;
	end
end
function HackData:Info()
	self.activateall = false; -- State.
	self.hackstatus = {};
	self.trainer = {};
	self.trainer.form = createForm(false);
	self.trainer.form.onClose = function (sender) sender.hide(); closeCE(); end;
	self.trainer.form.width = 400;
	self.trainer.form.height = 300;
	setProperty(self.trainer.form, 'Position', 'poScreenCenter');
	setProperty(self.trainer.form, 'BorderIcons', '[biSystemMenu]');
	setProperty(self.trainer.form, 'BiDiMode', 'bdLeftToRight');
	self.trainer.credits = createLabel(self.trainer.form);
	self.trainer.title = createLabel(self.trainer.form);
	local FontHeight = getProperty(self.trainer.title, 'Font');
	setProperty(FontHeight , 'Color', 0x000000FE);
	setProperty(FontHeight , 'Style', '[fsBold]');
	setProperty(FontHeight , 'Height', '20');
	self.trainer.group = createGroupBox(self.trainer.form);
	self.trainer.subtitle = createLabel(self.trainer.group);
	local FontHeight = getProperty(self.trainer.subtitle, 'Font');
	setProperty(FontHeight , 'Color', 0x00007F00);
	setProperty(FontHeight , 'Style', '[fsBold]');
	setProperty(FontHeight , 'Height', '16');
	self.trainer.desctitle = createLabel(self.trainer.group);
	local FontHeight = getProperty(self.trainer.desctitle, 'Font');
	setProperty(FontHeight , 'Color', 0x00F21200);
	self.trainer.desc = createLabel(self.trainer.group);
	self.trainer.list = createListBox(self.trainer.group);
	self.trainer.enable = createButton(self.trainer.group);
	self.trainer.enableall = createButton(self.trainer.group);
	local x,y = control_getSize(self.trainer.form);
	self.trainer.credits.left = 5;
	self.trainer.credits.top = y - 17;
	self.trainer.title.left = 10;
	self.trainer.title.top = 2.5;
	self.trainer.group.width = math.floor(x * 0.965);
	self.trainer.group.height = math.floor(y * 0.85);
	self.trainer.group.left = 5;
	self.trainer.group.top = math.floor((y * 1.095) - y);
	self.trainer.group.caption = 'Hacks';
	self.trainer.subtitle.left = 5;
	self.trainer.subtitle.top = 0;
	self.trainer.subtitle.caption = 'Select an hack from the list, then press enable!';
	local x,y = control_getSize(self.trainer.group);
	self.trainer.list.width = math.floor((x * 0.75) - 6);
	self.trainer.list.height = 64;
	self.trainer.list.left = 5;
	self.trainer.list.top = 20;
	local x,y = control_getSize(self.trainer.list);
	self.trainer.enable.width = math.floor((x * 0.34)-6);
	self.trainer.enable.height = 32;
	self.trainer.enable.left = x + 6;
	self.trainer.enable.top = 19;
	self.trainer.enable.caption = 'Enable';
	self.trainer.enable.onClick = function (sender) self:ActivateHack(sender) end;
	self.trainer.enableall.width = math.floor((x * 0.34)-6);
	self.trainer.enableall.height = 32;
	self.trainer.enableall.left = x + 6;
	self.trainer.enableall.top = 53;
	self.trainer.enableall.caption = 'Enable all';
	self.trainer.enableall.onClick = function (sender) self:ActivateAllHacks(sender) end;
	self.trainer.desctitle.left = 5;
	self.trainer.desctitle.top = y + 20;
	self.trainer.desctitle.caption = 'Selected hack description :';
	self.trainer.desc.left = 5;
	self.trainer.desc.top = y + 35;
	self.trainer.desc.caption = 'No hack was selected...';
	self.listitems = self.trainer.list.getItems();
	HackData:HacksData();
	setMethodProperty(self.trainer.list, 'OnSelectionChange', function () HackData:ChangeDesc() end)
	self.trainer.form.show();
end

function HackData:ActivateAllHacks(sender)
	self.activateall = true;
	for i = 0, #self.hacktable do
		i = i-1
		self.trainer.list.ItemIndex = i
		HackData:ActivateHack()
	end
	self.activateall = false;
end

function HackData:ActivateHack(sender)
	self.listitems = self.trainer.list.getItems();
	local index = self.trainer.list.ItemIndex + 1;
	if (index == 0 or self.hacktable[index] == nil) then
		return;
	end
	if (self.hackstatus[index] == false) then
		if (type(self.hacktable[index][2])=='string') then
			local asm = autoAssemble(self.hacktable[index][2]);
			if (asm == true) then
				if (AobSwapCheck~=true and AobSwapCheck~=nil) then
					AobSwapCheck=nil;
					if self.activateall == false then
						return showMessage('Hack failed to enable!');
					else
						return
					end
				end
				AobSwapCheck=nil;
				if self.activateall == false then
					if (self.hacktable[index][4]~='' and self.hacktable[index][4]~= nil) then
						showMessage(self.hacktable[index][4]);
					else
						showMessage('Hack was enabled successfully!');
					end
				end
				local str = strings_getString(self.listitems, index - 1);
				strings_setString( self.listitems, index - 1, str .. ' - Enabled!' );
				self.hackstatus[index] = true;
				HackData:ChangeDesc()
			else
				if self.activateall == false then
					return showMessage('Hack failed to enable!');
				else
					return
				end
			end
		end
	elseif (self.hackstatus[index] == true and (self.hacktable[index][5] == true or self.hacktable[index][5] == 'true') and self.activateall == false) then
		if (type(self.hacktable[index][6])=='string') then
			local asm = autoAssemble(self.hacktable[index][6]);
			if (asm == true) then
				if (AobSwapCheck~=true and AobSwapCheck~=nil) then
					AobSwapCheck=nil;
					return showMessage('Hack failed to enable!');
				end
				AobSwapCheck=nil;
				if (self.hacktable[index][7]~='' and self.hacktable[index][7]~= nil) then
					showMessage(self.hacktable[index][7]);
				else
					showMessage('Hack was disabled successfully!');
				end
				strings_setString( self.listitems, index - 1, self.hacktable[index][1] );
				self.hackstatus[index] = false;
			else
				return showMessage('Hack failed to disable!');
			end
		end
	end
	HackData:ChangeDesc();
end
function HackData:ChangeDesc(sender)
	local index = self.trainer.list.ItemIndex + 1
	if (index == 0 or self.hacktable[index] == nil) then
		return
	end
	if (self.hacktable[index][3] ~= '' and self.hacktable[index][3] ~= nil) then
		self.trainer.desc.caption = self.hacktable[index][3];
	else
		self.trainer.desc.caption = "There's no descriptions available about this hack";
	end

	if (self.hackstatus[index] == true and (self.hacktable[index][5] == false or self.hacktable[index][5] == 'false')) then
		self.trainer.enableall.Enabled = false;
		self.trainer.enable.Enabled = false;
	elseif (self.hackstatus[index] == true and (self.hacktable[index][5] == true or self.hacktable[index][5] == 'true')) then
		self.trainer.enableall.Enabled = false;
		self.trainer.enable.Enabled = true;
		self.trainer.enable.Caption = 'Disable';
	else
		self.trainer.enableall.Enabled = true;
		self.trainer.enable.Enabled = true;
		self.trainer.enable.Caption = 'Enable';
	end
end
HackData:Info()]]

  for line in string.gfind (StringTable,"[^\n]+") do
    memo_append(gc[4], line)
  end
if ((strings_getCount(listbox_getItems( UDF2_CEListBox1 ))~=0) or (checkbox_getState(UDF2_CECheckbox1)==1)) or autoattachto~=nil then
    memo_append(gc[4], "end")
end
end

function GenerateForm()
  gc = {}
  gc[1] = createForm()
  gc[2] = createPanel(gc[1])
  gc[3] = createLabel(gc[2])
  gc[4] = createMemo(gc[2])
  gc[5] = createButton(gc[2])
  gc[6] = createLabel(gc[2])
  setProperty(gc[1] , "Borderstyle", "bsToolWindow")
  setProperty(gc[1] , "BorderIcons", "[biSystemMenu]")
  setProperty(gc[1] , "BiDiMode", "bdLeftToRight")
  setProperty(gc[2] , "BiDiMode", "bdLeftToRight")
  setProperty(gc[4] , "ScrollBars", "ssAutoBoth")
  setProperty(gc[4] , "ReadOnly", "True")
  setProperty(gc[1] , "Position", "poScreenCenter")
  memo_setWordWrap(gc[4], false)
  memo_setWantTabs(gc[4], true)
  memo_getWantReturns(gc[4],true)
  memo_getScrollbars(gc[4],ssBoth)
  setProperty(gc[1] , "ShowInTaskBar", "stAlways")

  control_setCaption(gc[1], "Script Result")
  control_setSize(gc[4], 290, 300)
  control_setSize(gc[1], 300,400)
  x,y = control_getSize(gc[1])
  control_setSize(gc[2],x,y)
  control_setCaption(gc[3], "Generated script")
  X,Y = control_getSize(gc[3])
  X,Y = (x-X)/2, Y
  control_setPosition(gc[3],X,Y)
  control_setCaption(gc[6], "Please copy-paste the script,\nPut it in CE Lua Windown and Generate a Trainer")
  X,Y = control_getSize(gc[6])
  X,Y = (x-X)/2, Y
  control_setPosition(gc[6],X,y-55)
  control_setCaption(gc[5], "Close")
  control_setSize(gc[5], 50,20)
  X,Y = control_getSize(gc[5])
  X,Y = (x-X)/2, Y
  control_setPosition(gc[5],X,y-24)
  control_setPosition(gc[4],5,35)

  function HideGC()
    form_hide(gc[1])
  end
  control_onClick(gc[5],HideGC)
end

function GenerateTrainer()
	if CheckIfAdded == 0 then
		NoAttach = messageDialog("Hey it seems like you didn't add any attach method!\nWould you like to add it now?", mtInformation, mbYes, mbNo)
		if NoAttach==mrYes then return showAttach() end
	end
	GenerateForm()
	sleep(500)
	if TrainerName==nil then TrainerName ="self.trainer.form.Caption = [[Unnamed Trainer]]" end
	if GameHackName==nil then GameHackName ="self.trainer.title.Caption = [[Unknown game Trainer]]" end
	if CreditHackName==nil then CreditHackName ="self.trainer.credits.Caption = [[Hack was made by Unknown author Trainer]]" end
	if ((strings_getCount(listbox_getItems( UDF2_CEListBox1 ))~=0) or (checkbox_getState(UDF2_CECheckbox1)==1)) or autoattachto~=nil then
		The_Text=[[function CreateTrainer()
	local HackData = {};
	function HackData:HacksData()

		]]..TrainerName..[[

		]]..GameHackName..[[

		]]..CreditHackName..[[

		self.hacktable = 	{
		]]
	else
		The_Text=[[
local HackData = {};
function HackData:HacksData()

	]]..TrainerName..[[

	]]..GameHackName..[[

	]]..CreditHackName..[[

	self.hacktable = 	{
	]]
end
  control_setCaption(gc[4], The_Text)
  GetScriptsAndAppend()
if checkbox_getState(UDF1_CECheckbox1)==1 then
  StringTable      = {}
  StringTable[0]   = 'function DEC_HEX(IN)'
  StringTable[1]   = 'local B,K,OUT,I,D=16,"0123456789ABCDEF","",0'
  StringTable[2]   = '   if IN&lt;1 then'
  StringTable[3]   = '  OUT=0'
  StringTable[4]   = '  return OUT'
  StringTable[5]   = '   end'
  StringTable[6]   = 'while IN&gt;0 do'
  StringTable[7]   = 'I=I+1'
  StringTable[8]   = 'IN,D=math.floor(IN/B),math.mod(IN,B)+1'
  StringTable[9]   = 'OUT=string.sub(K,D,D)..OUT'
  StringTable[10]  = 'end'
  StringTable[11]  = 'return OUT'
  StringTable[12]  = 'end'
  StringTable[13]  = 'function Aobswap(search, change)'
  StringTable[14]  = '   aobs = AOBScan(search)'
  StringTable[15]  = '   if(aobs ~= nil) then'
  StringTable[16]  = '   j = stringlist_getCount(aobs)'
  StringTable[17]  = '   for i = 1, j do'
  StringTable[18]  = '   address=stringlist_getString(aobs,i-1)'
  StringTable[19]  = '   for i = 1, string.len(change), 3 do'
  StringTable[20]  = '   z = string.sub(change, i, i+2)'
  StringTable[21]  = '   x, y = string.find(z, "%?+")'
  StringTable[22]  = '   if (x == nil) then'
  StringTable[23]  = '   script=[['
  StringTable[24]  = '   ]]..address.."+"..(DEC_HEX((i-1)/3))..[[:'
  StringTable[25]  = '   db ]]..z..[['
  StringTable[26]  = '   ]]'
  StringTable[27]  = '   autoAssemble(script)'
  StringTable[28]  = '   end'
  StringTable[29]  = '   end'
  StringTable[30]  = '   end'
  StringTable[31]  = '   object_destroy(aobs);'
  StringTable[32]  = '   aobs=nil'
  StringTable[33]  = 'end'
  StringTable[34]  = 'end'
  StringTable[35]  = 'function AobswapC(search, change)'
  StringTable[36]  = '   aobs = AOBScan(search)'
  StringTable[37]  = '   if(aobs == nil) then AobSwapCheck=false else'
  StringTable[38]  = '   j = stringlist_getCount(aobs)'
  StringTable[39]  = '   for i = 1, j do'
  StringTable[40]  = '   address=stringlist_getString(aobs,i-1)'
  StringTable[41]  = '   for i = 1, string.len(change), 3 do'
  StringTable[42]  = '   z = string.sub(change, i, i+2)'
  StringTable[43]  = '   x, y = string.find(z, "%?+")'
  StringTable[44]  = '   if (x == nil) then'
  StringTable[45]  = '   script=[['
  StringTable[46]  = '   ]]..address.."+"..(DEC_HEX((i-1)/3))..[[:'
  StringTable[47]  = '   db ]]..z..[['
  StringTable[48]  = '   ]]'
  StringTable[49]  = '   autoAssemble(script)'
  StringTable[50]  = '   end'
  StringTable[51]  = '   end'
  StringTable[52]  = '   end'
  StringTable[53]  = '   object_destroy(aobs);'
  StringTable[54]  = '   aobs=nil'
  StringTable[55]  = '   AobSwapCheck=true'
  StringTable[56]  = '  end'
  StringTable[57]  = 'end'
  for i=0,57 do
     memo_append(gc[4], StringTable[i])
  end
end

  CreateTheAttachList()

end

function CELabel5Click(sender)
	showMessage("Hey guys,\nThis update I included Aobswap function which searches for Aob and replaces all!\nTo use it you may write in the the enabling/disabling luacall(Aobswap('Scan bytes','Replace bytes'))\nBut it will always return sucecss (even if it didn't)\n\nSo I've modified it a bit and made a different function which is AobswapC, which will will show failure msg if failed to enabled or to disable\n you may use luacall(AobswapC('Scan bytes,'Replace bytes')) for it\n\nYou may use these functions to enable and/or disable!\nHave fun!")
end

ProcessListTable = {}
function addprocesstolist(index,text)
	ProcessListTable[index]=text
end

function SelectType(sender)
if combobox_getItemIndex(UDF2_CEComboBox1)==0 then
control_setEnabled(UDF2_CELabel5, false)
control_setEnabled(UDF2_CEEdit2, false)
control_setEnabled(UDF2_CEButton2, false)
control_setEnabled(UDF2_CELabel4, false)
control_setEnabled(UDF2_CEEdit1, false)
control_setEnabled(UDF2_CEButton1, false)
control_setEnabled(UDF2_CECheckbox1, false)
AL = listbox_getItems(UDF2_CEListBox1)
strings_clear(AL)
ProcessListTable = { }
autoattachto = nil
control_setCaption(UDF2_CELabel6,"Currently Auto-Attaching to : Nothing")
showMessage("Please pick a type!")
end
if combobox_getItemIndex(UDF2_CEComboBox1)==1 then
control_setEnabled(UDF2_CELabel4, true)
control_setEnabled(UDF2_CEEdit1, true)
control_setEnabled(UDF2_CEButton1, true)
control_setEnabled(UDF2_CELabel5, false)
control_setEnabled(UDF2_CEEdit2, false)
control_setEnabled(UDF2_CEButton2, false)
control_setEnabled(UDF2_CECheckbox1, false)
AL = listbox_getItems(UDF2_CEListBox1)
strings_clear(AL)
ProcessListTable = { }
end
if combobox_getItemIndex(UDF2_CEComboBox1)==2 then
control_setEnabled(UDF2_CELabel4, false)
control_setEnabled(UDF2_CEEdit1, false)
control_setEnabled(UDF2_CEButton1, false)
control_setEnabled(UDF2_CELabel5, true)
control_setEnabled(UDF2_CEEdit2, true)
control_setEnabled(UDF2_CEButton2, true)
control_setEnabled(UDF2_CECheckbox1, true)
control_setCaption(UDF2_CEButton1, "Save")
control_setCaption(UDF2_CELabel6,"Currently Auto-Attaching to : Nothing")
autoattachto = nil
end
end

autoattachto = nil
function SaveAutoAttach(sender)
AL = listbox_getItems(UDF2_CEListBox1)
strings_clear(AL)
ProcessListTable = { }
if control_getCaption(UDF2_CEEdit1)=="EasyTarinerMaking_Example_Process.exe" then return showMessage("Please pick an actual valid process =P\nThanks!") end
if autoattachto==nil then control_setCaption(sender, "Update") end
control_setCaption(UDF2_CELabel6,"Currently Auto-Attaching to : "..control_getCaption(UDF2_CEEdit1))
autoattachto = control_getCaption(UDF2_CEEdit1)
showMessage("Saved auto attach!")
end

function ClearAutoAttach(sender)
control_setCaption(UDF2_CEButton1, "Save")
control_setCaption(UDF2_CELabel6,"Currently Auto-Attaching to : Nothing")
autoattachto = nil
showMessage("Auto Attach was cleared!")
end


function AddtheAttachList()
control_setCaption(UDF2_CEButton1, "Save")
control_setCaption(UDF2_CELabel6,"Currently Auto-Attaching to : Nothing")
autoattachto = nil
i = strings_getCount(listbox_getItems( UDF2_CEListBox1 ))
addprocesstolist(i,control_getCaption(UDF2_CEEdit2))
local ZAttachList = listbox_getItems(UDF2_CEListBox1)
strings_add(ZAttachList, control_getCaption(UDF2_CEEdit2))
showMessage("Attach entry has done!")
end

function ClearTheAttachList()
AL = listbox_getItems(UDF2_CEListBox1)
strings_clear(AL)
ProcessListTable = { }
showMessage("Auto Attach was cleared!")
end

function CreateTheAttachList(sender)
if autoattachto ~= nil then
	memo_append(gc[4],"processes = {'"..autoattachto.."'}")
	AutoAttach_Text = [[
retryamount = 0
function CheckIfFound()
	if retryamount==600 then return object_destroy(AutoAttachWhenFound), Failure() end
	retryamount = retryamount+1
	local SL=createStringlist()
    getProcesslist(SL)

	function inTable(tbl, item)
		for key, value in pairs(tbl) do
			if value:upper() == item:upper() then return true end
		end
		return false
	end

	for i=0,strings_getCount(SL)-1 do
		local entry = strings_getString(SL,i)
		local processname = entry:sub(10,255)
		if inTable(processes,processname) then
		openProcess(processes[1])
		object_destroy(AutoAttachWhenFound)
		showMessage("Game was found!\nYou may enable now the hacks!")
		CreateTrainer()
		break
		end
	end
end

function Failure()
	showMessage("Sorry but we couldn't find the game opened!\nThe program will shut down now")
	closeCE()
end

showMessage("Please make sure the game is opened\nPress OK to attach")
AutoAttachWhenFound = createTimer(nil,true)
timer_setInterval(AutoAttachWhenFound, 500)
timer_onTimer(AutoAttachWhenFound, CheckIfFound)]]

	for line in string.gfind (AutoAttach_Text,"[^\n]+") do
		memo_append(gc[4], line)
	end

	elseif ((strings_getCount(listbox_getItems( UDF2_CEListBox1 ))~=0) or (checkbox_getState(UDF2_CECheckbox1)==1)) and autoattachto==nil then
	AttachList_Text = [[InformationText="Before you continue!\nPlease attach to your game process, Using the attach list\n\nPlease note that you must to attach to right process of your game.\nElse the hack(s) won't work\n\nUpon successful attach the 'Continue' button will be available"

AttachFirst     = {}
AttachFirst[1]  = createForm(false)
AttachFirst[2]  = createPanel(AttachFirst[1])
AttachFirst[3]  = createButton(AttachFirst[2])
AttachFirst[4]  = createLabel(AttachFirst[2])
AttachFirst[5]  = createGroupBox(AttachFirst[2])
AttachFirst[6]  = createLabel(AttachFirst[5])
AttachFirst[7]  = createLabel(AttachFirst[5])
AttachFirst[9]  = createLabel(AttachFirst[5])
AttachFirst[10] = createComboBox(AttachFirst[5])
AttachFirst[12] = createButton(AttachFirst[5])
AttachFirst[13] = createLabel(AttachFirst[2])

setProperty(AttachFirst[1] , "Position", "poScreenCenter")
setProperty(AttachFirst[1] , "BorderIcons", "[biSystemMenu]")
setProperty(AttachFirst[1] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[2] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[2] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[10] , "ReadOnly", "True")
local FontHeight = getProperty(AttachFirst[4] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "17")
local FontHeight = getProperty(AttachFirst[5] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
--
local FontHeight = getProperty(AttachFirst[6] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "14")
local FontHeight = getProperty(AttachFirst[7] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
local FontHeight = getProperty(AttachFirst[9] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "14")
local FontHeight = getProperty(AttachFirst[7] , "Font")
setProperty(FontHeight , "Color", 0x000000FE)
setProperty(FontHeight , "Color", 0x000000FE)
local FontHeight = getProperty(AttachFirst[9] , "Font")
setProperty(FontHeight , "Color", 0x00007F00)
--
local FontHeight = getProperty(AttachFirst[10] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
local FontHeight = getProperty(AttachFirst[12] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
setProperty(AttachFirst[13], "Cursor", "-21")
local FontHeight = getProperty(AttachFirst[13] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "20")
setProperty(FontHeight , "Color", 0x00800180)

--
control_setEnabled(AttachFirst[3], false)

control_setSize(AttachFirst[1], 385, 250)
x,y = control_getSize(AttachFirst[1])
control_setSize(AttachFirst[2], x,y)

control_setSize(AttachFirst[3], 75,25)
control_setSize(AttachFirst[5], 375,190)
control_setSize(AttachFirst[10], 205,21)
control_setSize(AttachFirst[12], 79,45)

control_setPosition(AttachFirst[3], 303,219)
control_setPosition(AttachFirst[4], 5,5)
control_setPosition(AttachFirst[5], 5,25)
control_setPosition(AttachFirst[6], 5,0)
control_setPosition(AttachFirst[7], 5,110)
control_setPosition(AttachFirst[9], 5,150)
control_setPosition(AttachFirst[10], 75,108)
control_setPosition(AttachFirst[12], 287,97)
control_setPosition(AttachFirst[13], 5,219)

control_setCaption(AttachFirst[1],"Attaching Form!")
control_setCaption(AttachFirst[3],"Continue")
control_setCaption(AttachFirst[4],"One moment...")
control_setCaption(AttachFirst[5],"Attaching")
control_setCaption(AttachFirst[6],InformationText)
control_setCaption(AttachFirst[7],"Process list")
control_setCaption(AttachFirst[9],"Currently attached to PID: ")
control_setCaption(AttachFirst[12],"Attach")
control_setCaption(AttachFirst[13],"www.flashacking.net")

al = combobox_getItems(AttachFirst[10])
strings_clear(al)

function OpenFlashacking()
shellExecute("http://flashacking.net/")
end

strings_add(al, 'Pick a processor....')]]

	for line in string.gfind (AttachList_Text,"[^\n]+") do
		memo_append(gc[4], line)
	end

	i = 0
	for y in pairs( ProcessListTable ) do
		i = i+1
	end



	if checkbox_getState(UDF2_CECheckbox1)==1 then
		memo_append(gc[4],"strings_add(al, 'chrome.exe')")
	end


	for In=0,i do
		if ProcessListTable[In]~= nil then
			memo_append(gc[4],"strings_add(al, '"..ProcessListTable[In].."')")
		end
	end
	Add_Chrome_if = [[setProperty(AttachFirst[10] , "ItemIndex", "0")
success = 1
process = "chrome.exe"
errorOnLookupFailure(false);

function ResetChrome()
	success = 0
	local test = openProcess("chrome.exe") if test ==nil then showMessage("Chrome was not found!!"); timer_setEnabled(openNextProcTimer,false); return end
	strings_add(getAutoAttachList(),process)
	timer_setEnabled(openNextProcTimer,true)
end

function enableCheatsGuiWhatEver()
	local PID=getOpenedProcessID()
	control_setCaption(AttachFirst[1],"Attaching Form!")
	control_setEnabled(AttachFirst[3], true)
	control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
	success = 1
	showMessage("Attached successfully!")
end

function checkProcessMajor()
	reinitializeSymbolhandler()
	if getAddress("pepflashplayer.dll")~=0 or
		getAddress("AdobeCPGetAPI")     ~=0 then
		return true
	end
	return false
end

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
)

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,8))
		if processname == process 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={}
		enableCheatsGuiWhatEver()
	else
		timer_setEnabled(openNextProcTimer,true)
	end
end

function onOpenProcess()
	if success == 1 then return end
	timer_setEnabled(checkProcessTimer,true)
end

checkProcessTimer = createTimer(nil,false)
timer_setInterval(checkProcessTimer, 100)
timer_onTimer(checkProcessTimer, checkProcess)

function AttachToChrome()
	control_setCaption(AttachFirst[1],"Attaching Form! - Please wait searching for the process...")
	ResetChrome()
end

function AttachList()
	AttachItems = combobox_getItems(AttachFirst[10])
	AttachIndex = combobox_getItemIndex(AttachFirst[10])
	if AttachIndex == -1 then return end
	if AttachIndex == 0 then return showMessage("Please pick a process from the list") end
	if strings_getString(AttachItems,AttachIndex)=='chrome.exe' then return AttachToChrome() end
	openProcess(strings_getString(AttachItems,AttachIndex))
	errorOnLookupFailure(false)
	reinitializeSymbolhandler()
	err=getAddress("kernel32.dll")==0
	if err==true then
		showMessage("Couldn't find the process")
	else
		local PID=getOpenedProcessID()
		control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
		control_setEnabled(AttachFirst[3], true)
		showMessage("Attached successfully!")
	end
end

function AttachClose()
	closeCE()
end

function ExecuteHack()
	CreateTrainer()
	form_hide(AttachFirst[1])
end

control_onClick(AttachFirst[3], ExecuteHack)
control_onClick(AttachFirst[12],AttachList)
form_onClose(AttachFirst[1],AttachClose)
control_onClick(AttachFirst[13],OpenFlashacking)
setProperty(AttachFirst[1] , "ShowInTaskBar", "stAlways")
form_show(AttachFirst[1])]]

	AttachList_Text = [[
function AttachList()
	AttachItems = combobox_getItems(AttachFirst[10])
	AttachIndex = combobox_getItemIndex(AttachFirst[10])
	if AttachIndex == -1 then return end
	if AttachIndex == 0 then return showMessage("Please pick a process from the list") end
	openProcess(strings_getString(AttachItems,AttachIndex))
	errorOnLookupFailure(false)
	reinitializeSymbolhandler()
	err=getAddress("kernel32.dll")==0
	if err==true then
		showMessage("Couldn't find the process")
	else
		local PID=getOpenedProcessID()
		control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
		control_setEnabled(AttachFirst[3], true)
		showMessage("Attached successfully!")
	end
end

function AttachClose()
	closeCE()
end

function ExecuteHack()
	CreateTrainer()
	form_hide(AttachFirst[1])
end

control_onClick(AttachFirst[3], ExecuteHack)
control_onClick(AttachFirst[12],AttachList)
form_onClose(AttachFirst[1],AttachClose)
control_onClick(AttachFirst[13],OpenFlashacking)
setProperty(AttachFirst[1] , "ShowInTaskBar", "stAlways")
form_show(AttachFirst[1])]]

		if checkbox_getState(UDF2_CECheckbox1)==1 then
			for line in string.gfind (Add_Chrome_if,"[^\n]+") do
				memo_append(gc[4], line)
			end
		else
			for line in string.gfind (AttachList_Text,"[^\n]+") do
				memo_append(gc[4], line)
			end
		end
	end
end

function DoneUDF2()
	form_hide(UDF2)
end

CheckIfAdded = 0

function showAttach()
	CheckIfAdded = 1
	form_show(UDF2)
end


</LuaScript>
</CheatTable>
