[Help] how to make this script work CEtrainer?
how to make this script work CEtrainer
how to make this script work CEtrainer? Posted on: 05/05/2015 8:51pm
Quote Post

how to make this script work CEtrainer ? - farmville 2
when put in luascript always a bug, please help me



 

Code...
 function CreateTrainer()

  function setHack_Information()
  control_setCaption(ht[1], 'FarmVille 2 Hack 04/05/2015')
  control_setCaption(ht[1.2] ,'FarmVille 2 Hack')

   DonateURL = " "

function OpenDonateURL()
showMessage('Merci pour votre aide et votre soutient. Boulou')
shellExecute(DonateURL)
end
if DonateURL~="" then
control_setCaption(ht[1.4], "Donation")
control_onClick(ht[1.4],OpenDonateURL)
setProperty(ht[1.4] , "Cursor", "-21")
end
   VideoURL = " "

function OpenVideoURL()
shellExecute(VideoURL)
end
if VideoURL~="" then
control_setCaption(ht[1.6], "Vidéo")
control_onClick(ht[1.6],OpenVideoURL)
setProperty(ht[1.6] , "Cursor", "-21")
end

function OpenTuto()
messageDialog("1 - Copier/coller le code xml de l\'objet subsidiaire dans la case \"Code Items Sub\"\n2 - Copier/coller le code xml de l\'objet désiré dans la case \"Code Items Désiré\"\n3 - Cliquez sur Remplacer et attendez\n4- Une fenêtre va apparaitre cliquez sur ok\n5 - Placez votre objets sur votre ferme\n6 - Visitez un voisin et revenir sur votre ferme\n7 - Ou actualisez votre ferme\n8 - Profitez ;)\n\nPS:\nSi l\'objet désiré est avec les billets vous faites le même tuto mais il faudra activez soit l\'option \"Hacks Farmbucks\" ou l\'option 6 dans \"Hacks Disponibles\"", 4, 2 );
end
if Tuto~="" then
control_setCaption(ht[8.4],"Tuto")
control_onClick(ht[8.4],OpenTuto)
setProperty(ht[8.4] , "Cursor", "-21")
end

   BoulouURL = " "

function OpenBoulouURL()
shellExecute(BoulouURL)
end
if BoulouURL~="" then
control_setCaption(ht[8.3], "Codes items XML FV2")
control_onClick(ht[8.3],OpenBoulouURL)
setProperty(ht[8.3] , "Cursor", "-21")
end

function BFV()
local search = "D0 D0 66 ?? ?? ?? ?? ?? 07 A1 ?? ?? ?? D0 24 FF ?? ?? ?? 07 A2"
  local changeTable = {}

  local aobs = AOBScan(search)
  if(aobs ~= nil) then
  check = 2

    for i=0,stringlist_getCount(aobs)-1 do
       local address=stringlist_getString(aobs,i)
       local changeTable = readBytes(address,30,true)

       changeTable[6],changeTable[7],changeTable[8] = 0x68,changeTable[4],changeTable[5]
       changeTable[3], changeTable[4], changeTable[5]  = 0x25,0x90,0x4e
       changeTable[9]                                  = 0xd0
       changeTable[10],changeTable[11],changeTable[12] = 0x25,0x90,0x4e
       for i=13,21 do
         changeTable[i] = 0x02
       end
       changeTable[29],changeTable[30]                 = 0x47,0x48

       changeTable[31] = 'dummy'
       writeBytes('0x'..address,changeTable)
    end

    object_destroy(aobs);
    aobs=nil
  end
 if check==1 or check==2 then
  showMessage("Enable!")
 end
end
if DonateURL~="" then
control_setCaption(ht[1.5], "Activer")
control_onClick(ht[1.5],BFV)
setProperty(ht[1.5] , "Cursor", "-21")
end


