Ir para conteúdo

Featured Replies

Postado

Eu tenho usado esse script abaixo de Pet System, ele é meio complexo, mais quando invoca a criatura !pet orc ou qualquer outra, da esse erro abaixo:

Versão 8.60

20h0wtj.jpg

Script (talkactions):

function onSay(cid , words, param)

local textSay = {"Sim", "Não", "Talves", "Não] intendi vc poderia repetir?"}

pet = {

["orc"]= {stor=78551,price=500},

["troll"]= {stor=78552,price=300},

["cyclops"]= {stor=78553,price=500},

["lion"]= {stor=78554,price=300},

["wolf"]= {stor=78555,price=500},

["rat"]= {stor=78556,price=300},

["demon"]= {stor=78557,price=500},

}

param = string.lower(param)

if words=="!buy" then

if doPlayerRemoveMoney(cid,pet[param].price) then

setPlayerStorageValue(cid,pet[param].stor,1)

else

doPlayerSendCancel(cid,"Sorry you no have money or buying pet")

end

end

if words=="!pet" then

if #getCreatureSummons(cid) < 1 and pet[param] and getPlayerStorageValue(cid,pet[param].stor) >= 1 then

local x = doSummonCreature(param,getCreaturePosition(cid))

doConvinceCreature(cid, x)

doCreatureSay(cid,"Go "..getCreatureName .."",TALKTYPE_ORANGE_1)

else

doPlayerSendCancel(cid,"sorry no have pet")

end

elseif words=="!remove" then

if #getCreatureSummons(cid) > 0 then

doRemoveCreature(getCreatureSummons(cid)[1])

doCreatureSay(cid,"Back My Monster",TALKTYPE_ORANGE_1)

end

elseif words=="!conversar" then

if #getCreatureSummons(cid) > 0 then

doCreatureSay(cid,textSay[math.random(#texteSay)],TALKTYPE_ORANGE_1)

else

doPlayerSendCancel(cid,"sorry no have pet summoned")

end

elseif words=="!fale" then

doCreatureSay(getCreatureSummons(cid)[1],param,TALKTYPE_ORANGE_1)

end

return true

end


<talkaction words="!pet;!remove;!fale;!conversar;!buy" event="script" value="arquivo.lua" />

Editado por jNo (veja o histórico de edições)

Postado

function onSay(cid , words, param)

local textSay = {"Sim", "Não", "Talves", "Não] intendi vc poderia repetir?"}

pet = {

["orc"]= {stor=78551,price=500},

["troll"]= {stor=78552,price=300},

["cyclops"]= {stor=78553,price=500},

["lion"]= {stor=78554,price=300},

["wolf"]= {stor=78555,price=500},

["rat"]= {stor=78556,price=300},

["demon"]= {stor=78557,price=500},

} 

param  = string.lower(param)

if words=="!buy" then

if doPlayerRemoveMoney(cid,pet[param].price) then

setPlayerStorageValue(cid,pet[param].stor,1)

else

doPlayerSendCancel(cid,"Sorry you no have money or buying pet")

end

end

if words=="!pet"  then

if #getCreatureSummons(cid) < 1 and pet[param] and getPlayerStorageValue(cid,pet[param].stor) >= 1 then

local x = doSummonCreature(param,getCreaturePosition(cid))

doConvinceCreature(cid, x)

doCreatureSay(cid,"Go "..getCreatureName .." ",TALKTYPE_ORANGE_1)

else

doPlayerSendCancel(cid,"sorry no have pet")

end

elseif words=="!remove"  then

if #getCreatureSummons(cid) > 0 then

doRemoveCreature(getCreatureSummons(cid)[1])

doCreatureSay(cid,"Back My Monster",TALKTYPE_ORANGE_1)

end

elseif words=="!conversar" then

if #getCreatureSummons(cid) > 0 then

doCreatureSay(cid,textSay[math.random(#texteSay)],TALKTYPE_ORANGE_1)

else

doPlayerSendCancel(cid,"sorry no have pet summoned")

end

elseif words=="!fale" then

doCreatureSay(getCreatureSummons(cid)[1],param,TALKTYPE_ORANGE_1)

end

return true

end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo