JU
pedido

Erro Joinchannel E Receivemail

Por JustinnoTibianno, 29 de jul. de 2012 em Scripts

erro
receivemail
joinchannel
script
17
3.2k
JustinnoTibiannoJ
29 de julho de 2012 às 16:12

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"/>

TchubakaT
29 de julho de 2012 às 16:19

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

JustinnoTibiannoJ
29 de julho de 2012 às 16:22

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

TchubakaT
29 de julho de 2012 às 16:26

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

JustinnoTibiannoJ
29 de julho de 2012 às 16:30

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

TchubakaT
29 de julho de 2012 às 16:41

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 Julho 29 por Tchubaka

JustinnoTibiannoJ
29 de julho de 2012 às 16:45

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 Julho 29 por JustinnoTibianno

TchubakaT
29 de julho de 2012 às 16:57

axo que sei oque pode ser.

vai em login.lua e adc isso.

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

JustinnoTibiannoJ
29 de julho de 2012 às 17:22

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?

TchubakaT
29 de julho de 2012 às 17:26

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.

JustinnoTibiannoJ
29 de julho de 2012 às 17:33

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

TchubakaT
29 de julho de 2012 às 17:37

vou continuar tentando =/.

vai em data/xml/chanels. abra ele .

e me manda aki.

JustinnoTibiannoJ
29 de julho de 2012 às 17:39

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>

TchubakaT
29 de julho de 2012 às 17:59

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>

JustinnoTibiannoJ
29 de julho de 2012 às 18:07

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