function TextReplacer(sender)
local search2 = control_getCaption(ht[8])
local change2 = control_getCaption(ht[9])
if search2:len() ~= change2:len() then
messageDialog ("Doit avoir la même longueur !" , 4 , 2 ) ;
end
if search2:len() == change2:len() then
local searchTable = {}
for i=1,search2:len() do
searchTable[i]=string.format('%X',search2:byte(i))
end
local searchHexString = table.concat(searchTable)
local aobs2 = AOBScan(searchHexString)
if(aobs2 ~= nil) then
for i=0,stringlist_getCount(aobs2)-1 do
local address=stringlist_getString(aobs2,i)
writeString('0x'..address,change2)
end
object_destroy(aobs2);
aobs2=nil
end
beep()
messageDialog ("Terminer !" , 4 , 2 ) ;
end
end
if DonateURL~="" then
control_setCaption(ht[7], "Remplacer")
control_onClick(ht[7],TextReplacer)
setProperty(ht[7] , "Cursor", "-21")
end

  t =
  {

{'1 - Hack XP',[[LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? C8 AF 00 00 C8 AF", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 C8 AF"))
LuaCall(Aobswap("00 00 ?? ?? ?? ?? ?? ?? 8D 01 00 00 00 00 00 00", "00 00 ?? ?? ?? ?? ?? ?? A0 86 01"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 20 4E 00 00 20 4E 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 20 4E 00 00"))
LuaCall(Aobswap("B3 00 00 00 00 00 00 00 01", "40 0D 03 00 00 00 00 00 01"))]],[[Achetez le chariot de foin et gagner 100 000 XP ou
achetez la piscine hors sol et gagner 200 000 XP]],[[Activated]], 'yes'},

{'2 - Hack pièces',[[LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 40 42 0F 00 40 42 0F 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 40 42 0F 00"))
LuaCall(Aobswap("50 C3 00 00 00 00 00 00 01", "40 4B 4C 00 00 00 00 00 01"))]],[[Placer et vendez le manoir et vous obtiendrez 5 000 000 pièces]],[[Activated]], 'yes'},

{'3 - Hack publication',[[LuaCall(Aobswap("03 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 38 04 00 00", "03 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 01 00 00 00"))]],[[Publication et demande prête toutes les minutes]],[[Activated]], 'yes'},

{'4 - Supprimer rocher',[[LuaCall(Aobswap("6F 62 73 74 72 75 63 74 69 6F 6E 5F 72 6F 63 6B", "65 5F 64 65 63 6F 5F 73 68 72 75 62 5F 72 6F 75"))
LuaCall(Aobswap("6F 62 73 74 72 75 63 74 69 6F 6E 5F 73 74 75 6D 70", "65 5F 64 65 63 6F 5F 73 68 72 75 62 5F 72 6F 75 6E"))
LuaCall(Aobswap("6F 62 73 74 72 75 63 74 69 6F 6E 5F 6D 65 74 61 6C 00", "65 5F 64 65 63 6F 5F 62 65 6E 63 68 5F 77 6F 6F 64 00"))
LuaCall(Aobswap("6F 62 73 74 72 75 63 74 69 6F 6E 5F 74 72 65 65 5F 66 61 6C 6C 65 6E ", "65 5F 64 65 63 6F 5F 62 65 6E 63 68 5F 77 6F 6F 64 00"))
LuaCall(Aobswap("6F 62 73 74 72 75 63 74 69 6F 6E 5F 6C 6F 67 ", "65 5F 64 65 63 6F 5F 73 68 72 75 62 5F 72 6F 75"))
LuaCall(Aobswap("65 5F 62 75 69 6C 64 69 6E 67 5F 63 72 61 74 65 5F 6D 79 73 74 65 72 79 ", "65 5F 62 75 69 6C 64 69 6E 67 5F 63 72 61 74 65 5F 6D 79 73 74 65 72 30"))]],[[Supprimer rocher, arbres, coffres ...
Visitez un voisin et revenir sur votre ferme]],[[Activated]], 'yes'},

{'5 - Production multipliée',[[LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 01 00 00 00 01 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 02 00 00 00 02 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 03 00 00 00 03 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 04 00 00 00 04 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 05 00 00 00 05 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 06 00 00 00 06 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 07 00 00 00 07 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "02 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? F4 01 00 00 F4 01 00 00 00 00 00 00 ?? ?? ?? ??"))
LuaCall(Aobswap("d0 d0 66 ?? ?? d2 a0 68 ?? ??","d0 25 98 75 24 05 a2"))]],[[Production animaux, arbres, cultures multipliée par 500
Ne fonctionne pas avec tous !]],[[Activated]], 'yes'},


