Graças ao bom Deus alguem vai me ajudar..
È para postar o Script de Sufing?
Posta oque devo por no XML também ^^
function onUse(cid, item, frompos, item2, topos)
local configs = {
[4647] = {x = -2, y = 0}, -- 4647 é o id da borda oeste (lado esquerdo do player) ----- Deixa assim
[4645] = {x = 2, y = 0}, -- 4645 é o id da borda leste (lado direito do player) ----- Deixa assim
[4646] = {x = 0, y = 2}, -- 4646 é o id da borda sul (abaixo do player) ----- Deixa assim
[4644] = {x = 0, y = -2}, -- 4644 é o id da borda norte (acima do player) ----- Deixa assim
}
local playerpos = getCreaturePosition(cid)
local pokes = {
["Poliwag"] = {lookType=278, speed = 210},
["Tentacruel"] = {lookType=185, speed = 430},
["Blastoise"] = {lookType=184, speed = 500},
["Dewgong"] = {lookType=183, speed = 401},
["Kabutops"] = {lookType=189, speed = 500},
["Omastar"] = {lookType=188, speed = 550},
["Gyarados"] = {lookType=187, speed = 610},
["Poliwrath"] = {lookType=190, speed = 410},
["Shiny Gyarados"] = {lookType=529, speed = 640},
["Shiny Seadra"] = {lookType=522, speed = 530},
["Shiny Tentacruel"] = {lookType=522, speed = 460},
["Squirtle"] = {lookType=273, speed = 280},
["Shiny Blastoise"] = {lookType=523, speed = 540},
["Wartotle"] = {lookType=275, speed = 350},
['Tentacool'] = {lookType=274, speed = 340},
['Staryu'] = {lookType=266, speed = 260},
['Starmie'] = {lookType=267, speed = 450},
['Golduck'] = {lookType=271, speed = 460},
['Poliwhirl'] = {lookType=137, speed = 340},
['Tentacool'] = {lookType=277, speed = 340},
['Goldeen'] = {lookType=268, speed = 220},
['Seaking'] = {lookType=269, speed = 350},
['Seadra'] = {lookType=270, speed = 270},
['Snorlax'] = {lookType=300, speed = 511},
['Vaporeon'] = {lookType=191, speed = 360},
}
if #getCreatureSummons(cid) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
return doPlayerSendCancel(cid, "Você precisa de um pokemon para nadar.")
end
l = false
for i,x in pairs(pokes) do
if getPlayerStorageValue(cid, 63215) <= 0 and i:lower() == getCreatureName(getCreatureSummons(cid)[1]):lower() then
l = true
end
end
if not l and getPlayerStorageValue(cid, 63215) <= 0 then
return doPlayerSendCancel(cid, "Este pokemon nao possui a habilidade de nadar.")
end
if getPlayerStorageValue(cid, 63215) <= 0 then
doTeleportThing(cid, {x=playerpos.x+configs[item2.itemid].x, y=playerpos.y+configs[item2.itemid].y, z=playerpos.z})
setPlayerStorageValue(cid, 63215, 1)
doSetCreatureOutfit(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])], -1)
doCreatureSay(cid, "Vamos nadar, "..getCreatureName(getCreatureSummons(cid)[1]), 1)
setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
doChangeSpeed(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])].speed)
doRemoveCreature(getCreatureSummons(cid)[1])
else
doTeleportThing(cid, {x=playerpos.x-configs[item2.itemid].x, y=playerpos.y-configs[item2.itemid].y, z=playerpos.z})
setPlayerStorageValue(cid, 63215, 0)
doRemoveCondition(cid, CONDITION_OUTFIT)
local item = getPokeOutLive(cid)[1]
doCreatureSay(cid, "Vamos sair, " .. getItemAttribute(item, "poke"):match("This is (.-)'s pokeball."), 1)
pk = doSummonCreature(getItemAttribute(item, "poke"):match("This is (.-)'s pokeball."), getThingPosition(cid))
doConvinceCreature(cid, pk)
registerCreatureEvent(pk, "DiePoke")
registerCreatureEvent(cid, "PlayerPokeDeath")
registerCreatureEvent(cid, "LogoutPoke")
setCreatureMaxHealth(pk, getPlayerStorageValue(cid, 61209))
doCreatureAddHealth(pk, getPlayerStorageValue(cid, 61209))
doCreatureAddHealth(pk, getPlayerStorageValue(cid, 61210)-getPlayerStorageValue(cid, 61209))
doChangeSpeed(cid, getCreatureBaseSpeed(cid)-getCreatureSpeed(cid))
end
return TRUE
end
Grato =D :XTibia_smile: