Ir para conteúdo
  • 0

Login.lua Erro


Fawkzz12

Pergunta

[12/04/2019 01:56:27] data/creaturescripts/scripts/login.lua:onLogin
[12/04/2019 01:56:27] Description: 
[12/04/2019 01:56:27] data/creaturescripts/scripts/login.lua:138: attempt to index field '?' (a nil value)
[12/04/2019 01:56:27] stack traceback:
[12/04/2019 01:56:27]     data/creaturescripts/scripts/login.lua:138: in function <data/creaturescripts/scripts/login.lua:6>
[12/04/2019 01:56:27] Sync has logged out.
 

 

o player não consegue logar e da esse erro

Link para o comentário
Compartilhar em outros sites

10 respostass a esta questão

Posts Recomendados

  • 0
6 horas atrás, Fawkzz12 disse:
Versão do Servidor: TFS - 0.3.4
Tipo de Script: creaturescript
Código:
  Mostrar conteúdo oculto


local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)

    local accountManager = getPlayerAccountManager(cid)
   if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 80 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 90)
    doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 81 and getPlayerLevel(cid) <= 149 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 80)
    doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 150 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 75)
    doCreatureSetDropLoot(cid, false)
end

    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' para modificar sua conta ou 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' Para criar sua conta ou 'recover' para recuperar sua conta.")
    end

    if getCreatureName(cid) == "Account Manager" then
        local outfit = {}
        if accountManagerRandomPokemonOutfit then
            outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}
        else
            outfit = accountManagerOutfit
        end
    
        doSetCreatureOutfit(cid, outfit, -1)
    return true
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    local outfit = {}

    if getPlayerVocation(cid) == 0 then
        doPlayerSetMaxCapacity(cid, 0)
        doPlayerSetVocation(cid, 1)
        setCreatureMaxMana(cid, 6)
        doPlayerAddSoul(cid, -getPlayerSoul(cid))
        setPlayerStorageValue(cid, 19898, 0)
            if getCreatureOutfit(cid).lookType == 128 then
                outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            elseif getCreatureOutfit(cid).lookType == 136 then
                outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            end
        doCreatureChangeOutfit(cid, outfit)
    end

    registerCreatureEvent(cid, "dropStone")
    registerCreatureEvent(cid, "ShowPokedex") --alterado v1.6
    registerCreatureEvent(cid, "ClosePokedex") --alterado v1.6 
    registerCreatureEvent(cid, "WatchTv")
    registerCreatureEvent(cid, "StopWatchingTv")
    registerCreatureEvent(cid, "WalkTv")
    registerCreatureEvent(cid, "RecordTv")
    registerCreatureEvent(cid, "PlayerLogout")
    registerCreatureEvent(cid, "WildAttack")
    registerCreatureEvent(cid, "Idle")
    registerCreatureEvent(cid, "PokemonIdle")
    registerCreatureEvent(cid, "EffectOnAdvance")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "LookSystem")
    registerCreatureEvent(cid, "T1")
    registerCreatureEvent(cid, "T2")
    registerCreatureEvent(cid, "task_count")
    registerCreatureEvent(cid, "pokemons")
    registerCreatureEvent(cid, "UpAbsolute")
    registerCreatureEvent(cid, "TopEffect")    
    registerCreatureEvent(cid, "Auravip")    
     registerCreatureEvent(cid, "tpmonster") 

    addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "Bem Vindo!!", COLOR_BURN)

    if getPlayerStorageValue(cid, 99284) == 1 then
        setPlayerStorageValue(cid, 99284, -1)
    end

    if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
       setPlayerStorageValue(cid, 6598754, -1)
       setPlayerStorageValue(cid, 6598755, -1)
       doRemoveCondition(cid, CONDITION_OUTFIT)             --alterado v1.9 \/
       doTeleportThing(cid, posBackPVP, false)
       doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    end
    
    doChangeSpeed(cid, -(getCreatureSpeed(cid)))
    
    --///////////////////////////////////////////////////////////////////////////--
    local storages = {17000, 63215, 17001, 13008, 5700}
    for s = 1, #storages do
        if not tonumber(getPlayerStorageValue(cid, storages)) then
           if s == 3 then
              setPlayerStorageValue(cid, storages, 1)
           elseif s == 4 then
              setPlayerStorageValue(cid, storages, -1)
           else   
              if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then
                 setPlayerStorageValue(cid, storages, 1)                 
              else
                 setPlayerStorageValue(cid, storages, -1) 
              end
           end
           doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright")
        end
    end
    --/////////////////////////////////////////////////////////////////////////--
    if getPlayerStorageValue(cid, 17000) >= 1 then -- fly
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        doRemoveCondition(cid, CONDITION_OUTFIT)
        doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

    local apos = getFlyingMarkedPos(cid)
    apos.stackpos = 0
        
            if getTileThingByPos(apos).itemid <= 2 then
                doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)
                doCreateItem(460, 1, getFlyingMarkedPos(cid))
            end 

    doTeleportThing(cid, apos, false)
    if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
       sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
    end  
 
    local posicao = getTownTemplePosition(getPlayerTown(cid))
    markFlyingPos(cid, posicao)
    
    elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
           sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
        end 

    elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        
        
        if rides[poke] then
           doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
           doRemoveCondition(cid, CONDITION_OUTFIT)
           doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)
           if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
              sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
           end 
        else
           setPlayerStorageValue(cid, 17001, -1)
           doRegainSpeed(cid)   
        end
    
        local posicao2 = getTownTemplePosition(getPlayerTown(cid))
        markFlyingPos(cid, posicao2)
        
    elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive
       if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then
            setPlayerStorageValue(cid, 13008, 0)
            doRegainSpeed(cid)              
            doRemoveCondition(cid, CONDITION_OUTFIT)
        return true
        end   
          
       if getPlayerSex(cid) == 1 then
          doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       else
          doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       end
       doChangeSpeed(cid, 800)

     elseif getPlayerStorageValue(cid, 5700) > 0 then   --bike
        doChangeSpeed(cid, -getCreatureSpeed(cid))
        doChangeSpeed(cid, getPlayerStorageValue(cid, 5700))  --alterado v1.8
        if getPlayerSex(cid) == 1 then
           doSetCreatureOutfit(cid, {lookType = 1676}, -1)
        else
           doSetCreatureOutfit(cid, {lookType = 1675}, -1)
        end
     
     elseif getPlayerStorageValue(cid, 75846) >= 1 then     --alterado v1.9 \/
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)  
        setPlayerStorageValue(cid, 75846, -1)
        sendMsgToPlayer(cid, 20, "You have been moved to your town!")
     else
        doRegainSpeed(cid)  
     end
    
    if getPlayerStorageValue(cid, 22545) >= 1 then
       setPlayerStorageValue(cid, 22545, -1)              
       doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
       setPlayerRecordWaves(cid)     
    end
    
if useKpdoDlls then
  doUpdateMoves(cid)
  doUpdatePokemonsBar(cid)
  onPokeHealthChange(cid)
end
doPlayerChangeModeIcon(cid)
local txt = [[
Digite /novidade
e fique por dentro de tudo oque acontece no ot!
Digite /balance
e fique por dentro de tudo que e balanceado no ot
]]
doPlayerPopupFYI(cid, txt)
    return true
end

[12/04/2019 01:56:27] data/creaturescripts/scripts/login.lua:onLogin
[12/04/2019 01:56:27] Description: 
[12/04/2019 01:56:27] data/creaturescripts/scripts/login.lua:138: attempt to index field '?' (a nil value)
[12/04/2019 01:56:27] stack traceback:
[12/04/2019 01:56:27]     data/creaturescripts/scripts/login.lua:138: in function <data/creaturescripts/scripts/login.lua:6>
[12/04/2019 01:56:27] Sync has logged out.
 

 

o player não consegue logar e da esse erro

Ola abre o login.lua aperta ctrl +f e procura ?, delete todos salve e reinicie o servidor, utilize o note pad ++ e veja na linha 138

 

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

  • 0

Coloca o script em um spoiler e posta ele

 

1 hora atrás, Fawkzz12 disse:

como pode ver ali dentro, não tem nada com "?" na linha 138

 

 

Spoiler

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid){

    local accountManager = getPlayerAccountManager(cid)
   if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 80 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 90)
    doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 81 and getPlayerLevel(cid) <= 149 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 80)
    doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 150 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 75)
    doCreatureSetDropLoot(cid, false)
