Ir para conteúdo

Featured Replies

Postado

Oi gente espero que saibam me ajudar eu estou com uns errinhos em meu tibia, então um dos mais graves é que quando entra e sair do surf aparece esses dois erros em distro:

 

Screenshot_31.thumb.png.ae0c31ef4d7b3940f103edba626e3ad3.png

 

Aqui oque tem dentro do arquivo movements:

Spoiler

local function doSendMagicEffecte(pos, effect)
    addEvent(doSendMagicEffect, 9, pos, effect)
end

local waters = {11756, 4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}
                                                                      
local flie = {'4820', '4821', '4822', '4823', '4824', '4825'}
                                                                   --alterado v1.6 tabelas agora em configuration.lua!
local premium = false

function onStepIn(cid, item, position, fromPosition)

if not isPlayer(cid) or isInArray({0, 0}, getPlayerGroupId(cid)) then --alterado v1.9
return true
end
if getPlayerStorageValue(cid, 75846) >= 1 then return true end   --alterado v1.9

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

if isPlayer(cid) and not isPremium(cid) and premium == true then
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Only premium members are allowed to surf.")
   return true
end

if getCreatureOutfit(cid).lookType == 316 or getCreatureOutfit(cid).lookType == 648 then
   doSendMagicEffect(fromPosition, 136)
end

if (getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1) then
return true
end

if #getCreatureSummons(cid) == 0 then
   doPlayerSendCancel(cid, "You need a pokemon to surf.")
   doTeleportThing(cid, fromPosition, false)
   return true
end
                       --alterado v1.6
if (not isInArray(specialabilities["surf"], getPokemonName(getCreatureSummons(cid)[1]))) then 
   doPlayerSendCancel(cid, "This pokemon cannot surf.")
   doTeleportThing(cid, fromPosition, false)
   return true
end

if getPlayerStorageValue(cid, 5700) == 1 then
   doPlayerSendCancel(cid, "You can't do that while is mount in a bike!")
   doTeleportThing(cid, fromPosition, false)
   return true
end

if getPlayerStorageValue(cid, 212124) >= 1 then         --alterado v1.6
   doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!")
   doTeleportThing(cid, fromPosition, false)
   return true
end

if getPlayerStorageValue(cid, 52480) >= 1 then
   doPlayerSendCancel(cid, "You can't do it while a duel!")  --alterado v1.6
   doTeleportThing(cid, fromPosition, false)
   return true
end

if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then 
   doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!")   --alterado v1.7
   doTeleportThing(cid, fromPosition, false)
   return true
end

                                        --alterado v1.6
doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) 

local addonsurf = getPlayerSlotItem(cid, 8).uid
                local addosurf = getItemAttribute(addonsurf,"addonsurf")
                if not addosurf then
                              doSetItemAttribute(addonsurf,"addonsurf",0) 
    doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) 
                end
                if addosurf > 0 then
                                doSetCreatureOutfit(cid, {lookType = addosurf}, -1)

                end

doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1)
doChangeSpeed(cid, -(getCreatureSpeed(cid)))

local speed = 75 + PlayerSpeed + getSpeed(getCreatureSummons(cid)[1]) * 8 * speedRate
setPlayerStorageValue(cid, 54844, speed)
doChangeSpeed(cid, speed)

local pct = getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pct)

doRemoveCreature(getCreatureSummons(cid)[1])

addEvent(setPlayerStorageValue, 100, cid, 63215, 1)

local item = getPlayerSlotItem(cid, 8)
if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) <= 0 then
   addEvent(sendAuraEffect, 120, cid, auraSyst[getItemAttribute(item.uid, "aura")])    --alterado v1.8
end

if useOTClient then
   doPlayerSendCancel(cid, '12//,hide') --alterado v1.8
end

return true
end

local direffects = {9, 9, 9, 9}

