Ir para conteúdo

[Ajuda] O Que Tem De Errado Com Este Script?


Ramexinho

Posts Recomendados

Gente oque tem de errado com este script fica falando no exe:

 

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Error - LuaScriptInterface::loadFile] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

[11/02/2011 11:05:12] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/heal.lua

[11/02/2011 11:05:12] data/npc/scripts/heal.lua:269: '<eof>' expected near 'end'

 

Aqui ta o script sou grato quem consseguir consserta :confused: :

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

 

function onThingMove(creature, thing, oldpos, oldstackpos, item, itemEx)

 

end

 

 

function onCreatureAppear(creature)

 

end

 

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye then.')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

 

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

 

function onCreatureSay(cid, type, msg)

msg = string.lower(msg)

if (msgcontains(msg, 'hi')) and getDistanceToCreature(cid) < 4 then

if getPlayerStorageValue(cid, 59987) == 1 then

return selfSay('You Are riding.')

end

if getPlayerStorageValue(cid, 62314) == 1 then

return selfSay('You are flying.')

end

if #getCreatureSummons(cid) >= 1 then

selfSay('Please back your Pokemon to the pokeball...')

focus = 0

talk_start = 0

return TRUE

end

 

if not getTilePzInfo(getCreaturePosition(cid)) then

return selfSay('Please enter in the Pokemon Center...')

 

end

 

-- Poke Ball

 

for slo = CONST_SLOT_FIRST, CONST_SLOT_LAST do

local item = getPlayerSlotItem(cid, slo)

if isContainer(item.uid) then

local items = getItemsInContainerById(item.uid, pokeout)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokein)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokein)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeout or item.itemid == pokein then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokein)

 

end

end

 

local items = getItemsInContainerById(item.uid, pokeout)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokein)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokein)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeout or item.itemid == pokein then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokein)

 

end

 

-- Ultra Ball

 

local items = getItemsInContainerById(item.uid, pokeoutultra)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinultra)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinultra)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutultra or item.itemid == pokeinultra then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinultra)

 

end

 

-- Poke Master

 

local items = getItemsInContainerById(item.uid, pokeoutmaster)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinmaster)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinmaster)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutmaster or item.itemid == pokeinmaster then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinmaster)

 

end

end

 

local items = getItemsInContainerById(item.uid, pokeoutmaster)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinmaster)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinmaster)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutmaster or item.itemid == pokeinmaster then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinmaster)

 

end

 

-- Super Ball

 

local items = getItemsInContainerById(item.uid, pokeoutsuper)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinmsuper)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinsuper)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutsuper or item.itemid == pokeinsuper then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinsuper)

 

end

end

 

local items = getItemsInContainerById(item.uid, pokeoutsuper)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinsuper)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinsuper)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutsuper or item.itemid == pokeinsuper then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinsuper)

 

end

 

-- Great Ball

 

local items = getItemsInContainerById(item.uid, pokeoutgreat)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinmgreat)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeingreat)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutgreat or item.itemid == pokeingreat then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeingreat)

 

end

end

 

local items = getItemsInContainerById(item.uid, pokeoutgreat)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeingreat)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeingreat)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutgreat or item.itemid == pokeingreat then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeingreat)

 

end

end

end

end

end

 

selfSay("Hello! We've restored your Pokemon to full health. We hope to see you again!")

local hp = getCreatureMaxHealth(cid)

doCreatureAddHealth(cid, hp)

doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)

 

focus = 0

talk_start = 0

end

end

end

end

end

 

function onCreatureChangeOutfit(creature)

 

end

 

Este script utiliza o LIB mais so que eu ja configurei e ta funcionando so ele que ta com problema..

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

tenta

 

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos, item, itemEx)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end

function onCreatureTurn(creature)

end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi')) and getDistanceToCreature(cid) < 4 then
if getPlayerStorageValue(cid, 59987) == 1 then 
return selfSay('You Are riding.')
end
if getPlayerStorageValue(cid, 62314) == 1 then
return selfSay('You are flying.')
end
if #getCreatureSummons(cid) >= 1 then
selfSay('Please back your Pokemon to the pokeball...')
focus = 0
talk_start = 0
return TRUE
end

if not getTilePzInfo(getCreaturePosition(cid)) then 
return selfSay('Please enter in the Pokemon Center...')

end

-- Poke Ball

for slo = CONST_SLOT_FIRST, CONST_SLOT_LAST do 
local item = getPlayerSlotItem(cid, slo) 
if isContainer(item.uid) then 
local items = getItemsInContainerById(item.uid, pokeout) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokein) 

end 

local items2 = getItemsInContainerById(item.uid, pokein) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeout or item.itemid == pokein then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokein)

end
end

local items = getItemsInContainerById(item.uid, pokeout) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokein) 

end 

local items2 = getItemsInContainerById(item.uid, pokein) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeout or item.itemid == pokein then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokein)

end

-- Ultra Ball

local items = getItemsInContainerById(item.uid, pokeoutultra) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeinultra) 

end 

local items2 = getItemsInContainerById(item.uid, pokeinultra) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeoutultra or item.itemid == pokeinultra then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeinultra)

end

-- Poke Master