end

    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' para modificar sua conta ou 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' Para criar sua conta ou 'recover' para recuperar sua conta.")
    end

    if getCreatureName(cid) == "Account Manager" then
        local outfit = {}
        if accountManagerRandomPokemonOutfit then
            outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}
        else
            outfit = accountManagerOutfit
        end
    
        doSetCreatureOutfit(cid, outfit, -1)
    return true
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    local outfit = {}

    if getPlayerVocation(cid) == 0 then
        doPlayerSetMaxCapacity(cid, 0)
        doPlayerSetVocation(cid, 1)
        setCreatureMaxMana(cid, 6)
        doPlayerAddSoul(cid, -getPlayerSoul(cid))
        setPlayerStorageValue(cid, 19898, 0)
            if getCreatureOutfit(cid).lookType == 128 then
                outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            elseif getCreatureOutfit(cid).lookType == 136 then
                outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            end
        doCreatureChangeOutfit(cid, outfit)
    end

    registerCreatureEvent(cid, "dropStone")
    registerCreatureEvent(cid, "ShowPokedex") --alterado v1.6
    registerCreatureEvent(cid, "ClosePokedex") --alterado v1.6 
    registerCreatureEvent(cid, "WatchTv")
    registerCreatureEvent(cid, "StopWatchingTv")
    registerCreatureEvent(cid, "WalkTv")
    registerCreatureEvent(cid, "RecordTv")
    registerCreatureEvent(cid, "PlayerLogout")
    registerCreatureEvent(cid, "WildAttack")
    registerCreatureEvent(cid, "Idle")
    registerCreatureEvent(cid, "PokemonIdle")
    registerCreatureEvent(cid, "EffectOnAdvance")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "LookSystem")
    registerCreatureEvent(cid, "T1")
    registerCreatureEvent(cid, "T2")
    registerCreatureEvent(cid, "task_count")
    registerCreatureEvent(cid, "pokemons")
    registerCreatureEvent(cid, "UpAbsolute")
    registerCreatureEvent(cid, "TopEffect")    
    registerCreatureEvent(cid, "Auravip")    
     registerCreatureEvent(cid, "tpmonster") 

    addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "Bem Vindo!!", COLOR_BURN)

    if getPlayerStorageValue(cid, 99284) == 1 then
        setPlayerStorageValue(cid, 99284, -1)
    end

    if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
       setPlayerStorageValue(cid, 6598754, -1)
       setPlayerStorageValue(cid, 6598755, -1)
       doRemoveCondition(cid, CONDITION_OUTFIT)             --alterado v1.9 \/
       doTeleportThing(cid, posBackPVP, false)
       doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    end
    
    doChangeSpeed(cid, -(getCreatureSpeed(cid)))
    
    --///////////////////////////////////////////////////////////////////////////--
    local storages = {17000, 63215, 17001, 13008, 5700}
    for s = 1, #storages do
        if not tonumber(getPlayerStorageValue(cid, storages)) then
           if s == 3 then
              setPlayerStorageValue(cid, storages, 1)
           elseif s == 4 then
              setPlayerStorageValue(cid, storages, -1)
           else   
              if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then
                 setPlayerStorageValue(cid, storages, 1)                 
              else
                 setPlayerStorageValue(cid, storages, -1) 
              end
           end
           doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright")
        end
    end
    --/////////////////////////////////////////////////////////////////////////--
    if getPlayerStorageValue(cid, 17000) >= 1 then -- fly
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        doRemoveCondition(cid, CONDITION_OUTFIT)
        doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

    local apos = getFlyingMarkedPos(cid)
    apos.stackpos = 0
        
            if getTileThingByPos(apos).itemid <= 2 then
                doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)
                doCreateItem(460, 1, getFlyingMarkedPos(cid))
            end 

    doTeleportThing(cid, apos, false)
    if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
       sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
    end  
 
    local posicao = getTownTemplePosition(getPlayerTown(cid))
    markFlyingPos(cid, posicao)
    
    elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
           sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
        end 

    elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        
        
        if rides[poke] then
           doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
           doRemoveCondition(cid, CONDITION_OUTFIT)
           doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)
           if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
              sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
           end 
        else
           setPlayerStorageValue(cid, 17001, -1)
           doRegainSpeed(cid)   
        end
    
        local posicao2 = getTownTemplePosition(getPlayerTown(cid))
        markFlyingPos(cid, posicao2)
        
    elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive
       if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then
            setPlayerStorageValue(cid, 13008, 0)
            doRegainSpeed(cid)              
            doRemoveCondition(cid, CONDITION_OUTFIT)
        return true
        end   
          
       if getPlayerSex(cid) == 1 then
          doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       else
          doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       end
       doChangeSpeed(cid, 800)

     elseif getPlayerStorageValue(cid, 5700) > 0 then   --bike
        doChangeSpeed(cid, -getCreatureSpeed(cid))
        doChangeSpeed(cid, getPlayerStorageValue(cid, 5700))  --alterado v1.8
        if getPlayerSex(cid) == 1 then
           doSetCreatureOutfit(cid, {lookType = 1676}, -1)
        else
           doSetCreatureOutfit(cid, {lookType = 1675}, -1)
        end
     
     elseif getPlayerStorageValue(cid, 75846) >= 1 then     --alterado v1.9 \/
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)  
        setPlayerStorageValue(cid, 75846, -1)
        sendMsgToPlayer(cid, 20, "You have been moved to your town!")
     else
        doRegainSpeed(cid)  
     end
    
    if getPlayerStorageValue(cid, 22545) >= 1 then
       setPlayerStorageValue(cid, 22545, -1)              
       doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
       setPlayerRecordWaves(cid)     
    end
    