function onStepOut(cid, item, position, fromPosition)

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end

    local checkpos = fromPosition
        checkpos.stackpos = 0

    if isInArray(waters, getTileInfo(checkpos).itemid) then
       if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 then
          doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1])
       end
    end

    if not isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then

        if getPlayerStorageValue(cid, 17000) >= 1 then return true end
        if getPlayerStorageValue(cid, 63215) <= 0 then return true end

        doRemoveCondition(cid, CONDITION_OUTFIT)
        setPlayerStorageValue(cid, 63215, -1)

        local item = getPlayerSlotItem(cid, 8)
        local pokemon = getItemAttribute(item.uid, "poke")
        local x = pokes[pokemon]

        if not x then return true end

        if getItemAttribute(item.uid, "nick") then
            doCreatureSay(cid, getItemAttribute(item.uid, "nick")..", I'm tired of surfing!", 1)
        else
            doCreatureSay(cid, getItemAttribute(item.uid, "poke")..", I'm tired of surfing!", 1)
        end

        doSummonMonster(cid, pokemon)
        local pk = getCreatureSummons(cid)[1]        
                local balla = getPlayerSlotItem(cid, 8).uid
                local balladdon = getItemAttribute(balla,"addon")
                if not balladdon then
                                doSetItemAttribute(balla,"addon",0) 

                end
                if balladdon > 0 then
                                doSetCreatureOutfit(pk, {lookType = balladdon}, -1)

                end
local pk = getCreatureSummons(cid)[1]        
                local balla = getPlayerSlotItem(cid, 8).uid
                local balladdon = getItemAttribute(balla,"addon")
                if not balladdon then
                                doSetItemAttribute(balla,"addon",0) 

                end
                if balladdon > 0 then
                                doSetCreatureOutfit(pk, {lookType = balladdon}, -1)

                end

        local pk = getCreatureSummons(cid)[1]

        if not isCreature(pk) then
            pk = doCreateMonster(pokemon, backupPos)
            if not isCreature(pk) then
                doPlayerSendCancel(cid, "You can't stop surfing here.")
                doTeleportThing(cid, fromPosition, false)
            return true
            end
            doConvinceCreature(cid, pk)
        end

        doChangeSpeed(pk, getCreatureSpeed(cid))
        doChangeSpeed(cid, -getCreatureSpeed(cid))
        doRegainSpeed(cid)      --alterado v1.6
        
        doTeleportThing(pk, fromPosition, false)
        doTeleportThing(pk, getThingPos(cid), true)
        doCreatureSetLookDir(pk, getCreatureLookDir(cid))

        adjustStatus(pk, item.uid, true, false, true)

        if useOTClient then
           doPlayerSendCancel(cid, '12//,show') --alterado v1.8
        end
        
    end

return true
end

 

Aqui  o que tem dentro do arquivo de actions:

Spoiler

