Postado Janeiro 13, 2018 7 anos 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 DEPOIS QUE DESLOGO E COLOCO A BIKE
Postado Janeiro 13, 2018 7 anos 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 Janeiro 13, 2018 7 anos por Gnius (veja o histórico de edições)
Postado Janeiro 13, 2018 7 anos 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 Janeiro 14, 2018 7 anos 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.