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 


Simple Chat Room Using CELua + JavaFX

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
Corroder
Grandmaster Cheater Supreme
Reputation: 35

Joined: 10 Apr 2015
Posts: 1448

PostPosted: Mon Mar 02, 2020 9:10 am    Post subject: Simple Chat Room Using CELua + JavaFX This post has 1 review(s) Reply with quote

Since I got an unstable connection or some problems using Lua socket, I decide to make a simple chat room app using JavaFX and embedded the java chat apps to a CT file.

This simple chat app separate by two main files is the SERVER side and CLIENT side. Below are some descriptions of this simple chat app.

I. Requirement
- Internet connection
- Cheat Engine (6.4 to latest version)
- Java runtime has installed (You can check by running the CT file and lookup if a warning message appear or not)


II. Server-side

a. Broadcast the server IP
If you as a server-side, to connect to the clients, you need to broadcast your server IP address, which means you tell to the clients what is your server IP Address.
In this example, as you can see in the attached picture, I use my ipV4 address and share it with my TRUSTED friends or family, so the clients will input my ipV4 address to connect with me as a client.
It is very important for the security risk that you WILL NOT share your personal IP address to the peoples that you don't know. It is better if you have a server IP/host IP and use this IP to share it with your clients, but NOT YOUR PERSONAL IP. You were only able to share your personal IP with peoples you are really trusted and knew.

To find out what is your IPV4 address: open command line on your computer and typing > IPCONFIG /all and find out from the result what is your IPV4 address.

When you running the CT file, it will ask your nickname chat and your server IP address. You can put your IP address there (and share that IP address with your clients).


b. Client-side
Just type your nickname for the chat room and typing the IP address shared by the server-side.


III. Make your own CT file with chat app embedded
You are able to make your own CT file if you plan it. Adding files to your CT file isn't prohibited.
To add the app chat files to your own CT file and then call it, you can see how I do that by looking at scripts post on this topic.


IV. Using this simple app chat without CE
You can open the CT file table and save the server.jar and client.jar to your local disk then run it directly.


V.Script

a. Server-side