if useKpdoDlls then
  doUpdateMoves(cid)
  doUpdatePokemonsBar(cid)
  onPokeHealthChange(cid)
end
doPlayerChangeModeIcon(cid)
local txt = [[
Digite /novidade
e fique por dentro de tudo oque acontece no ot!
Digite /balance
e fique por dentro de tudo que e balanceado no ot
]]
doPlayerPopupFYI(cid, txt)
    return true
end

faltou abrir chave na linha abaixo

function onLogin(cid) faltou {

 

 

Abaixo o config lua do server que estou trabalhando

Spoiler

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function BetaItem(cid)
    if getPlayerStorageValue(cid, storages.betaStorage) == -1 then
        doPlayerAddItem(cid,12344,50)
        doPlayerAddItem(cid,2394,50)
        doPlayerAddItem(cid,2393,50)
        doPlayerAddItem(cid,2392,50)
        doPlayerAddItem(cid,2391,50)
        doPlayerAddItem(cid,12338,2)
        doPlayerAddItem(cid,12345,50)
        doPlayerAddItem(cid,12346,50)
        doPlayerAddItem(cid,2160,1)
        doPlayerRemoveItem(cid,13758,1)
        doPlayerRemoveItem(cid,12912,1)
        doPlayerRemoveItem(cid,13371,1)
        addPokeToPlayer(cid, "Squirtle", 0, nil, "poke", true)
        addPokeToPlayer(cid, "Charmander", 0, nil, "poke", true)
        addPokeToPlayer(cid, "Bulbasaur", 0, nil, "poke", true)
        setPlayerStorageValue(cid, storages.betaStorage, 1)
        doSendMsg(cid, "Você ganhou um Pack Inicial.")
            end
        end    

function onLogin(cid)

    registerCreatureEvent(cid, "aloot_kill")
    
    if getPlayerStorageValue(cid, 92001) == 1 then
     doChangeSpeed(cid, -200)
     setPlayerStorageValue(cid, 92001, -1)
     end
     
     if getPlayerStorageValue(cid, 92002) == 1 then
     doChangeSpeed(cid, -800)
     setPlayerStorageValue(cid, 92002, -1)
     end
     
     if getPlayerStorageValue(cid, 92003) == 1 then
     doChangeSpeed(cid, -400)
     setPlayerStorageValue(cid, 92003, -1)
     end
     ---------------------BUFFS-------------- By : X ZERO
     local time = 1440
     if getPlayerStorageValue(cid, 55700) > os.time() then
     doSendMsg(cid, "BUFF PICARETA: VOCE RECEBERA MAIS FERRO AO MINERAR.")
     end
     
     if getPlayerStorageValue(cid, 55701) > os.time() then
     doSendMsg(cid, "BUFF COLHEDOR: VOCE RECEBERA MAIS FOLHAS AO COLHER ARBUSTOS.")
     end
     
     if getPlayerStorageValue(cid, 55702) > os.time() then
     doSendMsg(cid, "BUFF MACHADO: VOCE RECEBERA MAIS MADEIRA AO DERRUBAR UMA ARVORE.")
     end

     if getPlayerStorageValue(cid, 55703) > os.time() then
     doSendMsg(cid, "BUFF BAU: VOCE RECEBERA MAIS Gold Coin AO ABRIR UM BAU.")
     end
     
     if getPlayerStorageValue(cid, 55704) > os.time() then
     doSendMsg(cid, "BUFF SPEED: VOCE RECEBE +50% DE SUA SPEED ORIGINAL.")
     end
     
     if getPlayerStorageValue(cid, 55705) > os.time() then
     doSendMsg(cid, "BUFF BALL: VOCE RECEBE +50% DE RATE CHANCE CATCH EM QUALQUER BALL.")
     end
          
     if getPlayerStorageValue(cid, 85620) > os.time() then
     doSendMsg(cid, "MEGA RING: Voce esta setindo a emocao ? sua mega evolucao esta Habilitada.")
     end
     
     if getPlayerStorageValue(cid, 15800) > os.time() then
     doSendMsg(cid, "DITTO MEMORY: Esta na hora de fazer copias , seu Ditto Memory esta Habilitado.")
     end
     
     if getPlayerStorageValue(cid, 55803) == 1 then
     setPlayerStorageValue(cid,55803,-1)
     doSendMsg(cid, "Voce foi morto e trazido imediatamente para o centro pokemon ,sua exp foi protegida pela bencao de Arceus.")
     end
    ---------------------BUFFS-------------- By : X ZERO
    
    ----------------BauOnline--------------- By : X ZERO
    -------- if getPlayerStorageValue(cid, 55802) == -1 then
     --------if getPlayerStorageValue(cid, 55800) < os.time() then
     --------local time = 30
     --------setPlayerStorageValue(cid, 55800, os.time() + time * 60)
     --------doPlayerSendTextMessage(cid, 20, "Voce podera abrir seu Bau de tempo online em ".. time .." minutos, caso saia do jogo o tempo sera resetado")
     --------addEvent(function()
          --------  doPlayerSendTextMessage(cid, 20, "Seu Bau por tempo online ja esta pronto, va ate a cidade principal abri-lo")
    -------- end, 10*1000)
    -------- end
     
     --------if getPlayerStorageValue(cid, 55801) < os.time() and isPremium(cid) then
     --------local time = 30
     --------setPlayerStorageValue(cid, 55801, os.time() + time * 60)
     --------doPlayerSendTextMessage(cid, 20, "Voce podera abrir seu Bau VIP de tempo online em ".. time .." minutos, caso saia do jogo o tempo sera resetado")
    -------- addEvent(function()
          --------  doPlayerSendTextMessage(cid, 20, "Seu Bau VIP por tempo online ja esta pronto, va ate a cidade principal abri-lo")
     --------end, 1800*1000)
     --------end
     
     --------else
       --------doPlayerSendTextMessage(cid, 20, "O Tempo do bau nao foi alterado devido a sua morte , porem caso deslogue sera resetado.")
       --------setPlayerStorageValue(cid,55802,-1)
       --------return true
       --------end
     ----------------BauOnline--------------- By : X ZERO
    
    doPlayerSetVocation(cid, 10)
    doSendPlayerExtendedOpcode(cid, 126, "nao")
    doResetPlayerTVSystem(cid)
     setCreatureMaxHealth(cid, getPlayerLevel(cid) * 60)
     doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    
        if isGod(cid) then -- Resetar diarias se for God
            setPlayerStorageValue(cid, storages.miniQuests.storDayTask1, -1)
            setPlayerStorageValue(cid, storages.miniQuests.storDayTask2, -1)
            setPlayerStorageValue(cid, storages.miniQuests.storDayTask3, -1)
            setPlayerStorageValue(cid, storages.miniQuests.storDayTask4, -1)
        end
        
    if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 10 then
       doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
    else     
       doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) )
    end

    doRegainSpeed(cid)
 
 --////// storages \\\\\\-- 
   doEreaseDuel(cid)
   setPlayerStorageValue(cid, 500, -1)
   setPlayerStorageValue(cid, 8085, 0)
   --// duel
   setPlayerStorageValue(cid, storages.requestCountPlayer, 0)
   setPlayerStorageValue(cid, storages.requestCountPokemon, 0)
   setPlayerStorageValue(cid, storages.requestedPlayer, 0)
   --// duel
 --////// storages \\\\\\-- 
 
 --////// Eventos \\\\\\-- 
     registerCreatureEvent(cid, "ShowPokedex")
     registerCreatureEvent(cid, "ClosePokedex")
      registerCreatureEvent(cid, "Mail")
     registerCreatureEvent(cid, "WildAttack")
     registerCreatureEvent(cid, "GuildMotd")
     registerCreatureEvent(cid, "Idle")
     registerCreatureEvent(cid, "ReportBug")
     registerCreatureEvent(cid, "AdvanceSave")
     --Adicionados \/
     registerCreatureEvent(cid, "PlayerLogout")
     registerCreatureEvent(cid, "LookSystem")
     registerCreatureEvent(cid, "Opcode")
     registerCreatureEvent(cid, "EmeraldShop")
     registerCreatureEvent(cid, "PokeStats")
     registerCreatureEvent(cid, "PokeWalk")
     registerCreatureEvent(cid, "PokeSleep")
     registerCreatureEvent(cid, "MoveItem")
    registerCreatureEvent(cid, "task_count")
     registerCreatureEvent(cid, "UpLevel")
     registerCreatureEvent(cid, "BlockWords")
     --registerCreatureEvent(cid, "PartySystem")
     registerCreatureEvent(cid, "Target")
     registerCreatureEvent(cid, "GeneralConfiguration")
     registerCreatureEvent(cid, "EffectOnAdvance")
     registerCreatureEvent(cid, "TradeRequest")
     registerCreatureEvent(cid, "TradeAccpet")
     registerCreatureEvent(cid, "KillTask")
     registerCreatureEvent(cid, "PlayerCrown")
 --////// Eventos \\\\\\-- 
 
    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end
   
