Ir para conteúdo

Posts Recomendados

Boa noite gente , to com dois scrip que ta dando erro aki um e o do talkactions de chekar a quantidade de mana e life fica dando esse erro: Desde ja agradecido.

Citar


 

[19/04/2014 22:30:10] [Error - TalkAction Interface]

[19/04/2014 22:30:10] data/talkactions/scripts/lifemana.lua:onSay
[19/04/2014 22:30:10] Description:
[19/04/2014 22:30:10] data/talkactions/scripts/lifemana.lua:6: attempt to call global 'getCreatureHealth' (a nil value)
[19/04/2014 22:30:10] stack traceback:
[19/04/2014 22:30:10] data/talkactions/scripts/lifemana.lua:6: in function <data/talkactions/scripts/lifemana.lua:1>

E o outro e o system pet que quando da use no item na area no pvp da esse erro aki :

Citar


 

 

[19/04/2014 22:30:16] [Error - Action Interface]
[19/04/2014 22:30:16] data/actions/scripts/simple_pet.lua:onUse
[19/04/2014 22:30:16] Description:
[19/04/2014 22:30:16] (luaDoConvinceCreature) Creature not found

Aki estao os script

 

function onUse(cid, item, frompos, item2, topos)

local dolls = {
[12596] = {pet = "Souleater Pet"},
[10542] = {pet = "Medusa Pet"},
[10529] = {pet = "Sea Serpent Pet"},
[12612] = {pet = "Cobra Pet"},
[11393] = {pet = "Orc Rider Pet"},
[11391] = {pet = "Ferumbras Pet"},
[11360] = {pet = "Ghastly Dragon Pet"},
[11205] = {pet = "Toad Pet"},
[11201] = {pet = "Mummy Pet"},
[10543] = {pet = "Triple Medusa Pet"},
[10530] = {pet = "Bug Pet"},
[9007] = {pet = "Spider Pet"},
[5791] = {pet = "Baby Dragon Pet"},
[6568] = {pet = "Panda pet"},
}
local go = dolls[item.itemid]
local summon = getCreatureSummons(cid)
if #summon >= 1 then
for _, pid in ipairs(summon) do
doRemoveCreature(pid)
doCreatureSay(cid, "Pet Em Descanço.", TALKTYPE_ORANGE_1)
end
return true
end
doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))
doCreatureSay(cid, "Pet Sumonado.", TALKTYPE_ORANGE_1)
return true
end
Life E Mana

 

function onSay(cid, words, param)

if(words == "!mana") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have " .. getCreatureMana(cid) .. " mana now\nYou have " .. getCreatureMaxMana(cid) .. " mana to the total")
return TRUE
elseif(words == "!life") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have " .. getCreatureHealth(cid) .. " of life now\nYou have " .. getCreatureMaxHealth(cid) .. " of the total life")
return TRUE
end
end

 

Link para o comentário
https://xtibia.com/forum/topic/232104-talkactions-life-e-mana-e-pet-system/
Compartilhar em outros sites

um eu ja consegui resolver agora so falta do pet

essa aki e do comando caso alguem tenha alguma duvida que nem eu ta ae pra ajudar

o do pet system pra quem nao entendeu e assim quando o player da use no item pra sumonar o pet numa area no pvp da esse erro no distro! vlw galera ajuda ae desde ja

 

 

 

function onSay(cid, words, param)


local MP = (getCreatureMana(cid))
local MPMAX = (getCreatureMaxMana(cid))
local HP = (getCreatureHealth(cid))
local HPMAX = (getCreatureMaxHealth(cid))


if(words == "!mana") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have "..MP.." mana now\nYou have "..MPMAX.." mana to the total")
return TRUE
elseif
(words == "!life") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have "..HP.." of life now\nYou have "..HPMAX.." of the total life")
return TRUE
end
end
Link para o comentário
https://xtibia.com/forum/topic/232104-talkactions-life-e-mana-e-pet-system/#findComment-1641855
Compartilhar em outros sites

×
×
  • Criar Novo...