Jump to content

[MOD / hack] - MOTD and "new player goodies"


Mutiegenesis

Recommended Posts

edit  <installDir>/data/scripts/server/server.lua

 

modify the following bits:

 

 

function onPlayerCreated(index)

    local player = Player(index)

    Server():broadcastChatMessage("Server", 0, "Player %s created!"%_t, player.name)

    -- welcome mail

    local mail = Mail()

    mail.money = 1500

    mail.sender = "Mutant.Enterprises"

    mail.header = "Welcome!"

    mail:setResources(2000, 100, 10, 0, 0, 0, 0)

    mail.text = "Welcome to the Free Realms! Here's a starting package to boostrap your exploration. This is a dangerous galaxy, don't go alone! Don't forget to check out https://avorion.mutant.enterprises/ for maps and more!"

    player:addMail(mail)

end

 

function onFactionCreated(index)

 

end

 

function onPlayerLogIn(playerIndex)

    local player = Player(playerIndex)

    Server():broadcastChatMessage("Server", 0, "Player %s joined the galaxy"%_t, player.name)

    Server():broadcastChatMessage("Server", 0, "Visit https://avorion.mutant.enterprises/ for maps, Discord info and more!")

    player:addScriptOnce("headhunter.lua")

    player:addScriptOnce("eventscheduler.lua")

    player:addScriptOnce("story/spawnswoks.lua")

    player:addScriptOnce("story/spawnai.lua")

    player:addScriptOnce("story/spawnguardian.lua")

    player:addScriptOnce("story/spawnadventurer.lua")

    matchResources(player)

end

 

function onPlayerLogOff(playerIndex)

    local player = Player(playerIndex)

    Server():broadcastChatMessage("Server", 0, "Player %s left the galaxy, and will be missed."%_t, player.name)

 

end

Link to comment
Share on other sites

This is fantastic! Thank you so much!

 

Do you know if there is a way to affect what color message is shown in user's chat window? I was also wondering if there is a way to add prefixes to admins and mods on server before their names.

Link to comment
Share on other sites

edit  <installDir>/data/scripts/server/server.lua

 

modify the following bits:

 

 

function onPlayerCreated(index)

    local player = Player(index)

    Server():broadcastChatMessage("Server", 0, "Player %s created!"%_t, player.name)

    -- welcome mail

    local mail = Mail()

    mail.money = 1500

    mail.sender = "Mutant.Enterprises"

    mail.header = "Welcome!"

    mail:setResources(2000, 100, 10, 0, 0, 0, 0)

    mail.text = "Welcome to the Free Realms! Here's a starting package to boostrap your exploration. This is a dangerous galaxy, don't go alone! Don't forget to check out https://avorion.mutant.enterprises/ for maps and more!"

    player:addMail(mail)

end

 

function onFactionCreated(index)

 

end

 

function onPlayerLogIn(playerIndex)

    local player = Player(playerIndex)

    Server():broadcastChatMessage("Server", 0, "Player %s joined the galaxy"%_t, player.name)

    Server():broadcastChatMessage("Server", 0, "Visit https://avorion.mutant.enterprises/ for maps, Discord info and more!")

    player:addScriptOnce("headhunter.lua")

    player:addScriptOnce("eventscheduler.lua")

    player:addScriptOnce("story/spawnswoks.lua")

    player:addScriptOnce("story/spawnai.lua")

    player:addScriptOnce("story/spawnguardian.lua")

    player:addScriptOnce("story/spawnadventurer.lua")

    matchResources(player)

end

 

function onPlayerLogOff(playerIndex)

    local player = Player(playerIndex)

    Server():broadcastChatMessage("Server", 0, "Player %s left the galaxy, and will be missed."%_t, player.name)

 

end

 

das einfach nur in die Server.ini rein kopieren? verstehe ich das richtig? geht das auch bei der beta?

Link to comment
Share on other sites

This is fantastic! Thank you so much!

 

Do you know if there is a way to affect what color message is shown in user's chat window? I was also wondering if there is a way to add prefixes to admins and mods on server before their names.

 

I'm not a lua guy, atm, but the link below seems to indicate a solid maybe.  It all depends on how the devs are treating the output.  If they are using some form of terminal emulation for the output, then I would think yes.  Anyone wanna poke around here?

 

http://lua.2524044.n2.nabble.com/Colored-text-td5297072.html

Link to comment
Share on other sites

kann einer mal bitte testen und hier posten was er alles bekommen hat?

 

IP gaming-network.ddnss.de

Alles was ich sehe ist eine Standard-IIS-Seite. Ist das, was Sie erwartet haben?

 

All I see is a default Windows IIS site.  Is that what you wanted?

 

nee auf unserem server ob es funktioniert

ist ja für neue spieler wie ich es verstanden hab

Server IP: gaming-network.ddnss.de

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...