local legs = getPlayerSlotItem(cid, CONST_SLOT_LEGS)
local ball = getPlayerSlotItem(cid, 8)

    if getPlayerSlotItem(cid, CONST_SLOT_FEET).uid ~= 0 then
        doItemEraseAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "healthChanged")
    end
    --doOTCSendPokemonHealth(cid)
    --doClearPokemonStatus(cid)

    if isRiderOrFlyOrSurf(cid) and ball.uid ~= 0 then 
    local pokeName = getItemAttribute(ball.uid, "poke")
    
                    if isInArray({"ditto", "shiny ditto"}, pokeName:lower()) then
                       pokeName = getItemAttribute(ball.uid, "copyName")
                    end
    
                     local outfit = getPokemonOutfitToSkill(pokeName)
                     local speed = getPokemonSpeedToSkill(pokeName)
                         doSetCreatureOutfit(cid, {lookType = outfit + 351}, -1)
                         
                         doChangeSpeed(cid, -getCreatureSpeed(cid))
                         doChangeSpeed(cid, speed)
                         
                         local pb = getPlayerSlotItem(cid, 8).uid
                    
        
                         if isRider(cid) then
                            setPlayerStorageValue(cid, orderTalks["ride"].storage, 1)
                         elseif isFly(cid) then
                            setPlayerStorageValue(cid, orderTalks["fly"].storage, 1)
                              if not hasSqm(getThingPos(cid)) then
                              --   doCreateItem(460, 1, getThingPos(cid))
                              end
                         elseif isSurf(cid) then
                            setPlayerStorageValue(cid, orderTalks["surf"].storage, 1) -- rever o markedPos
                            doChangeSpeed(cid, -getCreatureSpeed(cid))
                            doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
                         end
                         doTeleportThing(cid, getMarkedSpawnPos(cid))
                         setPokemonGhost(cid)
    end                    
    
    setPlayerStorageValue(cid, storages.gobackDelay, -1)
    setPlayerStorageValue(cid, storages.pokedexDelay, -1)
    setPlayerStorageValue(cid, 154585, -1)
    doAddFirstItemsToPlayer(cid)
    BetaItem(cid)
    --doAddShoppingItem(cid)
        
    -- otclient life
        doSendLifePokeToOTC(cid)
    -- otclient life
    
    return true
end
function doAddFirstItemsToPlayer(cid)
local config = {
            storage = 30001,
            items = {1988, 1987, 2382, 2120, 2550, 2580, 7385, 2395}
            -- 7385 (pokeinfo)
            -- 2395 (portfoil)  ok
            -- 2382    (pokedex)    ok
            -- 2550 (order)        ok
            -- 1987 (bag)        ok
            -- 1988 (badge case)    ok
            -- 2120 (rope)        ok
            -- 2580 (fishing rod)    ok
        }
            setPlayerCap(cid, 7)
            if getPlayerStorageValue(cid, storages.BugFishing) ~= -1 then return true end
            
            if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then
            return true
            end
            
            for _, id in ipairs(config.items) do
                doPlayerAddItem(cid, id, 1)
            end
            local bag = getPlayerItemById(cid, false, 1988).uid
            doAddContainerItem(bag, 12267, 1)
            doAddContainerItem(bag, 12266, 1)
            doAddContainerItem(bag, 12264, 1)
            doAddContainerItem(bag, 12265, 1)
            doAddContainerItem(bag, 12263, 1)
            doAddContainerItem(bag, 12262, 1)
            doAddContainerItem(bag, 12261, 1)
            doAddContainerItem(bag, 12260, 1)
            setPlayerStorageValue(cid, duelTable.wins, 0)
            setPlayerStorageValue(cid, duelTable.loses, 0)
            local pokeBag = getPlayerItemById(cid, false, 1987).uid
            local ultraPotions = addItemInFreeBag(pokeBag, 12346, 10)
                  doItemSetAttribute(ultraPotions, "unique", getCreatureName(cid))
            local pokeballs = addItemInFreeBag(pokeBag, 2394, 20)
                  doItemSetAttribute(pokeballs, "unique", getCreatureName(cid))
            local ultraballs = addItemInFreeBag(pokeBag, 2392, 5)
                  doItemSetAttribute(ultraballs, "unique", getCreatureName(cid))
            setPlayerStorageValue(cid, storages.BugFishing, 1)
            doTeleportThing(cid, getTownTemplePosition(1), false)
            
