Ir para conteúdo

Featured Replies

Postado
  • Autor
2 minutos atrás, Gnius disse:

Vai em data/action/bike e poste ela aqui

local function BikeSpeedOn(cid, t)                  
setPlayerStorageValue(cid, t.s, t.speed) 
doChangeSpeed(cid, -getCreatureSpeed(cid)) 
doChangeSpeed(cid, t.speed) 
end 

local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1) 
doRegainSpeed(cid) 
end 

local t = {text='Monte, Bicicleta!', dtext='Desmontar, bicicleta!', s=5700, speed = 1000}

function onUse(cid, item, fromPosition, itemEx, toPosition)

local pos = getThingPos(cid) 

if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, "Retorne seu pokemon.")
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9
   return doPlayerSendCancel(cid, "Você não pode fazer isso agora.")
end

if getPlayerStorageValue(cid, t.s) <= 0 then
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.text, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce montou na bicicleta.')
   BikeSpeedOn(cid, t)
   if getPlayerSex(cid) == 1 then
      doSetCreatureOutfit(cid, {lookType = 1394}, -1)
   else
       doSetCreatureOutfit(cid, {lookType = 1393}, -1)
   end
else
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.dtext, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saiu da bicicleta.')
   BikeSpeedOff(cid, t)
   doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

USANDO A BIKE

image.thumb.png.4298e04a246a79b1a753e9fbf92119c5.png

 

DEPOIS QUE  DESLOGO

E COLOCO A BIKE 

image.thumb.png.8e22cc77b1f00c6da6a6294648bf9201.png

  • Respostas 15
  • Visualizações 568
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Vai em data/creaturescripts/scripts crie um arquivo chamado blockl.lua Coloque isso la dentro Vai em data/creaturescripts.xml e coloque isso la dentro  

Posted Images

Postado

Faz o seguinte

Troque o seu bike.lua por essa(já configurei para o seu servidor)

 

Spoiler

local config =
{
    velocidadeDaSuaBike = 5000, -- Velocidade da bike coloquei igual o do OtPokemon 
    outfitMale = 1394, -- Outfit MALE
    outfitFemale = 1393, -- Outfit FEMALE
    storageValue = 243656, -- Não mude
}
 
function onUse(cid, item, itemEx, fromPosition, toPosition)

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then
        doPlayerSendCancel(cid, "Você deve colocar sua bike no local correto.") -- Mensagem que da ao tentar usar a bike fora do slot (by: Lukas)
    return TRUE
end

    if getPlayerStorageValue(cid, 17001) > 0 or getPlayerStorageValue(cid, 17000) > 0 or getPlayerStorageValue(cid, 63215) > 0 then
        doPlayerSendCancel(cid, "Você não pode usar bike em situações especiais.")
    return true
end
 
    if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end
        if getPlayerStorageValue(cid, config.storageValue) <= 0 then
            local a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
            local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
            setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."")
            doChangeSpeed(cid, -getCreatureSpeed(cid))
            doChangeSpeed(cid, config.velocidadeDaSuaBike)
            setPlayerStorageValue(cid, config.storageValue, 1)        
            if getPlayerSex(cid) == 0 then
                doSetCreatureOutfit(cid, b, -1)
            else
                doSetCreatureOutfit(cid, a, -1)
            end
        else
            setPlayerStorageValue(cid, config.storageValue, 0)
            doRemoveCondition(cid, CONDITION_OUTFIT)
            doRegainSpeedLevel(cid)
       end
    return true
end

Apos ter feito isso,vai no arquivo que mandei vc criar(creaturescripts/scripts/blockl.lua)

apague tudo aquilo e coloque esse(ja configurei para seu servidor)

Spoiler

function onLogout(cid)
   if getPlayerStorageValue(cid, 17001) > 0 or getPlayerStorageValue(cid, 17000) > 0 or getPlayerStorageValue(cid, 63215) > 0 then
    doPlayerSendCancel(cid, "Você não pode deslogar em situações especiais.")
    return false
    end
       if getPlayerStorageValue(cid, 243656) > 0 then
    doPlayerSendCancel(cid, "Você não pode deslogar em quanto estiver usando bike.")
   return false
   end
  return true
end

 

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

Postado

Sobre seu primeiro bug, o goback que voce passou é do creaturescript e voce tem que mexer no do action...

Esse bug acontece com todos pokes ou so com algum de quest/box ou feito por comando? seu server é base mega?

Postado
  • Autor
4 horas atrás, choosed disse:

Sobre seu primeiro bug, o goback que voce passou é do creaturescript e voce tem que mexer no do action...

Esse bug acontece com todos pokes ou so com algum de quest/box ou feito por comando? seu server é base mega?

todos os poke de fly , surf, bicicleta . ate msm fora da boll da erro

20 horas atrás, Gnius disse:

Faz o seguinte

Troque o seu bike.lua por essa(já configurei para o seu servidor)

 

  Mostrar conteúdo oculto

local config =
{
    velocidadeDaSuaBike = 5000, -- Velocidade da bike coloquei igual o do OtPokemon 
    outfitMale = 1394, -- Outfit MALE
    outfitFemale = 1393, -- Outfit FEMALE
    storageValue = 243656, -- Não mude
}
 
function onUse(cid, item, itemEx, fromPosition, toPosition)

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then
        doPlayerSendCancel(cid, "Você deve colocar sua bike no local correto.") -- Mensagem que da ao tentar usar a bike fora do slot (by: Lukas)
    return TRUE
end

    if getPlayerStorageValue(cid, 17001) > 0 or getPlayerStorageValue(cid, 17000) > 0 or getPlayerStorageValue(cid, 63215) > 0 then
        doPlayerSendCancel(cid, "Você não pode usar bike em situações especiais.")
    return true
end
 
    if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end
        if getPlayerStorageValue(cid, config.storageValue) <= 0 then
            local a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
            local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
            setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."")
            doChangeSpeed(cid, -getCreatureSpeed(cid))
            doChangeSpeed(cid, config.velocidadeDaSuaBike)
            setPlayerStorageValue(cid, config.storageValue, 1)        
            if getPlayerSex(cid) == 0 then
                doSetCreatureOutfit(cid, b, -1)
            else
                doSetCreatureOutfit(cid, a, -1)
            end
        else
            setPlayerStorageValue(cid, config.storageValue, 0)
            doRemoveCondition(cid, CONDITION_OUTFIT)
            doRegainSpeedLevel(cid)
       end
    return true
end

Apos ter feito isso,vai no arquivo que mandei vc criar(creaturescripts/scripts/blockl.lua)

apague tudo aquilo e coloque esse(ja configurei para seu servidor)

  Ocultar conteúdo

function onLogout(cid)
   if getPlayerStorageValue(cid, 17001) > 0 or getPlayerStorageValue(cid, 17000) > 0 or getPlayerStorageValue(cid, 63215) > 0 then
    doPlayerSendCancel(cid, "Você não pode deslogar em situações especiais.")
    return false
    end
       if getPlayerStorageValue(cid, 243656) > 0 then
    doPlayerSendCancel(cid, "Você não pode deslogar em quanto estiver usando bike.")
   return false
   end
  return true
end

 

 

vlw manow

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