local items = getItemsInContainerById(item.uid, pokeoutmaster) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeinmaster) 

end 

local items2 = getItemsInContainerById(item.uid, pokeinmaster) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeoutmaster or item.itemid == pokeinmaster then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeinmaster)

end
end

local items = getItemsInContainerById(item.uid, pokeoutmaster) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeinmaster) 

end 

local items2 = getItemsInContainerById(item.uid, pokeinmaster) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeoutmaster or item.itemid == pokeinmaster then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeinmaster)

end

-- Super Ball

local items = getItemsInContainerById(item.uid, pokeoutsuper) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeinmsuper) 

end 

local items2 = getItemsInContainerById(item.uid, pokeinsuper) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeoutsuper or item.itemid == pokeinsuper then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeinsuper)

end
end

local items = getItemsInContainerById(item.uid, pokeoutsuper) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeinsuper) 

end 

local items2 = getItemsInContainerById(item.uid, pokeinsuper) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeoutsuper or item.itemid == pokeinsuper then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeinsuper)

end

-- Great Ball

local items = getItemsInContainerById(item.uid, pokeoutgreat) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeinmgreat)

end 

local items2 = getItemsInContainerById(item.uid, pokeingreat) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 

end 

if item.itemid == pokeoutgreat or item.itemid == pokeingreat then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeingreat)

end
end

local items = getItemsInContainerById(item.uid, pokeoutgreat) 
for i,x in pairs(items) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(x, pokeingreat) 

end 

local items2 = getItemsInContainerById(item.uid, pokeingreat) 
for i,x in pairs(items2) do 
local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]")) 
doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
end 

if item.itemid == pokeoutgreat or item.itemid == pokeingreat then 
local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]")) 
doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]") 
doTransformItem(item.uid, pokeingreat)
end

selfSay("Hello! We've restored your Pokemon to full health. We hope to see you again!")
local hp = getCreatureMaxHealth(cid)
doCreatureAddHealth(cid, hp)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
focus = 0
talk_start = 0

function onCreatureChangeOutfit(creature)

end

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

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

 

function onThingMove(creature, thing, oldpos, oldstackpos, item, itemEx)

 

end

 

 

function onCreatureAppear(creature)

 

end

 

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye then.')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

 

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

msg = string.lower(msg)

if (msgcontains(msg, 'hi')) and getDistanceToCreature(cid) < 4 then

if getPlayerStorageValue(cid, 25000) == 5 then

return selfSay('Você está montando.')

end

if getPlayerStorageValue(cid, 23000) == 5 then

return selfSay('Você está voando.')

end

if #getCreatureSummons(cid) >= 1 then

selfSay('Voce precisa botar seus pokemons dentro da pokebola.')

focus = 0

talk_start = 0

return TRUE

end

 

if not getTilePzInfo(getCreaturePosition(cid)) then

return selfSay('Please enter in the Pokemon Center...')

 

end

 

-- Poke Ball

 

for slo = CONST_SLOT_FIRST, CONST_SLOT_LAST do

local item = getPlayerSlotItem(cid, slo)

if isContainer(item.uid) then

local items = getItemsInContainerById(item.uid, pokeout)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokein)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokein)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeout or item.itemid == pokein then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokein)

 

end

end

 

local items = getItemsInContainerById(item.uid, pokeout)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokein)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokein)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeout or item.itemid == pokein then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokein)

 

end

 

-- Ultra Ball

 

local items = getItemsInContainerById(item.uid, pokeoutultra)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinultra)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinultra)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutultra or item.itemid == pokeinultra then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinultra)

 

end

 

-- Poke Master

 

local items = getItemsInContainerById(item.uid, pokeoutmaster)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinmaster)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinmaster)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutmaster or item.itemid == pokeinmaster then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinmaster)

 

end

 

-- Super Ball

 

local items = getItemsInContainerById(item.uid, pokeoutsuper)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeinsuper)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeinsuper)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutsuper or item.itemid == pokeinsuper then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeinsuper)

 

end

 

-- Great Ball

 

local items = getItemsInContainerById(item.uid, pokeoutgreat)

for i,x in pairs(items) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(x, pokeingreat)

 

end

 

local items2 = getItemsInContainerById(item.uid, pokeingreat)

for i,x in pairs(items2) do

local maxh = tonumber(getItemAttribute(x, "poke"):match("/(.+)]"))

doItemSetAttribute(x, "poke", getItemAttribute(x, "poke"):sub(1, findLetter(getItemAttribute(x, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

 

end

 

if item.itemid == pokeoutgreat or item.itemid == pokeingreat then

local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..maxh.."/"..maxh.."]")

doTransformItem(item.uid, pokeingreat)

 

end

end

 

selfSay("Hello! We've restored your Pokemon to full health. We hope to see you again!")

local hp = getCreatureMaxHealth(cid)

doCreatureAddHealth(cid, hp)

doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)

 

focus = 0

talk_start = 0

end

end

 

function onCreatureChangeOutfit(creature)

 

end

 

 

Agora n ta dando erro mais ela não responde quando fala hi olha o script se tem augo errado

Fica falando que ta com eero na linha 34 ou 33 =/

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...