Jump to content

Recommended Posts

On 05/09/2017 at 3:57 AM, Pawnkdka said:

How can I add welcome notice? I have seen it in many server. ex: Hey, [Char Name] Welcome to [Server Name].

How can I add this feature?

Hey! I thought it was added by default in every server?
Try modifying the following file in your client: scripts\txt\HelpInfo.tx - that's where the welcome message is stored.

Good luck!

 

#EDIT
I'm pretty sure you can't call character name from that file, but you could give it a try... lol
More advanced messages would require a server-side script.

Edited by Faller
  • Like 1

Share this post


Link to post
Share on other sites

*Server File\resource\script\calculate
*Open AttrCalculate.lua
*Seach : CreatCha(role)
*add your message.

local cha_name = GetChaDefaultName(role)
Notice("Name Server: "..cha_name.." welcome to Server Name.")
----------------------------------------------------------|
*would stay look more or less like this.
*Example:

function CreatCha(role)

    local attr_ap = Attr_ap( role ) + 10
    SetCharaAttr( attr_ap, role, ATTR_AP ) 
    AttrRecheck(role)
 
    local hp = GetChaAttr( role, ATTR_MXHP )
    local sp = GetChaAttr( role, ATTR_MXSP )

    SetCharaAttr( hp, role, ATTR_HP )
    SetCharaAttr( sp, role, ATTR_SP )
    CreatChaSkill(role)
    
    local cha_name = GetChaDefaultName(role)
    Notice("Name Server: "..cha_name.." welcome to Server Name.")
end

 

**Message will only appear for new player entering the server.

Sorry for bad english =/

sssss.png

  • Like 3

Being better than others is for those who are weak; what matters is to be true to yourself.         

 

Share this post


Link to post
Share on other sites
16 minutes ago, 1g0rS1lv4 said:

*Server File\resource\script\calculate
*Open AttrCalculate.lua
*Seach : CreatCha(role)
*add your message.

local cha_name = GetChaDefaultName(role)
Notice("Name Server: "..cha_name.." welcome to Server Name.")
----------------------------------------------------------|
*would stay look more or less like this.
*Example:

function CreatCha(role)

    local attr_ap = Attr_ap( role ) + 10
    SetCharaAttr( attr_ap, role, ATTR_AP ) 
    AttrRecheck(role)
 
    local hp = GetChaAttr( role, ATTR_MXHP )
    local sp = GetChaAttr( role, ATTR_MXSP )

    SetCharaAttr( hp, role, ATTR_HP )
    SetCharaAttr( sp, role, ATTR_SP )
    CreatChaSkill(role)
    
    local cha_name = GetChaDefaultName(role)
    Notice("Name Server: "..cha_name.." welcome to Server Name.")
end

 

**Message will only appear for new player entering the server.

Sorry for bad english =/

sssss.png

 

Oh, nice! I thought he was talking about the message shown everytime someone logs... xD

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, AnaMutaz said:

if u looking for every time u log in u want to see the notice on red and system 

go to ur recourse/UrMapName/ctrl.lua cheak it out  

Thank you So Much

Share this post


Link to post
Share on other sites

Hello, I would like to know if I want a message every time I have a character online. see only that player Where should I write?

Edited by gunnapong

Share this post


Link to post
Share on other sites
On 8/6/2022 at 6:43 AM, gunnapong said:

Hello, I would like to know if I want a message every time I have a character online. see only that player Where should I write?

 

Open the file GameServer\resource\garner\entry.lua and add the following code:

function after_player_login_garner(entry, player_name)
   
   Notice(string.format("%s is online!", player_name))

end

 


Share this post


Link to post
Share on other sites
21 minutes ago, V3ct0r said:

 

Open the file GameServer\resource\garner\entry.lua and add the following code:


function after_player_login_garner(entry, player_name)
   
   Notice(string.format("%s is online!", player_name))

end

 

garner I don't have an entry.lua file. @V3ct0r

Share this post


Link to post
Share on other sites

Hello @gunnapong!

 

ok, I think to solve this problem you need to create a modification for the GameServer.exe. 

 

OR

 

You can also solve the problem using this script:

 

Pay attention to how functions work

-- Player entered a map event
function private:on_player_entered_map(role, mapdesc, map)
-- Player leaved a map event
function private:on_player_leaved_map(role, map)

 

BUT

 

You need to come up with a mechanism that will check that the player has connected to the server, not just changed the map.


Share this post


Link to post
Share on other sites
5 hours ago, gunnapong said:

What I want When a player enters any map, the system will display a welcome message on the left-hand side of the chat box. @V3ct0r

What is the problem? You have functions after_enter_<map name>() for any map in corresponding ctrl.lua file. This functions are called after player entered a map.


Share this post


Link to post
Share on other sites
22 hours ago, V3ct0r said:

What is the problem? You have functions after_enter_<map name>() for any map in corresponding ctrl.lua file. This functions are called after player entered a map.

My limitation is that only one player who logs in to the map can be seen and not notified across the server.

Share this post


Link to post
Share on other sites
20 hours ago, gunnapong said:

My limitation is that only one player who logs in to the map can be seen and not notified across the server.

Sorry, I think I misunderstand you. Can you describe in more detail what the problem is?


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...