Ir para conteúdo
  • 0

Erro No Creaturescript


JustinnoTibianno

Pergunta

estou com 2 erros (creio que sao dois) no meu server e quero arrumar porem nao entendo nada de script

 

>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

 

 

se alguem puder me ajudar ficarei feliz xD

Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts Recomendados

  • 0

acho que e erro em raids. ou no creaturescript. poste ai pra eu ve se axo o erro.

achei creatureevent.lua mas .xml nao achei nao,

 

´dofile('mods/scripts/pets/pets.lua')

 

function onPrepareDeath(cid, deathList)

local owner = getCreatureMaster(cid)

sendMessage(owner, "Your pet has died.")

setPlayerPet(owner, -2)

setPlayerStorageValue(owner, STORAGE.LOSTHEALTH, getPlayerStorageValue(owner, STORAGE.MAXHEALTH))

return true

end

 

function onKill(cid, target, lastHit)

if isMonster(target) then

local targetName = getCreatureName(target)

local owner = getCreatureMaster(cid)

local experienceGain = getMonsterInfo(targetName).experience

addPetExp(owner, experienceGain)

end

return true

end

 

function onLogin(cid)

registerCreatureEvent(cid, "PetChannelJoin")

registerCreatureEvent(cid, "PetChannelLeave")

registerCreatureEvent(cid, "PetLogout")

return true

end

 

function onLogout(cid)

local pet = getPlayerPet(cid)

if not isCreature(pet) then

return true

end

maxHealth = getCreatureMaxHealth(pet)

setPlayerStorageValue(cid, STORAGE.MAXHEALTH, maxHealth)

setPlayerStorageValue(cid, STORAGE.LOSTHEALTH, maxHealth - getCreatureHealth(pet))

setPlayerPet(cid, 0)

doSendMagicEffect(getCreaturePosition(pet), CONST_ME_POFF)

doRemoveCreature(pet)

return true

end

 

function onJoinChannel(cid, channel, users)

if channel == PETS.CHANNELID then

if getPlayerPet(cid) == -1 then

return addEvent(sendMessage, 100, cid, "Voce nao tem pet, diga buy e o nome do pet para comprar.")

elseif getPlayerPet(cid) == -2 then

return addEvent(sendMessage, 100, cid, "Seu pet esta morto. Reviva ele usando 'revive'.")

end

return summonPet(cid, getPlayerLookPos(cid)) and addEvent(sendMessage, 100, cid, "Diga 'status' para ver informaçoes do seu pet.") or addEvent(sendMessage, 100, cid, "Voce nao pode sumonar seu pet aqui.")

end

return true

end

 

function onLeaveChannel (cid, channel, users)

if channel == PETS.CHANNELID then

return onLogout(cid)

end

return true

end

Link para o comentário
Compartilhar em outros sites

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