Utile pour acheter gratuitements les animaux et quelques objets]],[[Activated]], 'yes'},

}
end
ht = {}
ht[1] = createForm()
ht[2] = createPanel(ht[1])
ht[1.1] = createLabel(ht[2])
ht[1.2] = createLabel(ht[2])
ht[1.3] = createLabel(ht[2])
ht[1.4] = createButton(ht[2])
ht[1.6] = createButton(ht[2])
ht[3] = createGroupBox(ht[2])
ht[3.1] = createLabel(ht[3])
ht[3.2] = createLabel(ht[3])
ht[3.3] = createLabel(ht[3])
ht[3.4] = createLabel(ht[3])
ht[4] = createListBox(ht[3])
ht[5] = createButton(ht[3])
ht[6] = createGroupBox(ht[2])
ht[6.1] = createLabel(ht[6])
ht[1.5] = createButton(ht[2])
ht[10] = createGroupBox(ht[2])
ht[7] = createButton(ht[2])
ht[8] = createEdit(ht[2])
ht[8.1] = createLabel(ht[10])
ht[8.2] = createLabel(ht[10])
ht[8.3] = createLabel(ht[10])
ht[8.4] = createButton(ht[10])
ht[9] = createEdit(ht[2])
ht[9.1] = createLabel(ht[10])