local pokes = {
["Pikachu Super"] = {lookType=1801, speed = 1000},
["Poliwag"] = {lookType=278, speed = 320},
["Poliwhirl"] = {lookType=137, speed = 480},
["Seaking"] = {lookType=269, speed = 520},
["Dewgong"] = {lookType=183, speed = 700},
["Blastoise"] = {lookType=184, speed = 850},
["Tentacruel"] = {lookType=185, speed = 750},
["Lapras"] = {lookType=186, speed = 960},
["Gyarados"] = {lookType=187, speed = 1050},
["Omastar"] = {lookType=188, speed = 680},
["Kabutops"] = {lookType=189, speed = 840},
["Poliwrath"] = {lookType=190, speed = 680},
["Vaporeon"] = {lookType=191, speed = 800},
["Staryu"] = {lookType=266, speed = 385},
["Starmie"] = {lookType=267, speed = 685},
["Goldeen"] = {lookType=268, speed = 355},
["Seadra"] = {lookType=270, speed = 655},
["Golduck"] = {lookType=271, speed = 760},
["Squirtle"] = {lookType=273, speed = 365},
["Wartortle"] = {lookType=275, speed = 605},
["Tentacool"] = {lookType=277, speed = 340},
["Snorlax"] = {lookType=300, speed = 500},
["Piplup"] = {lookType=1211, speed = 350},
["Prinplup"] = {lookType=1210, speed = 400},
["Empoleon"] = {lookType=1213, speed = 550},
----------------Shiny----------------------
["Shiny Blastoise"] = {lookType=658, speed = 935},
["Shiny Tentacruel"] = {lookType=1014, speed = 825},
["Shiny Gyarados"] = {lookType=1030, speed = 1155},
["Shiny Vaporeon"] = {lookType=1032, speed = 880},        --alterado v1.6
["Shiny Seadra"] = {lookType=1025, speed = 720.5},
["Shiny Tentacool"] = {lookType=1013, speed = 374},
["Shiny Snorlax"] = {lookType=1035, speed = 550},
----------------Johto----------------------
["Mantine"] = {lookType=636, speed = 820},
["Totodile"] = {lookType=637, speed = 360},
["Croconow"] = {lookType=638, speed = 590},
["Feraligatr"] = {lookType=645, speed = 900},
["Marill"] = {lookType=639, speed = 340},
["Azumarill"] = {lookType=642, speed = 680},
["Quagsire"] = {lookType=643, speed = 740},
["Shiny Quagsire"] = {lookType=39, speed = 1000},
["Kingdra"] = {lookType=644, speed = 1020},
["Octillery"] = {lookType=641, speed = 600},
["Wooper"] = {lookType=640, speed = 315},
-------------sinooh----------------------
["Buizel"] = {lookType=1160, speed = 315},
["Floatzel"] = {lookType=1158, speed = 350},
["Gastrodon east"] = {lookType=1222, speed = 200},
["Gastrodon"] = {lookType=1221, speed = 200},
["Finneon"] = {lookType=1193, speed = 120},
["Lumineon"] = {lookType=1192, speed = 120},
-----------hoen-------------------------
["Walrein"] = {lookType=1406, speed = 120},
["Wingull"] = {lookType=1400, speed = 120},
["Wailmer"] = {lookType=1399, speed = 120},
["Swampert"] = {lookType=1395, speed = 120},
["Ludicolo"] = {lookType=1392, speed = 120},
["Sharpedo"] = {lookType=1388, speed = 120},
["Huntail"] = {lookType=1382, speed = 120},
["Linoone"] = {lookType=1379, speed = 120},
["Spheal"] = {lookType=1378, speed = 120},
["Mudkip"] = {lookType=1377, speed = 120},
["Whiscash"] = {lookType=1376, speed = 120},
["Marshtomp"] = {lookType=1375, speed = 120},
["Luvdisc"] = {lookType=1374, speed = 120},
["Lombre"] = {lookType=1373, speed = 120},
["Barboach"] = {lookType=1372, speed = 120},
["Shiny Lapras"] = {lookType=1709, speed = 1200},
["Shiny Milotic"] = {lookType=1594, speed = 1200},
["Milotic"] = {lookType=1492, speed = 700},
}

local configs = {
[4647] = {x = -2, y = 0},
[4645] = {x = 2, y = 0},
[4646] = {x = 0, y = 2},
[4644] = {x = 0, y = -2},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local playerpos = getCreaturePosition(cid)
if #getCreatureSummons(cid) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
return doPlayerSendCancel(cid, "You need a pokemon to surf.")
end
local 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, "This pokemon can't surf.")
end
if getPlayerStorageValue(cid, 63215) <= 0 then
doTeleportThing(cid, {x=playerpos.x+configs[itemEx.itemid].x, y=playerpos.y+configs[itemEx.itemid].y, z=playerpos.z})
setPlayerStorageValue(cid, 63215, 1)
doSetCreatureOutfit(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])], -1)
doCreatureSay(cid, "Let's surf, "..getCreatureName(getCreatureSummons(cid)[1]), 19)
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[itemEx.itemid].x, y=playerpos.y-configs[itemEx.itemid].y, z=playerpos.z})
setPlayerStorageValue(cid, 63215, 0)
doRemoveCondition(cid, CONDITION_OUTFIT)
local item = getPlayerSlotItem(cid, 8)
doCreatureSay(cid, "" .. getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")..", Im tired of surfing!", 19)
pk = doSummonCreature(getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."), getCreaturePosition(cid))
doConvinceCreature(cid, pk)
registerCreatureEvent(pk, "DiePoke")
registerCreatureEvent(pk, "Exp")
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

 

E o outro erro é no sistema de ginasio, bom primeiramente o pokemon do npc não está atacando e está dando para capitura-lo quando mata, mas não demostra nenhum erro na distro.

 

Espero que possam me ajuda ,obrigado.

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

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