end
function addSkillsToDB(cid)
        local str1 = "INSERT INTO player_skills (player_id, skillid, value, count) VALUES (" .. getPlayerGUID(cid) .. ", 5, 5, 0);"
        local str2 = "INSERT INTO player_skills (player_id, skillid, value, count) VALUES (" .. getPlayerGUID(cid) .. ", 6, 5, 0);"
            db.executeQuery(str1)
            db.executeQuery(str2)
end

 

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

  • 0

@Fawkzz12
Testa ai:
 

Spoiler

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)

    local accountManager = getPlayerAccountManager(cid)
   if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 80 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 90)
    doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 81 and getPlayerLevel(cid) <= 149 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 80)
    doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 150 then
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 75)
    doCreatureSetDropLoot(cid, false)
end

    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' para modificar sua conta ou 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' Para criar sua conta ou 'recover' para recuperar sua conta.")
    end

    if getCreatureName(cid) == "Account Manager" then
        local outfit = {}
        if accountManagerRandomPokemonOutfit then
            outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}
        else
            outfit = accountManagerOutfit
        end
    
        doSetCreatureOutfit(cid, outfit, -1)
    return true
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    local outfit = {}

    if getPlayerVocation(cid) == 0 then
        doPlayerSetMaxCapacity(cid, 0)
        doPlayerSetVocation(cid, 1)
        setCreatureMaxMana(cid, 6)
        doPlayerAddSoul(cid, -getPlayerSoul(cid))
        setPlayerStorageValue(cid, 19898, 0)
            if getCreatureOutfit(cid).lookType == 128 then
                outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            elseif getCreatureOutfit(cid).lookType == 136 then
                outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            end
        doCreatureChangeOutfit(cid, outfit)
    end

    registerCreatureEvent(cid, "dropStone")
    registerCreatureEvent(cid, "ShowPokedex") --alterado v1.6
    registerCreatureEvent(cid, "ClosePokedex") --alterado v1.6 
    registerCreatureEvent(cid, "WatchTv")
    registerCreatureEvent(cid, "StopWatchingTv")
    registerCreatureEvent(cid, "WalkTv")
    registerCreatureEvent(cid, "RecordTv")
    registerCreatureEvent(cid, "PlayerLogout")
    registerCreatureEvent(cid, "WildAttack")
    registerCreatureEvent(cid, "Idle")
    registerCreatureEvent(cid, "PokemonIdle")
    registerCreatureEvent(cid, "EffectOnAdvance")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "LookSystem")
    registerCreatureEvent(cid, "T1")
    registerCreatureEvent(cid, "T2")
    registerCreatureEvent(cid, "task_count")
    registerCreatureEvent(cid, "pokemons")
    registerCreatureEvent(cid, "UpAbsolute")
    registerCreatureEvent(cid, "TopEffect")    
    registerCreatureEvent(cid, "Auravip")    
     registerCreatureEvent(cid, "tpmonster") 

    addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "Bem Vindo!!", COLOR_BURN)

    if getPlayerStorageValue(cid, 99284) == 1 then
        setPlayerStorageValue(cid, 99284, -1)
    end

    if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
       setPlayerStorageValue(cid, 6598754, -1)
       setPlayerStorageValue(cid, 6598755, -1)
       doRemoveCondition(cid, CONDITION_OUTFIT)             --alterado v1.9 \/
       doTeleportThing(cid, posBackPVP, false)
       doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    end
    
    doChangeSpeed(cid, -(getCreatureSpeed(cid)))
    
    --///////////////////////////////////////////////////////////////////////////--
    local storages = {17000, 63215, 17001, 13008, 5700}
    for s = 1, #storages do
        if not tonumber(getPlayerStorageValue(cid, storages)) then
           if s == 3 then
              setPlayerStorageValue(cid, storages, 1)
           elseif s == 4 then
              setPlayerStorageValue(cid, storages, -1)
           else   
              if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then
                 setPlayerStorageValue(cid, storages, 1)                 
              else
                 setPlayerStorageValue(cid, storages, -1) 
              end
           end
           doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright")
        end
    end
    --/////////////////////////////////////////////////////////////////////////--
    if getPlayerStorageValue(cid, 17000) >= 1 then -- fly
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
		local look = flys[poke][1] + 351
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        doRemoveCondition(cid, CONDITION_OUTFIT)
        doSetCreatureOutfit(cid, look, -1)

    local apos = getFlyingMarkedPos(cid)
    apos.stackpos = 0
        
            if getTileThingByPos(apos).itemid <= 2 then
                doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)
                doCreateItem(460, 1, getFlyingMarkedPos(cid))
            end 

    doTeleportThing(cid, apos, false)
    if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
       sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
    end  
 
    local posicao = getTownTemplePosition(getPlayerTown(cid))
    markFlyingPos(cid, posicao)
    
    elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
           sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
        end 

    elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        
        
        if rides[poke] then
           doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
           doRemoveCondition(cid, CONDITION_OUTFIT)
           doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)
           if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
              sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
           end 
        else
           setPlayerStorageValue(cid, 17001, -1)
           doRegainSpeed(cid)   
        end
    
        local posicao2 = getTownTemplePosition(getPlayerTown(cid))
        markFlyingPos(cid, posicao2)
        
    elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive
       if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then
            setPlayerStorageValue(cid, 13008, 0)
            doRegainSpeed(cid)              
            doRemoveCondition(cid, CONDITION_OUTFIT)
        return true
        end   
          
       if getPlayerSex(cid) == 1 then
          doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       else
          doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       end
       doChangeSpeed(cid, 800)

     elseif getPlayerStorageValue(cid, 5700) > 0 then   --bike
        doChangeSpeed(cid, -getCreatureSpeed(cid))
        doChangeSpeed(cid, getPlayerStorageValue(cid, 5700))  --alterado v1.8
        if getPlayerSex(cid) == 1 then
           doSetCreatureOutfit(cid, {lookType = 1676}, -1)
        else
           doSetCreatureOutfit(cid, {lookType = 1675}, -1)
        end
     
     elseif getPlayerStorageValue(cid, 75846) >= 1 then     --alterado v1.9 \/
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)  
        setPlayerStorageValue(cid, 75846, -1)
        sendMsgToPlayer(cid, 20, "You have been moved to your town!")
     else
        doRegainSpeed(cid)  
     end
    
    if getPlayerStorageValue(cid, 22545) >= 1 then
       setPlayerStorageValue(cid, 22545, -1)              
       doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
       setPlayerRecordWaves(cid)     
    end
    
