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 


How to make red transparent

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

Joined: 23 Apr 2016
Posts: 3

PostPosted: Sat Apr 23, 2016 8:00 am    Post subject: How to make red transparent Reply with quote

USING THIS CODE: How can i make red transparent

function FormLayeredAttributes(form,colorkey,alpha,flag)

if form==nil then return false end

colorkey = colorkey or 0x0000FF
alpha = alpha or 0xFF
flag = flag or 1

if cheatEngineIs64Bit() then

handle = readQwordLocal(userDataToInteger(form)+0x538)

script = [[
alloc(thread,128)
createthread(thread)
thread:
lea rsp,[rsp-40]
mov rcx,handle
mov edx,FFFFFFEC
call user32.GetWindowLongA
mov r8d,eax
or r8d,00080000
mov rcx,handle
mov edx,FFFFFFEC
call user32.SetWindowLongA
mov rcx,handle
mov edx,colorkey
mov r8d,alpha
mov r9d,flag
call user32.SetLayeredWindowAttributes
lea rsp,[rsp+40]
ret
]]

script=script:gsub('handle', string.format('%X',handle)):gsub('colorkey', string.format('%X',colorkey))
script=script:gsub('alpha', string.format('%X',alpha)):gsub('flag', string.format('%X',flag))

autoAssemble(script,true)
else

handle = bAnd( readQwordLocal(userDataToInteger(form)+0x330) , 0xFFFFFFFF)

script = [[
alloc(thread,128)
createthread(thread)
thread:

push -14
push handle
call user32.GetWindowLongA
or eax,80000
push eax
push -14
push handle
call user32.SetWindowLongA
push flag
push alpha
push colorkey
push handle
call user32.SetLayeredWindowAttributes

ret
]]

script=script:gsub('handle', string.format('%X',handle)):gsub('colorkey', string.format('%X',colorkey))
script=script:gsub('alpha', string.format('%X',alpha)):gsub('flag', string.format('%X',flag))

autoAssemble(script,true)
end
end

LWA_COLORKEY = 1
LWA_ALPHA = 2

MainGUI_1.BorderStyle = 'bsNone'
MainGUI_1.Color = 0x0000FF
MainGUI_1.Constraints.MinWidth = MainGUI_1.CEImage1.Width
MainGUI_1.Constraints.MinHeight = MainGUI_1.CEImage1.Height
FormLayeredAttributes(MainGUI_1, 0x0000FF, 240, LWA_COLORKEY + LWA_ALPHA)
Back to top
View user's profile Send private message AIM Address
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