#Reportado, local errado, o correto seria "Pedido de Scripts"
Aqui está
<?xml version="1.0" encoding="UTF-8"?> <npc name="Nurse Joy" script="heal.lua" walkinterval="0" speed="0" floorchange="0"> <health now="100" max="100"/> <look type="181" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> </parameters> </npc>
script.
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {20}
local pokeballs = {'2222', '2224'}
local greatballs = {'11438','11440'}
local superballs = {'11442','11444'}
local ultraballs = {'2220','2227'}
local safariballs = {'11446','11447','11448'}
local loveballs = {'11449','11450','11451'}
local goldenballs = {'11452','11453','11454'}
local freshballs = {'11455','11456','11457'}
local darkballs = {'11458','11459','11460'}
local balls = {
[2222] = { b = 2222 },
[2224] = { b = 2222 },
[11438] = { b = 11438 },
[11440] = { b = 11438 },
[11442] = { b = 11442 },
[11444] = { b = 11442 },
[2220] = { b = 2220 },
[2227] = { b = 2220 },
[11446] = { b = 11446 },
[11447] = { b = 11446 },
[11448] = { b = 11446 },
[11449] = { b = 11449 },
[11450] = { b = 11449 },
[11451] = { b = 11449 },
[11452] = { b = 11452 },
[11453] = { b = 11452 },
[11454] = { b = 11452 },
[11455] = { b = 11455 },
[11456] = { b = 11455 },
[11457] = { b = 11455 },
[11458] = { b = 11458 },
[11459] = { b = 11458 },
[11460] = { b = 11458 },
}
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, 17001) == 1 then
return selfSay('You Are riding .')
end
if getPlayerStorageValue(cid, 7778) == 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 exhaustion.get(cid, 9211) then
selfSay('Please wait a few moment before asking me to heal your pokemons again!')
return true
end
exhaustion.set(cid, 9211, 5)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doSendMagicEffect(getThingPos(cid), 14)
feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local ball = balls[feet.itemid]
if ( ball ~= nill ) then
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, ball.b)
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
doCheckNextBag(cid,bp)
selfSay("Hello! We've restored your Pokemon to full health. We hope to see you again!")
return TRUE
end
end
function onCreatureChangeOutfit(creature)
end
function doCheckNextBag(cid,container)
local itemsInBag = {}
local bagEmptySlotCheck = 0
local bagSize = getContainerSize(container.uid)
for i = 0, getContainerSize(container.uid)-1 do
itemsInBag[i] = getContainerItem(container.uid, i)
if itemsInBag[i].itemid > 0 then
local ball = balls[itemsInBag[i].itemid]
if ( ball ~= nill ) then
local maxh = tonumber(getItemAttribute(itemsInBag[i].uid, "poke"):match("/(.+)]"))
doItemSetAttribute(itemsInBag[i].uid, "poke", getItemAttribute(itemsInBag[i].uid, "poke"):sub(1, findLetter(getItemAttribute(itemsInBag[i].uid, "poke"), "[")) .. maxh .. getItemAttribute(itemsInBag[i].uid, "poke"):sub(findLetter(getItemAttribute(itemsInBag[i].uid, "poke"), "/")))
doTransformItem(itemsInBag[i].uid, ball.b)
end
end
if isItemContainer(itemsInBag[i].itemid) then
doCheckNextBag(itemsInBag[i])
end
end
bagEmptySlotCheck = 0
end





info
Grupo: Barão
Registrado: 17/10/10
Posts: 230
Reputação: +10
Char no Tibia: Nascont
[pedido] preciso da nurcie joy que heale todos os pokes para pokemon maluco
quem poder min ajuda dou 3 rep+ em dias seguidos prometo