setProperty(ht[1] , 'Position', 'poScreenCenter')
setProperty(ht[1] , 'BorderIcons', '[biSystemMenu]')
setProperty(ht[1] , 'BiDiMode', 'bdLeftToRight')
setProperty(ht[2] , 'BiDiMode', 'bdLeftToRight')
local FontHeight = getProperty(ht[1.2] , 'Font')
setProperty(FontHeight , 'Color', 0x000000FE)
setProperty(FontHeight , 'Style', '[fsBold]')
setProperty(FontHeight , 'Height', '20')
local FontHeight = getProperty(ht[3.1] , 'Font')
setProperty(FontHeight , 'Color', 0x00007F00)
setProperty(FontHeight , 'Style', '[fsBold]')
setProperty(FontHeight , 'Height', '16')
local FontHeight = getProperty(ht[3.3] , 'Font')
setProperty(FontHeight , 'Color', 0x00F21200)
local FontHeight = getProperty(ht[1.3] , 'Font')
setProperty(FontHeight , 'Color', 0x00FF0482)
setProperty(FontHeight , 'Style', '[fsBold]')
control_setSize(ht[1], 400, 300)
local FontHeight = getProperty(ht[1.4] , 'Font')
setProperty(FontHeight , 'Color', 0x00FF0482)
setProperty(FontHeight , 'Style', '[fsBold]')
local FontHeight = getProperty(ht[1.6] , 'Font')
setProperty(FontHeight , 'Color', 0x00FF0482)
setProperty(FontHeight , 'Style', '[fsBold]')
control_setSize(ht[1], 800, 320)
x,y = control_getSize(ht[1])
control_setSize(ht[2], x,y)
control_setPosition(ht[1.1], 5, y-17)
control_setPosition(ht[1.3], 313, y-17)
control_setPosition(ht[1.2], 340, 2.5)
control_setPosition(ht[1.4], 570, y-30)
control_setPosition(ht[1.5], 15, y-270)
control_setPosition(ht[1.6], 480, y-30)
control_setPosition(ht[7], 570, y-160)
control_setSize(ht[3], x*0.465, y*0.55)
control_setPosition(ht[3], 5,y*1.270-y)
control_setCaption(ht[3], 'Hacks Disponible')
control_setSize(ht[6], x*0.985, y*0.17)
control_setPosition(ht[6], 5,y*1.095-y)
control_setCaption(ht[6], 'Hacks Farmbucks')
control_setSize(ht[10], x*0.465, y*0.55)
control_setPosition(ht[10], 420,y*1.270-y)
control_setCaption(ht[10], 'Hacks Codes XML')
control_setPosition(ht[3.1], 5, 0)
control_setCaption(ht[3.1],'SVP sélectionnez un hack, et presser ENABLE!')
control_setPosition(ht[6.1], 95, 0)
control_setCaption(ht[6.1],'Minimum 1 billet (pas billet faites les offres), apres acheter une dose de nourriture (1 billet) afin d\'activer le hack. Dés l\'achat vous\n obtiendrez 10 000 billets (temporaire). Utilisation articles de l\'épicerie, les expansions. Maintenant cliquer sur activer')
X,Y = control_getSize(ht[3])
X,Y = control_getSize(ht[6])
control_setSize(ht[4], X*0.40-40, 64)
X,Y = control_getSize(ht[4])
control_setPosition(ht[4],5, 20)
control_setSize(ht[5], X*0.34-6, 64)
control_setPosition(ht[5],X+6, 20)
control_setCaption(ht[5], 'ENABLE')
control_setSize(ht[8], X*0.65-6, 64)
control_setPosition(ht[8],X+150, 130)
control_setCaption(ht[8.1], "Code Items Sub")
control_setPosition(ht[8.1], 45, 5)
control_setCaption(ht[8.2], "Pour obtenir les codes des items visitez la page")
control_setPosition(ht[8.2], 80, 85)
control_setPosition(ht[8.3], 130, 105)
local FontHeight = getProperty(ht[8.3] , 'Font')
setProperty(FontHeight , 'Color', 0x00FF0482)
setProperty(FontHeight , 'Style', '[fsBold]')
control_setPosition(ht[8.4], 150, 125)
control_setSize(ht[9], X*0.65-6, 64)
control_setPosition(ht[9],X+340, 130)
control_setCaption(ht[9.1], "Code Items Désiré")
control_setPosition(ht[9.1], 230, 5)
control_setPosition(ht[3.3] ,5, Y+20)
control_setCaption(ht[3.3] , 'Description du hack séléctionné:')
control_setPosition(ht[3.4] ,5, Y+35)
control_setCaption(ht[3.4] , 'Choisir un hack et lisez la description!')
setHack_Information()
local TeL = listbox_getItems(ht[4])
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])
    if t[i][8]==nil then t[i][8]=2 end
    if t[i][5]=='no' then t[i][5]=nil end
    TempSave[i] = {}
    TempSave[i][1] = t[i][1]
    TempSave[i][2] = t[i][2]
    TempSave[i][3] = t[i][3]
    TempSave[i][4] = t[i][4]
    TempSave[i][5] = t[i][5]
    TempSave[i][6] = t[i][6]
    TempSave[i][7] = t[i][7]
    TempSave[i][8] = t[i][8]
    check = 0
  end