Code:
--=================================--
-- Project : CRDR Chat             --
-- Version : 1.0                   --
-- Autohor : Corroder              --
-- Release : 02-03-2020            --
-- Desc.   : Simple chat room use  --
--           javaFX + CE           --
--           (Need Java Runtime    --
-- This is server side app.        --
--=================================--

-- #Region : GUI
if f then f.Destroy() end

f = createForm()
f.setSize(200,100)
f.Position = 'poScreenCenter'
f.BorderStyle = 'bsNone'
f.Color = 11829830
f.OnMouseDown=function()
  f.dragNow()
end

p = createPanel(f)
p.setSize(190,90)
p.setPosition(5,5)
p.Color = 16777215
p.BorderStyle = 'bsNone'
p.BevelInner = 'bsNone'
p.BevelOuter = 'bsNone'
p.OnMouseDown=function()
  f.dragNow()
end

bImgChat = createImage(p)
bImgChat.setSize(170,30)
bImgChat.setPosition(10,10)
bImgChat.Stretch = true
bImgChat.Cursor = -21
bImgChat.Picture.loadFromStream(findTableFile("btnServer.png").Stream)

delay=[[
lbl1 = createLabel(p)
lbl1.Font.Size = 12
lbl1.Font.Name = 'Verdana'
lbl1.Font.Color = 11829830
lbl1.setPosition(10,60)
lbl1.Cursor = -21
lbl1.Caption = 'Help'
]]

lbl2 = createLabel(p)
lbl2.Font.Size = 12
lbl2.Font.Name = 'Verdana'
lbl2.Font.Color = 11829830
lbl2.setPosition(145,60)
lbl2.Cursor = -21
lbl2.Caption = 'Exit'

-- #Region : Variables and Functions
function lblEnter(sender)
 sender.Font.Color = 205
end

function lblLeave(sender)
 sender.Font.Color = 11829830
end

local function bImgChatClick(sPath)
 p = TrainerOrigin or getMainForm()
 sPath = p.."\\CRDRChatServer"
 if type( sPath ) ~= "string" then return false end
 local response = os.execute( "cd " .. sPath )
 if response == 0 then
    p_server = findTableFile('Server.jar').Stream
    fn = sPath..'\\Server.jar'
    p_server.saveToFile(fn)
    shellExecute(fn)
    p_server = findTableFile('Client.jar').Stream
    fn = sPath..'\\Client.jar'
    p_server.saveToFile(fn)
    shellExecute(fn)
    return true
 else
    os.execute([[mkdir "]]..TrainerOrigin..[[\CRDRChatServer"]])
    p_server = findTableFile('Server.jar').Stream
    fn = sPath..'\\Server.jar'
    p_server.saveToFile(fn)
    shellExecute(fn)
    p_server = findTableFile('Client.jar').Stream
    fn = sPath..'\\Client.jar'
    p_server.saveToFile(fn)
    shellExecute(fn)
    return false
 end
end

function exiter()
 p_path = TrainerOrigin or getMainForm()
 p = p_path.."\\CRDRChatServer"
 os.execute("taskkill /F /IM javaw.exe")
 os.execute("taskkill /F /IM javaw.exe")
 os.remove(p_path.."\\CRDRChatServer\\Server.jar")
 os.remove(p_path.."\\CRDRChatServer\\Client.jar")
 os.execute('rd /s/q "'..p..'"')
 closeCE()
 return caFree()
end

--lbl1.OnMouseEnter = lblEnter
--lbl1.OnMouseLeave = lblLeave
lbl2.OnMouseEnter = lblEnter
lbl2.OnMouseLeave = lblLeave
bImgChat.OnClick = bImgChatClick
lbl2.OnClick = exiter



b. Client-side

Code:
--=================================--
-- Project : CRDR Chat             --
-- Version : 1.0                   --
-- Autohor : Corroder              --
-- Release : 02-03-2020            --
-- Desc.   : Simple chat room use  --
--           javaFX + CE           --
--           (Need Java Runtime    --
-- This is client side app.        --
--=================================--

-- #Region : GUI
if f then f.Destroy() end

f = createForm()
f.setSize(200,100)
f.Position = 'poScreenCenter'
f.BorderStyle = 'bsNone'
f.Color = 11829830
f.OnMouseDown=function()
  f.dragNow()
end

p = createPanel(f)
p.setSize(190,90)
p.setPosition(5,5)
p.Color = 16777215
p.BorderStyle = 'bsNone'
p.BevelInner = 'bsNone'
p.BevelOuter = 'bsNone'
p.OnMouseDown=function()
  f.dragNow()
end

bImgChat = createImage(p)
bImgChat.setSize(170,30)
bImgChat.setPosition(10,10)
bImgChat.Stretch = true
bImgChat.Cursor = -21
bImgChat.Picture.loadFromStream(findTableFile("btnClient.png").Stream)

delay=[[
lbl1 = createLabel(p)
lbl1.Font.Size = 12
lbl1.Font.Name = 'Verdana'
lbl1.Font.Color = 11829830
lbl1.setPosition(10,60)
lbl1.Cursor = -21
lbl1.Caption = 'Help'
]]

lbl2 = createLabel(p)
lbl2.Font.Size = 12
lbl2.Font.Name = 'Verdana'
lbl2.Font.Color = 11829830
lbl2.setPosition(145,60)
lbl2.Cursor = -21
lbl2.Caption = 'Exit'

-- #Region : Variables and Functions
function lblEnter(sender)
 sender.Font.Color = 205
end

function lblLeave(sender)
 sender.Font.Color = 11829830
end

local function bImgChatClick(sPath)
 p = TrainerOrigin or getMainForm()
 sPath = p.."\\CRDRChat"
 if type( sPath ) ~= "string" then return false end
 local response = os.execute( "cd " .. sPath )
 if response == 0 then
    p_server = findTableFile('Client.jar').Stream
    fn = sPath..'\\Client.jar'
    p_server.saveToFile(fn)
    return true
 else
    os.execute([[mkdir "]]..TrainerOrigin..[[\CRDRChat"]])
    p_server = findTableFile('Client.jar').Stream
    fn = sPath..'\\Client.jar'
    p_server.saveToFile(fn)
    shellExecute(fn)
    return false
 end
end

function exiter()
 p_path = TrainerOrigin or getMainForm()
 p = p_path.."\\CRDRChat"
 os.execute("taskkill /F /IM javaw.exe")
 os.remove(p_path.."\\CRDRChat\\Client.jar")
 os.execute('rd /s/q "'..p..'"')
 closeCE()
 return caFree()
end

f.Show()
--lbl1.OnMouseEnter = lblEnter
--lbl1.OnMouseLeave = lblLeave
lbl2.OnMouseEnter = lblEnter
lbl2.OnMouseLeave = lblLeave
bImgChat.OnClick = bImgChatClick
lbl2.OnClick = exiter


Good luck..

Donload source file (Copy paste your web browser:

https://mega.nz/#!qkN0ySKC!hD-VWRIw-MbML8PSCB399YAo3yd2GeSQ80nex75Cd9s



Capture2.JPG
 Description:
Open Server And Client
 Filesize:  54.89 KB
 Viewed:  3809 Time(s)

Capture2.JPG



Capture.JPG
 Description:
Simple Chat Room
 Filesize:  141.13 KB
 Viewed:  3811 Time(s)

Capture.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 19

Joined: 08 Oct 2015
Posts: 478

PostPosted: Tue Mar 10, 2020 3:51 am    Post subject: Reply with quote

Cooooooool Cool
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 35

Joined: 10 Apr 2015
Posts: 1448

PostPosted: Tue Mar 10, 2020 4:48 am    Post subject: Reply with quote

Thanks
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
FIRELESS_BOUNTY
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 113
Location: On The Moon

PostPosted: Wed Sep 16, 2020 8:41 am    Post subject: Reply with quote

it is soo F**KING EASY TO MAKE!!!
step 1 : copy
step 2 : paste
step 3 : take all the credit!!
Laughing
BTW this is EPIC!!


Last edited by FIRELESS_BOUNTY on Wed Sep 16, 2020 8:55 am; edited 1 time in total
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 35

Joined: 10 Apr 2015
Posts: 1448

PostPosted: Wed Sep 16, 2020 8:50 am    Post subject: Reply with quote

I don't care about any credit at all And possible make it using CE itself. Something like image below.

EDIT:
I am not saw your last edit before my last post.



Capture.JPG
 Description:
 Filesize:  73.7 KB
 Viewed:  637 Time(s)

Capture.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL


Last edited by Corroder on Wed Sep 16, 2020 8:57 am; edited 1 time in total
Back to top
View user's profile Send private message
FIRELESS_BOUNTY
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 113
Location: On The Moon

PostPosted: Wed Sep 16, 2020 9:03 am    Post subject: Reply with quote

I mean it is really hard to code a chat app and hard, so it is easier for ppl to just copy and paste code and then delete credit, I didn't say you need a credit and I can't make one yet, I am still learning Wink
I hope I didn't say something bad.

Edit : same as yours LOL


Last edited by FIRELESS_BOUNTY on Wed Sep 16, 2020 9:26 am; edited 2 times in total
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 35

Joined: 10 Apr 2015
Posts: 1448

PostPosted: Wed Sep 16, 2020 9:06 am    Post subject: Reply with quote

It's okay. Just misunderstood. Forget it.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
FIRELESS_BOUNTY
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 113
Location: On The Moon

PostPosted: Wed Sep 16, 2020 9:07 am    Post subject: Reply with quote

Sure Very Happy, I hope you are not mad
Back to top
View user's profile Send private message
ProB1
Advanced Cheater
Reputation: 0

Joined: 20 Jul 2019
Posts: 73
Location: At Home

PostPosted: Thu Sep 24, 2020 6:12 am    Post subject: Reply with quote

corroder do you have a discord ? if you have can i reach you ?
_________________
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions 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