Ir para conteúdo
  • 0

Erro Joinchannel E Receivemail


JustinnoTibianno

Pergunta

Tem dois erros que ocorrem quando eu abro meu ot, quero arruma-los mas nao entendo nada de script, se alguem pode me ajudar

 

>Loading creaturescripts... [Error - CreatureEvent::configureEvent] No valid type for creature event: joinchannel.

[Warning - BaseEvents::loadFromXml] Cannot configure an event

[Error - CreatureEvent::configureEvent] No valid type for creature event: receivemail.

[Warning - BaseEvents::loadFromXml] Cannot configure an event

 

 

Aqui estao os sciprts:

 

SCRIPT DO RECEIVEMAIL:

function onReceiveMail(cid, sender, item, openBox)

if(openBox) then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "New mail has arrived.")

end

 

return true

end

 

 

 

JOINCHANNEL:

function onJoinChannel(cid, channelId, users)

if(channelId == CHANNEL_GUILD) then

local guildId = getPlayerGuildId(cid)

if(guildId and guildId ~= 0) then

local guildMotd = getGuildMotd(guildId)

if(guildMotd and guildMotd ~= "") then

addEvent(doPlayerSendChannelMessage, 150, cid, "", "Comand for Leaders: /guid - Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)

end

end

end

 

return true

end

 

E aqui estao as tags no craturescript.xml:

 

<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>

<event type="receivemail" name="Mail" event="script" value="mail.lua"/>

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

guildmotd



function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId ~= LUA_ERROR) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end

return TRUE
end

agora o mail.lua



function onReceiveMail(cid, sender, item, openBox)
if(openBox == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "New mail has arrived.")
end

return TRUE
end

Link para o comentário
Compartilhar em outros sites

  • 0

guildmotd



function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId ~= LUA_ERROR) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end

return TRUE
end

agora o mail.lua



function onReceiveMail(cid, sender, item, openBox)
if(openBox == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "New mail has arrived.")
end

return TRUE
end

continua os erros =s

Link para o comentário
Compartilhar em outros sites

  • 0

uso esse . tenta ai.


function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId and guildId ~= 0) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd and guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Comand for Leaders: /guid - Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end

return true
end

Link para o comentário
Compartilhar em outros sites

  • 0

uso esse . tenta ai.


function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId and guildId ~= 0) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd and guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Comand for Leaders: /guid - Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end

return true
end

nao, que erro maldito nao quer sair do meu ot ;O

Link para o comentário
Compartilhar em outros sites

  • 0

pronto peguei de 1ot meu que nao tem erro nenhum.

 

mail.lua


function onReceiveMail(cid, sender, item, openBox)
if(openBox) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "New mail has arrived.")
end

return true
end

 

agora o guildmotd.lua


function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId and guildId ~= 0) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd and guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end

return true
end

 


<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>

Editado por Tchubaka
Link para o comentário
Compartilhar em outros sites

  • 0

pronto peguei de 1ot meu que nao tem erro nenhum.

 

mail.lua


function onReceiveMail(cid, sender, item, openBox)
if(openBox) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "New mail has arrived.")
end

return true
end

 

agora o guildmotd.lua


function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId and guildId ~= 0) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd and guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end

return true
end

 


<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>

nao funcionou vlw por tenta

Editado por JustinnoTibianno
Link para o comentário
Compartilhar em outros sites

  • 0

axo que sei oque pode ser.

vai em login.lua e adc isso.


registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

verifiquei la e ja tinha, mesmo assim troquei e nao resolveu o problema, caramba o que pode ser isso?

Link para o comentário
Compartilhar em outros sites

  • 0

unica esperança que tenho agora. suei . tenta isso.

vai em data/lib/ abra o 000-constant .e procure por isso.


CHANNEL_GUILD = 0

se nao tiver coloque. igual acima.

tem um desses igualzin =s vlw por tenta ajuda =x

Link para o comentário
Compartilhar em outros sites

  • 0

vou continuar tentando =/.

vai em data/xml/chanels. abra ele .

e me manda aki.

<?xml version="1.0" encoding="UTF-8"?>

<channels>

<!-- README:

0 - dynamic, reserved for guilds

1 - always acts as Party channel, only "name" tag available

6 - acts as Help channel- clientsided message

65535 - DO NOT CHANGE THE ID- only "name", "enabled", "active" and "logged" tags available

-->

<channel id="1" name="Party"/>

<channel id="2" name="Counselor" access="1"/>

<channel id="3" name="World Chat" level="2"/>

<channel id="4" name="Staff" access="3"/>

<channel id="5" name="Advertising" level="8" muted="120" conditionId="3" conditionMessage="You may only place one offer in two minutes.">

<vocation id="1-8"/>

</channel>

<channel id="6" name="Advertising-Rookgaard" level="2" muted="120" conditionId="4" conditionMessage="You may only place one offer in two minutes.">

<vocation id="0"/>

</channel>

<channel id="7" name="Help" logged="yes"/>

<channel id="8" name="English Chat" level="2"/>

<!-- <channel id="9" name="My Custom Channel"/> -->

<channel id="65535" name="Private Chat Channel"/>

</channels>

Link para o comentário
Compartilhar em outros sites

  • 0

tentai.


<channels>
<!--
README: 0 - dynamic, reserved for guilds 1 - always acts as Party channel, only "name" tag available 3 - always acts as Rule Violations channel 9 - acts as Help channel- clientsided message 65535 - DO NOT CHANGE THE ID- only "name", "enabled", "active" and "logged" tags available
-->
<channel id="1" name="Party"/>
<channel id="2" name="Staff" access="3"/>
<channel id="3" name="Rule Violations" logged="yes"/>
<channel id="4" name="Counselor" access="1"/>
<channel id="5" name="Game-Chat" level="2"/>
<channel id="6" name="Trade" level="8" muted="120" conditionId="2" conditionMessage="You may only place one offer in two minutes.">
<vocation id="1-15"/>
</channel>
<channel id="7" name="Trade-Rookgaard" level="2" muted="120" conditionId="3" conditionMessage="You may only place one offer in two minutes.">
<vocation id="0"/>
</channel>
<channel id="8" name="RL-Chat" level="2"/>
<channel id="9" name="Help" logged="yes"/>
<!-- <channel id="10" name="My Custom Channel"/> -->
<channel id="65535" name="Private Chat Channel"/>
</channels>

Link para o comentário
Compartilhar em outros sites

  • 0

tentai.


<channels>
<!--
README: 0 - dynamic, reserved for guilds 1 - always acts as Party channel, only "name" tag available 3 - always acts as Rule Violations channel 9 - acts as Help channel- clientsided message 65535 - DO NOT CHANGE THE ID- only "name", "enabled", "active" and "logged" tags available
-->
<channel id="1" name="Party"/>
<channel id="2" name="Staff" access="3"/>
<channel id="3" name="Rule Violations" logged="yes"/>
<channel id="4" name="Counselor" access="1"/>
<channel id="5" name="Game-Chat" level="2"/>
<channel id="6" name="Trade" level="8" muted="120" conditionId="2" conditionMessage="You may only place one offer in two minutes.">
<vocation id="1-15"/>
</channel>
<channel id="7" name="Trade-Rookgaard" level="2" muted="120" conditionId="3" conditionMessage="You may only place one offer in two minutes.">
<vocation id="0"/>
</channel>
<channel id="8" name="RL-Chat" level="2"/>
<channel id="9" name="Help" logged="yes"/>
<!-- <channel id="10" name="My Custom Channel"/> -->
<channel id="65535" name="Private Chat Channel"/>
</channels>

nao deu

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...