Postado Abril 17, 2019 6 anos @Theodorojose local config = { storage = 41651651, -- storage necessária para o script funcionar, aquele do npc. outfit_normal = {510, 511}, -- Male, Female outfit_mergulhador = {1034, 1035}, -- Male, Female speed = {320, 300, 350, 100}, -- Normal, Player, Pokémon, Loss random = = math.random(1, 150), -- para randomizar a cor dos outfits. } function onStepIn(cid) if isRiderOrFlyOrSurf(cid) then doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[4]) end if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) elseif getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) return true end if getCreatureOutfit(cid).lookType == config.outfit_mergulhador[1] or getCreatureOutfit(cid).lookType == config.outfit_mergulhador[2] then doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed[2]) else doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[4]) end end if isWild(cid) or isSummon(cid) then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 velocidade = pokes[getCreatureName(cid)].agility if poketype1 == "water" or poketype2 == "water" or poketype1 == "ice" or poketype2 == "ice" then -- coloque aqui os tipos de pokémon que ganham velocidade na agua doChangeSpeed(cid, velocidade+config.speed[3]) else doChangeSpeed(cid, velocidade-config.speed[4]) end end return true end function onStepOut(cid) if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = config.outfit_normal[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) doChangeSpeed(cid, config.speed[1]) elseif getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = config.outfit_normal[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) doChangeSpeed(cid, config.speed[1]) return true end end if isWild(cid)or isSummon(cid) then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 velocidade = pokes[getCreatureName(cid)].agility if poketype1 == "water" or poketype2 == "water" or poketype1 == "ice" or poketype2 == "ice" then -- coloque aqui os tipos de pokémon que ganham velocidade na agua doChangeSpeed(cid, velocidade-config.speed[3]) else doChangeSpeed(cid, velocidade+config.speed[4]) end end return true end Editado Abril 17, 2019 6 anos por gabrielzika erro de digitação (veja o histórico de edições)
Postado Abril 17, 2019 6 anos Autor Funcionou 100% Mas uma ultima duvida, como faz pra tirar esse bonus de speed que os pokemons tem sobre esse piso ? Editado Abril 17, 2019 6 anos por Theodorojose (veja o histórico de edições)
Postado Abril 17, 2019 6 anos @Theodorojose local config = { storage = 41651651, -- storage necessária para o script funcionar, aquele do npc. outfit_normal = {510, 511}, -- Male, Female outfit_mergulhador = {1034, 1035}, -- Male, Female speed = {320, 300, 100}, -- Normal, Player, Loss random = = math.random(1, 150), -- para randomizar a cor dos outfits. } function onStepIn(cid) if isRiderOrFlyOrSurf(cid) then doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[3]) end if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) elseif getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) return true end if getCreatureOutfit(cid).lookType == config.outfit_mergulhador[1] or getCreatureOutfit(cid).lookType == config.outfit_mergulhador[2] then doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed[2]) else doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[3]) end end return true end function onStepOut(cid) if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = config.outfit_normal[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) doChangeSpeed(cid, config.speed[1]) elseif getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = config.outfit_normal[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1) doChangeSpeed(cid, config.speed[1]) return true end end return true end
Postado Abril 17, 2019 6 anos Autor Pra ajudar agora isso: Ja tentei refazer a linha 1 ate a 4 e continua nesse erro [17/04/2019 19:42:47] [Error - LuaScriptInterface::loadFile] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï' [17/04/2019 19:42:47] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/nadinha.lua) [17/04/2019 19:42:47] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï' [17/04/2019 19:42:47] [Error - LuaScriptInterface::loadFile] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï' [17/04/2019 19:42:47] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/nadinha.lua) [17/04/2019 19:42:47] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï'
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.