Jump to content
gunnapong

Use the / command

Recommended Posts

Hello, @gunnapong!

 

You need modified GameServer.exe with HandleChat() function. Most likely, you will see a corresponding message when starting GameServer, if this function is present. The function allows you to receive text commands from players via the local chat channel and defined in the file GameServer\resource\script\calculate\functions.lua.

 

-- Get a text input from a player via local chat channel
-- @param role is a player's character descriptor
-- @param msg is a player's message to the local chat
-- @return if 1 then message will be transferred to other players otherwise it will be blocked
function HandleChat(role, msg)

  -- Check if player entered 'bank' command
  if (msg == "/bank") then
 	OpenBank(role, role)
  	return 0
  end
  
  return 1
  
end

 


Share this post


Link to post
Share on other sites
On 9/6/2021 at 7:00 PM, V3ct0r said:

Hello, @gunnapong!

 

You need modified GameServer.exe with HandleChat() function. Most likely, you will see a corresponding message when starting GameServer, if this function is present. The function allows you to receive text commands from players via the local chat channel and defined in the file GameServer\resource\script\calculate\functions.lua.

 


-- Get a text input from a player via local chat channel
-- @param role is a player's character descriptor
-- @param msg is a player's message to the local chat
-- @return if 1 then message will be transferred to other players otherwise it will be blocked
function HandleChat(role, msg)

  -- Check if player entered 'bank' command
  if (msg == "/bank") then
 	OpenBank(role, role)
  	return 0
  end
  
  return 1
  
end

 

Thank. i want to know  How to edit or add function in gameserver.exe?

Share this post


Link to post
Share on other sites
On 9/9/2021 at 11:48 PM, gunnapong said:

Thank. i want to know  How to edit or add function in gameserver.exe?

This is too hard to explain and is the subject of a separate guide. You need some assembler knowledge and reverse engineering skills. You can find several guides in the 'Guides' section on the forum and in Google.


Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...