VI
pedido

MSG AO LOGAR

Por victorcx, 03 de abr. de 2014 em Scripts

resolvido
script
5
1.1k
victorcxV
03 de abril de 2014 às 19:08

Olá gente, alguém poderia me dizer qual o script que uso para que toda vez que um player logar no meu server, aparecer uma msg que quero colocar, mas essa msg apareça na tela do player em branco não no default..

 

Sei que existe a opção no config.lua para editar msgs de login, mas aquelas aparecem no default...

 

 

esse script eu uso para quando um player pega level 8;

 

 

function onAdvance(cid, skill, oldLevel, newLevel)

if (getPlayerLevel(cid) == 8) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, you reached the level 8 and now you can already choose a vocation and to go main even. But before, you need to go until the Oracle that is in the rookgaard center, and to ask so that him you light until the island of the destiny, there you will choose among the 4 available vocations. Good luck warrior!")
end
end

quero um desse tipo, mas que aparece a mensagem toda vez que o player entrar no server..
Valeu abçs....
KluivertK
03 de abril de 2014 às 19:17
Melhor resposta

Assim?

function onLogin(cid)
 
        if isPlayer(cid) then
                doPlayerSendTextMessage(cid, 22, "Welcome "..getCreatureName(cid).."!")
        end
                return true
            end

Editado Abril 3 por Kluivert

notle2012N
03 de abril de 2014 às 19:36

data\creaturescripts\scripts\nomedoarquivo.lua

msg = [[
escreve oque
você quer aqui
blz 

]]
function onLogin(cid)
    if getCreatureName(cid) == "Account Manager" then return true end
        doPlayerSendTextMessage(cid, 22, ""..msg.."")
        return true
    end

creaturescripts.xml

<event type="login" name="nomedoarquivo" event="script" value="nomedoarquivo.lua"/>
victorcxV
03 de abril de 2014 às 20:55

KluiMaster s2 ;D

OmegaO
03 de abril de 2014 às 21:53

Tópico movido para a seção de dúvidas e pedidos resolvidos.