until check == 1
function ExecuteHacksScripts()
  HLS = listbox_getItemIndex(ht[4])
  if HLS == -1 then return end
  i = HLS+1
  if t[i][5]=='no' or t[i][5]==nil and t[i][2]==nil then return showMessage(t[i][4]) end
  if t[i][5]=='yes' and TempSave[i][8]==1 then
    Asm=false
    if type(t[i][6])=='string' then
      Asm = autoAssemble(t[i][6])
    elseif type(t[i][6])=='function' then
      Asm=true
    end
    if Asm~=true then
      return showMessage('Hack failed to disable! Please try again!')
    end
    if AobSwapCheck~=true and AobSwapCheck~=nil then
      AobSwapCheck=nil
      return showMessage('Hack failed to disable! Please try again!')
    end
    AobSwapCheck=nil
    t[i][1] = TempSave[i][1]
    t[i][2] = TempSave[i][2]
    t[i][3] = TempSave[i][3]
    t[i][4] = TempSave[i][4]
    t[i][5] = TempSave[i][5]
    t[i][6] = TempSave[i][6]
    t[i][7] = TempSave[i][7]
    t[i][8] = TempSave[i][8]
    local TempText
    TempText = t[i][1]
    strings_setString( TeL, HLS, TempText )
    OriginalCap=nil
    control_setCaption(ht[5], 'ENABLE')
    if t[i][7]=='' then
      showMessage('Hack is now DISABLED')
    else
      showMessage(t[i][7])
    end
    TempSave[i][8] = 0
  end
  if TempSave[i][8] == 2 then
    if type(t[i][2])=='string' then
      Asm = autoAssemble(t[i][2])
    elseif type(t[i][2])=='function' then
      Asm=true
    elseif type(t[i][2])=='nil' then
      Asm=true
    end
    if Asm~=true then
      return showMessage('Hack non activé! Réessayé!')
    end
    if AobSwapCheck~=true and AobSwapCheck~=nil then
      AobSwapCheck=nil
      return showMessage('Hack non activé! Réessayé!')
    end
    AobSwapCheck=nil
    local TempText
    TempText = t[i][1]..' - ENABLED'
    strings_setString( TeL, HLS, TempText )
    if t[i][5]=='yes' then control_setCaption(ht[5], 'DISABLE') end
    if t[i][4]=='' then
      showMessage('Hack activé! Félicitation!')
    else
      showMessage(t[i][4])
    end
    t[i][2] = nil
    t[i][4] = 'This Hack was already ACTIVATED!'
    TempSave[i][8] = 1
  end
  if TempSave[i][8] == 0 then TempSave[i][8] = 2 end
end

function HackDescriptionsChange()
  HLS = listbox_getItemIndex(ht[4])
  if HLS == -1 then return end
  i = HLS+1
  if t[i][3]~='' and t[i][3]~=nil then
    control_setCaption(ht[3.4],t[i][3])
  else
    control_setCaption(ht[3.4],'Theres no descriptions available about this hack')
  end
  if t[i][5]=='yes' and TempSave[i][8]==1 then control_setCaption(ht[5], 'DISABLE') end
  if t[i][5]=='yes' and TempSave[i][8]==2 then control_setCaption(ht[5], 'ENABLE') end
  if t[i][5]==nil then control_setCaption(ht[5], 'ENABLE') end
end
function CloseProgram()
  closeCE()
end

form_onClose(ht[1],CloseProgram)
control_onClick(ht[5],ExecuteHacksScripts)
setMethodProperty(ht[4], 'OnSelectionChange', HackDescriptionsChange)
end

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)
   if(aobs ~= nil) then
      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
   end
end

function AobswapC(search, change)
   aobs = AOBScan(search)
   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
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])
AttachFirst[14] = createButton(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)
setProperty(AttachFirst[14], "Cursor", "-21")
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], 115,219)
control_setPosition(AttachFirst[14], 5,219)
control_setCaption(AttachFirst[1],"                           I am the Attachment Window")
control_setCaption(AttachFirst[3],"CONTINUE")
control_setCaption(AttachFirst[4],"   PLEASE CHOOSE YOUR FLASH PROCESS BELLOW")
control_setCaption(AttachFirst[5],"                                The Attachment Window                                         ")
control_setCaption(AttachFirst[6],InformationText)
control_setCaption(AttachFirst[7],"PROCESS LIST")
control_setCaption(AttachFirst[9],"Correctly attached to PID number: ")
control_setCaption(AttachFirst[12],"ATTACH ME")
control_setCaption(AttachFirst[13],"Boulou-astuces.com")

al = combobox_getItems(AttachFirst[10])
strings_clear(al)
function OpenFlashacking()
shellExecute("http://boulou-astuces.com")
end

strings_add(al, 'Please pick your Process...')
strings_add(al, 'Chrome.exe')
strings_add(al, 'Bul-Dozer Browser')
strings_add(al, 'FlashPlayerPlugin')
strings_add(al, 'Opera.exe')
strings_add(al, 'Plugin-Container.exe')
strings_add(al, 'Iexplorer.exe')
setProperty(AttachFirst[10] , "ItemIndex", "0")
success = 1
function ResetChrome()
success = 0
local test = openProcess("chrome.exe") if test ==nil then return showMessage("Google Chrome Process was not found! Please start you Chrome Browser and try again!"),timer_setEnabled(openNextProcTimer,false) end
  strings_add(getAutoAttachList(),process)
  timer_setEnabled(openNextProcTimer,true)
end
function enableCheatsGuiWhatEver()
local PID=getOpenedProcessID()
control_setCaption(AttachFirst[1],"Form is being attached!")
control_setEnabled(AttachFirst[3], true)
control_setCaption(AttachFirst[9], "Was correctly attached to PID number: " .. PID)
success = 1
showMessage("Was correctly Attached!")
end
function checkProcessMajor()
  reinitializeSymbolhandler()
  if getAddress("pepflashplayer.dll")~=0 or
     getAddress("AdobeCPGetAPI")     ~=0 then
       return true
  end
end
errorOnLookupFailure(false)
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 OpenMess()
messageDialog("IMPORTANT,\n\nPour les utilisateurs de chrome, il faut impérativement qu'il n'y ai que un seul onglet (celui de FV2) d'ouvert avant de sélectionner votre process...\nPour plus de précaution et pour profitez pleinement du trainer je vous conseil de l'utiliser sur firefox avec le process FlashPlayePlugin", 4, 2 );
end
if DonateURL~="" then
control_setCaption(AttachFirst[14],"A lire")
control_onClick(AttachFirst[14],OpenMess)
setProperty(AttachFirst[14] , "Cursor", "-21")
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],"Form is being Attached!")
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 the correct 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], "Was correctly attached to PID number: " .. PID)
      control_setEnabled(AttachFirst[3], true)
      showMessage("The Process Attachment was successfull!")
    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)
form_hide(AttachFirst[1])
form_show(UDF1)
function CEButton1Click(sender)
form_show(AttachFirst[1])
end
RE: how to make this script work CEtrainer? Posted on: 05/06/2015 2:29am
Quote Post
The Laziest Man on KongHack

too many errors. taking code from a .CT file will give you bad code. most of it will be the same bu things like > and < will change. youre missing brackets, your AobSwapC is literally the exact same thing as aobswap except it always returns true (unless the aob didnt exist in the first place), everything is scattered everywhere, you cant tell where the program begins/ends, and theres probably an array/table error hidden somewhere that i didnt see.

if you organize everything, you might be able to find where the problems are.

also, save the file as .lua and open it in notepad++ since it will make it much easier to read




RE: how to make this script work CEtrainer? Posted on: 05/06/2015 4:52am
Quote Post
disgruntled old man

Fixed everything up and translated to english. See submitted trainer here https://konghack.com/game/display/71992-farmville_2




New to Kong Hack and want to learn the basics? Check out the [Kong Hack 101] and the [Hacking 101].
Wanna learn how we make the hacks? Start with getting [the tools], then check these out: [AoB tutorial] | [.sol guide] | [Unity3d tutorial] | kadat's [video tutorials]
And if you don't already have it, check out the [Kong Hack Ultra Trainer]. You'll be glad you did!
RE: how to make this script work CEtrainer? Posted on: 05/06/2015 7:02am
Quote Post
portões Publicado em: 2015/05/06 00:52

Corrigido tudo e traduzido para o Inglês. Veja treinador apresentou aqui  https://konghack.com/game/display/71992-farmville_2



owooo, thank you I know it's complicated you tell where I had to fixes, now I can see where you,, corrected.

piscadela

RE: how to make this script work CEtrainer? Posted on: 05/11/2015 4:33am
Quote Post

know who you are... I don't know the call is richardson10 or FaceCheatBrasil :))