if useKpdoDlls then
  doUpdateMoves(cid)
  doUpdatePokemonsBar(cid)
  onPokeHealthChange(cid)
end
doPlayerChangeModeIcon(cid)
local txt = [[
Digite /novidade
e fique por dentro de tudo oque acontece no ot!
Digite /balance
e fique por dentro de tudo que e balanceado no ot
]]
doPlayerPopupFYI(cid, txt)
    return true
end

 

 

Link para o comentário
Compartilhar em outros sites

  • 0
16 horas atrás, Fawkzz12 disse:

nao deu certo, mostra o mesmo erro, na linha 136

Olha no banco de dados em player storage, primeiro ve o id desse char e depois da uma olhada nas storages dele, ache uma storage com valores estranhos, tipo caracteres especiais e deleta esta storage.

Link para o comentário
Compartilhar em outros sites

  • 0

@Fawkzz12 isso ocorre pq você relogou de fly em um pokémon que não está configurado direito em:

data/lib/configuration.lua

ou então relogou com a storage de fly sem estar usando um poke de fly.

 

experimenta fazer isso: 

-- doSetCreatureOutfit(cid, {lookType = flys[poke][1].lookType + 351}, -1)

comente a linha 138 desse mesmo jeito que fiz e tenta logar e veras o problema. 

Link para o comentário
Compartilhar em outros sites

  • 0

o player carrega infinitamente, mas o char dele loga e desloga e ele n sai da tela de carregamento

 

Erro

[14/04/2019 04:56:24] [Error - CreatureScript Interface] 
[14/04/2019 04:56:24] data/creaturescripts/scripts/login.lua:onLogin
[14/04/2019 04:56:24] Description: 
[14/04/2019 04:56:24] data/creaturescripts/scripts/login.lua:139: attempt to index field '?' (a number value)
[14/04/2019 04:56:24] stack traceback:
[14/04/2019 04:56:24]     data/creaturescripts/scripts/login.lua:139: in function <data/creaturescripts/scripts/login.lua:6>
[14/04/2019 04:56:24] Sad Gelasco has logged out.

Link para o comentário
Compartilhar em outros sites

  • 0
Em 14/04/2019 em 09:19, gabrielzika disse:

@Fawkzz12 encima de:

 


if getPlayerStorageValue(cid, 17000) >= 1 then

coloque:


setPlayerStorageValue(cid, 17000, 0)

 

deu certo mano, muito obrigado, unica coisa é que ele agora fica com a outfit normal e nao de fly kkk mas ja quebrou um galho.. reputado

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...