----------------------------------------------------------------- --[[ This is Example lua trainer for beginner`s like me ^_^ because in just 20 mins im Learn a little bit of lua in Cheat Enine 6.0 ]] -- ----------------------------------------------------------------- -- THIS IS COOL TRAINER WITH SLIDING FORM/LABEL BLINKING WINDOW -- ----------------------------------------------------------------- -- I DON`T KNOW WHAT IS IT BECAUSE IM BEGINNER -- local df = { } local tf = { } -- ATTACH TO THE PROCESS -- strings_add( getAutoAttachList(), "hl.exe" ); ----------------------------------------------------------------- -- OBJECT`S / FUNCTION`S -- -- Button -- function button( form, caption, x, y, w, h, func ) local button = createButton( form ); if ( button == nil ) then return nil; end control_setCaption( button, caption ); -- YOU CAN SEE CONTROL FUNC IN MAIN.LUA IN CE DIR -- control_setPosition( button, x, y ); control_setSize( button, w, h ); control_onClick( button, func ); return button; end -- Timer-- function timer( form, interval, boolean, func ) -- BOOLEAN IS TRUE OR FALSE -- local timer = createTimer( form ); if ( timer == nil ) then return nil; end timer_setInterval( timer, interval ); -- YOU CAN THIS FUNCTION IN MAIN.LUA IN CE DIR -- timer_setEnabled( timer, boolean ); timer_onTimer( timer, func ); return timer; end -- ProgressBar -- function progressbar( form, x, y, w, h, position ) local progressbar = createProgressbar( form ); if ( progressbar == nil ) then return nil; end control_setPosition( progressbar, x, y ); control_setSize( progressbar, w, h ); progressbar_setPosition( progressbar, position ); -- SEE IN MAIN.LUA IN CE DIR -- return progressbar; end -- label -- function label( form, x, y, text ) local label = createLabel( form ); if ( label == nil ) then return nil; end control_setPosition( label, x, y ); control_setCaption( label, text ); return label; end ---------------------------------------------------------------------------- -- Form -- function df.main( ) -- CARETE THE FORM -- df.form = createForm( true ); -- TITLE OF THE FORM -- control_setCaption( df.form, "Lua Trainer Example by hack0535" ); -- SIZE OF THE FORM -- control_setSize( df.form, 250, 70 ); -- TIMER -- df.tmr = timer ( df.form, 100, true, df_tmr ); df.tmr2 = timer ( df.form, 100, true, df_tmr2 ); df.tmr3 = timer ( df.form, 1, true, df_tmr3 ); -- lABEL -- df.lbl = label( df.form, 1, 20, "< -- Speed Hack -- >" ); df.bt3 = button( df.form, "About", 1, 50, 123, 20, df_bt3 ); df.bt = button( df.form, "Dec", 1, 1, 123, 20, df_bt ); df.bt2 = button( df.form, "Inc", 125, 1, 123, 20, df_bt2 ); -- BOOLEAN STIRNG -- df_str2 = false; -- STRING -- df_str3 = 1; df_str4 = 1; df_str5 = 1; -- Color Boolean -- df_str = 1000; return true; end ------------------------------------------------------------------------ -- ABOUT FORM -- function tf.main( ) -- CREATE THE ABOUT FORM -- tf.about = createForm( true ); -- TITLE OF THE FORM -- control_setCaption( tf.about, "About" ); -- SIZE OF THE FORM -- control_setSize( tf.about, 280, 50 ); -- TIMER -- tf.tmr = timer( tf.about, 1, true, tf_tmr ); -- LABEL -- tf.lbl = label( tf.about, 1, 1, "Lua trainer Example by hack0535\n" .. "Visit www.Forum.CheatEngine.Org for more Cheats\n" .. "Thank`s For Darkbyte and [Wiccaan]" ); -- STRING -- tf_str = 0; end --------------------------------------------------------------------------- -- FUNC OF TIMER OF LEVEL MOVING LABEL -- function df_tmr2( ) df_str4 = df_str4 +1 control_setPosition( df.lbl, df_str4, df_str4 ); if ( df_str4 == 30 ) then timer_setEnabled( df.tmr2, false ); end end -- FUNC OF ABOUT BUTTON -- function df_bt3( ) tf.main(); end -- FUNC OF TIMER OF SLIDING FORM MAIN WINDOW -- function df_tmr3( ) df_str5 = df_str5 +2 control_setPosition( df.form, df_str5, 300 ); if ( df_str5 == 515 ) then timer_setEnabled( df.tmr3, false ); end end -- FUNC OF TIMER OF SLIDING FORM ABOUT WINDOW -- function tf_tmr( ) tf_str = tf_str +2 control_setPosition( tf.about, 500, tf_str ); if ( tf_str == 400 ) then timer_setEnabled( tf.tmr, false ); end end -- FUNC OF BUTTON INCREASE THE SPEED -- function df_bt2( ) df_str3 = df_str3 +1 speedhack_setSpeed( df_str3 ); control_setCaption( df.bt2, "Inc [" .. df_str3 .. "]" ); control_setCaption( df.bt, "Dec [" .. df_str3 .. "]" ); end -- FUNC OF TIMER OF BLINKING WINDOW(CHANGING COLOR) -- function df_tmr( ) df_str = df_str +100 control_setColor( df.form, df_str ); if ( df_str == 60000 ) then df_str = 1000; end end -- FUNC OF BUTTON DECREASE SPEED -- function df_bt( ) df_str3 = df_str3 -1 speedhack_setSpeed( df_str3 ); control_setCaption( df.bt2, "Inc [" .. df_str3 .. "]" ); control_setCaption( df.bt, "Dec [" .. df_str3 .. "]" ); end -- EXECUTE THE FORMS -- df.main(); tf.main(); -- SEE THE MAIN.LUA TO THE CE MAIN DIR TO SEE MOR FUNCTION --