Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need help using edibox

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
hector689
How do I cheat?
Reputation: 0

Joined: 18 Jun 2013
Posts: 3

PostPosted: Tue Jun 18, 2013 2:11 pm    Post subject: Need help using edibox Reply with quote

k i made a speed hacker trainer for my game i got this so far:
Code:
--TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code

--Uncomment the following line if this is a Cheat Table format trainer and you don't want CE to show (Tip, save as .CETRAINER alternatively)
--hideAllCEWindows()

RequiredCEVersion=6.2
if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
  messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
  closeCE()
end
addresslist=getAddressList()



strings_add(getAutoAttachList(), "WizardGraphicalClient.exe")
gBeepOnAction=false
form_show(CETrainer_1)
end
function Enable1(sender)
speedhack_setSpeed(4.5)
end
function Enable2(sender)
speedhack_setSpeed(1)
end
function Disable(sender)
speedhack_setSpeed(0)
end
function CloseClick()
  closeCE()
  return caFree --onClick doesn't care, but onClose would like a result
end


--TRAINERGENERATORSTOP--
now i wanna add an editbox to the interace so that when you write your value and press the enable botton the speed changes according to the value. can anyone help me?



Capture.PNG
 Description:
 Filesize:  68.44 KB
 Viewed:  5082 Time(s)

Capture.PNG


Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Jun 18, 2013 3:01 pm    Post subject: Reply with quote

Add new edit box and use
[code]
speedhack_setSpeed(control_getCaption(FORM_CEEdit1))
[code][/code]

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Jun 18, 2013 5:16 pm    Post subject: Reply with quote

 


function CEButton1Click(sender)

  local userSpeedValueString = UDF1.CEEdit1.Text:gsub(',','.')   -- it allows , and . as decimal separator
  local number = tonumber(userSpeedValueString)

  if number==nil then
    UDF1.CEEdit1.Color = 0xC6C6FF     -- not number, change color to bright red and quit
    return
  end

  if number>1000 or number<0 then
    UDF1.CEEdit1.Color = 0xC6C6FF     -- too big or too small, change color to bright red and quit
    return
  end

  UDF1.CEEdit1.Color = 0xFFFFFF         -- it's good
  speedhack_setSpeed(number)            -- set speed

end



 

_________________
Back to top
View user's profile Send private message MSN Messenger
hector689
How do I cheat?
Reputation: 0

Joined: 18 Jun 2013
Posts: 3

PostPosted: Tue Jun 18, 2013 5:50 pm    Post subject: Reply with quote

Thnx for the help, just began lua scripting today
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites