Postado Fevereiro 8, 2015 10 anos Olá Pessoal do TK, se estou Abrindo este Tópico na Area Errada, Favor> Corrigir! Obrigado! Galera, o erro é o Seguinte: Quando Uso a Bike, nao sai o Pokemon, e quando solto o Pokemon nao da para Usar a Bike... Gostaria da Ajuda de Voces... Bike.lua: function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 5701 local t = { [12692] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition}, } --mude o [ ] pro id do item q vai usar a bike... function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end local v, r = getCreaturePosition(cid), t[item.itemid] local s = r.s local pos = {x = v.x, y = v.y, z = v.z} if r then if getPlayerStorageValue(cid, 25000) == 5 then return end if getPlayerStorageValue(cid, 23000) == 5 then return end if #getCreatureSummons(cid) >= 1 then return end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if not isPremium(cid) then --alterei aki! doPlayerSendCancel(cid, "You can't use bike without be a premium player.") return true end if getPlayerStorageValue(cid, s) <= 0 then doSendMagicEffect(pos, 177) doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.') BikeSpeedOn(cid,999) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1503}, -1) else doSetCreatureOutfit(cid, {lookType = 1502}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doSendMagicEffect(pos, 177) doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.') BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in bike system.') end end Login.lua: local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } local flys = { ["Moltres"] = {229, 2300}, -- moltres ["Articuno"] = {230, 2100}, -- artic ["Zapdos"] = {224, 2600}, -- zapdos ["Mew"] = {232, 2200}, -- 1000 ["Mewtwo"] = {233, 2200},-- two ["Dragonite"] = {221, 1300},-- nite ["Pidgeot"] = {222, 900}, -- geot ["Fearow"] = {226, 800}, -- fearow ["Aerodactyl"] = {227, 1100}, -- aero ["Charizard"] = {216, 1000}, -- chari ["Porygon"] = {316, 600}, -- porygon ["Shiny Moltres"] = {229, 2300}, -- Shiny moltres ["Shiny Articuno"] = {1018, 2100}, -- Shiny artic ["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos ["Shiny Mew"] = {1022, 2200}, -- Shiny 1000 ["Shiny Mewtwo"] = {1021, 2200},-- Shiny two ["Shiny Dragonite"] = {1020, 1300},-- Shiny nite ["Shiny Pidgeot"] = {996, 900}, -- Shiny geot ["Shiny Fearow"] = {997, 800}, -- Shiny fearow ["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero ["Shiny Charizard"] = {995, 1000}, -- Shiny chari ["Shiny Porygon"] = {1016, 600}, -- Shiny porygon ["Porygon2"] = {648, 890}, -- 2 ["Skarmory"] = {649, 1000}, -- skarmory ["Crobat"] = {652, 1190}, -- crobat ["Staraptor"] = {1142, 985}, -- staraptor ["Shiny Staraptor"] = {1193, 985}, -- staraptor ["Salamence"] = {1373, 1300}, -- salamence ["Swellow"] = {1371, 980}, -- Swellow ["Flygon"] = {1365, 1200}, -- Flygon ["Pelipper"] = {1370, 950}, -- Pelipper ["Altaria"] = {1366, 1000}, -- Altaria ["Tropius"] = {1147, 500}, -- tropius } local rides = { ["Tauros"] = {128, 580}, -- tauros ["Ninetales"] = {129, 800}, -- kyuubi ["Rapidash"] = {130, 800}, -- rapid ["Ponyta"] = {131, 410}, -- ponyta ["Rhyhorn"] = {132, 400}, -- rhyhorn ["Arcanine"] = {12, 900}, -- arcan ["Onix"] = {126, 450}, -- onix ["Venusaur"] = {134, 390}, -- venu ["Dodrio"] = {133, 750}, -- dodrio ["Doduo"] = {135, 420}, -- doduo ["Shiny Tauros"] = {1024, 580}, -- tauros ["Shiny Ninetales"] = {999, 800}, -- kyuubi ["Shiny Rapidash"] = {1005, 800}, -- rapid ["Shiny Ponyta"] = {1004, 410}, -- ponyta ["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn ["Shiny Arcanine"] = {1003, 900}, -- arcan ["Shiny Onix"] = {1008, 450}, -- onix ["Shiny Venusaur"] = {1040, 390}, -- venu ["Shiny Dodrio"] = {1007, 750}, -- dodrio ["Shiny Doduo"] = {1006, 420}, -- doduo ["Crystal Onix"] = {293, 480}, -- cristal onix ["Steelix"] = {646, 750}, -- steelix ["Meganium"] = {685, 720}, -- meganium ["Bayleef"] = {686, 555}, -- bayleef ["Stantler"] = {687, 595}, -- stantler ["Houndoom"] = {647, 820}, -- houndoom ["Piloswine"] = {689, 450}, -- piloswine ["Mareep"] = {688, 400}, -- marip ["Absol"] = {1143, 700}, -- absol ["Camerupt"] = {1144, 690}, -- camerupt ["Mamoswine"] = {1146, 450}, -- mamoswine ["Shiny Absol"] = {1143, 700}, -- absol ["Shiny Camerupt"] = {1191, 690}, -- camerupt ["Shiny Mamoswine"] = {1188, 450}, -- mamoswine ["Shiny Luxray"] = {1192, 450}, -- luxray ["Luxray"] = {1145, 450}, -- luxray ["Luxray"] = {1145, 500}, -- luxray ["Shiny Luxray"] = {1192, 500}, -- luxray ["Shiny Bayleef"] = {1236, 500}, -- bayleef ["Shiny Meganium"] = {1235, 500}, -- meganium ["Lairon"] = {1361, 450}, -- lairon ["Shelgon"] = {1377, 850}, -- Shelgon ["Manectric"] = {1368, 900}, -- Manectric ["Mightyena"] = {1369, 900}, -- Mightyena ["Torkoal"] = {1372, 800}, -- Torkoal } local surf = { ["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}, ["Shiny Poliwag"] = {lookType=1010, speed = 320}, ["Shiny Poliwhirl"] = {lookType=1011, speed = 480}, ["Shiny Seaking"] = {lookType=1027, speed = 520}, ["Shiny Dewgong"] = {lookType=1015, speed = 700}, ["Shiny Blastoise"] = {lookType=1002, speed = 850}, ["Shiny Tentacruel"] = {lookType=1014, speed = 750}, ["Shiny Lapras"] = {lookType=1031, speed = 960}, ["Shiny Gyarados"] = {lookType=1030, speed = 1050}, ["Shiny Omastar"] = {lookType=1033, speed = 680}, ["Shiny Kabutops"] = {lookType=1034, speed = 840}, ["Shiny Poliwrath"] = {lookType=1012, speed = 680}, ["Shiny Vaporeon"] = {lookType=1032, speed = 800}, ["Shiny Staryu"] = {lookType=1028, speed = 385}, ["Shiny Starmie"] = {lookType=1029, speed = 685}, ["Shiny Goldeen"] = {lookType=1026, speed = 355}, ["Shiny Seadra"] = {lookType=1025, speed = 655}, ["Shiny Golduck"] = {lookType=1009, speed = 760}, ["Shiny Squirtle"] = {lookType=1000, speed = 365}, ["Shiny Wartortle"] = {lookType=1001, speed = 605}, ["Shiny Tentacool"] = {lookType=1013, speed = 340}, ["Shiny Snorlax"] = {lookType=1035, speed = 500}, ["Mantine"] = {lookType=636, speed = 820}, ["Totodile"] = {lookType=637, speed = 360}, ["Croconaw"] = {lookType=638, speed = 590}, ["Feraligatr"] = {lookType=645, speed = 900}, ["Marill"] = {lookType=639, speed = 340}, ["Azumarill"] = {lookType=642, speed = 680}, ["Quagsire"] = {lookType=643, speed = 740}, ["Kingdra"] = {lookType=644, speed = 1020}, ["Octillery"] = {lookType=641, speed = 600}, ["Wooper"] = {lookType=640, speed = 315}, ["Sharpedo"] = {lookType=1139, speed = 600}, ["Floatzel"] = {lookType=1138, speed = 700}, ["Swampert"] = {lookType=1135, speed = 650}, ["Marshtomp"] = {lookType=1134, speed = 502}, ["Wailord"] = {lookType=1137, speed = 450}, ["Milotic"] = {lookType=1136, speed = 780}, ["Shiny Sharpedo"] = {lookType=1141, speed = 650}, ["Shiny Floatzel"] = {lookType=1140, speed = 750}, ["Shiny Totodile"] = {lookType=1239, speed = 360}, ["Shiny Croconaw"] = {lookType=1238, speed = 590}, ["Shiny Feraligatr"] = {lookType=1237, speed = 900}, ["Barboach"] = {lookType=1354, speed = 315}, ["Whiscash"] = {lookType=1356, speed = 740}, ["Huntail"] = {lookType=1360, speed = 540}, ["Gorebyss"] = {lookType=1359, speed = 740}, ["Luvdisc"] = {lookType=1355, speed = 440}, ["Relicanth"] = {lookType=1364, speed = 500}, ["Spheal"] = {lookType=1357, speed = 300}, ["Sealeo"] = {lookType=1362, speed = 500}, ["Walrein"] = {lookType=1363, speed = 700}, } function onLogin(cid) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100) doCreatureSetDropLoot(cid, false) local accountManager = getPlayerAccountManager(cid) 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, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") 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, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") --registerCreatureEvent(cid, "Death") 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, "AuraBoost") registerCreatureEvent(cid, "RepLogin") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) 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) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf if not isInArray({4820, 4821, 4822, 4823, 4824, 4825}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 63215, -1) doChangeSpeed(cid, PlayerSpeed) doRemoveCondition(cid, CONDITION_OUTFIT) return true end local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1) doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) 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) else setPlayerStorageValue(cid, 17001, -1) doChangeSpeed(cid, PlayerSpeed) end elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then doChangeSpeed(cid, 140*getPlayerGroupId(cid)) else doChangeSpeed(cid, PlayerSpeed) end return true end
Postado Fevereiro 9, 2015 10 anos Este é um post popular. Ai meu amiguinho, espero que funcione: 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='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 9999} function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getThingPos(cid) if not isPremium(cid) then doPlayerSendCancel(cid, "Voce precisa ser premium para usar a bike.") return true 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 return doPlayerSendCancel(cid, "You can't do that right now.") end if getPlayerStorageValue(cid, t.s) <= 0 then doSendMagicEffect(pos, 177) doCreatureSay(cid, t.text, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted in a bike.') BikeSpeedOn(cid, t) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1503}, -1) else doSetCreatureOutfit(cid, {lookType = 1502}, -1) end else doSendMagicEffect(pos, 177) doCreatureSay(cid, t.dtext, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted of a bike.') BikeSpeedOff(cid, t) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Editado Fevereiro 9, 2015 10 anos por GabrielSapient (veja o histórico de edições) Ajudei? REP+ Talvez possa te ajudar: • Launcher AutoUpdate C# - Tutorial • Sprites OtPokémon 9.4 e 10.1 • Liberando espaço de sprites no old client • Deixar OTClient com zoom padrão
Postado Fevereiro 9, 2015 10 anos Ai meu amiguinho, espero que funcione: 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='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 9999} function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getThingPos(cid) if not isPremium(cid) then doPlayerSendCancel(cid, "Voce precisa ser premium para usar a bike.") return true 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 return doPlayerSendCancel(cid, "You can't do that right now.") end if getPlayerStorageValue(cid, t.s) <= 0 then doSendMagicEffect(pos, 177) doCreatureSay(cid, t.text, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted in a bike.') BikeSpeedOn(cid, t) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1503}, -1) else doSetCreatureOutfit(cid, {lookType = 1502}, -1) end else doSendMagicEffect(pos, 177) doCreatureSay(cid, t.dtext, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted of a bike.') BikeSpeedOff(cid, t) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Sempre tentei ter um precisa-se de vip, reputado Da REP +
Postado Fevereiro 9, 2015 10 anos Autor Gabriel... Nao Funcionou aki nao, Apenas Corrigiu que quando solta o Poke da certo de Montar na Bike, Mais quando ta na Bike ainda nao sai o Poke!.
Postado Fevereiro 10, 2015 10 anos Parece alguma mensagem ? Ajudei? REP+ Talvez possa te ajudar: • Launcher AutoUpdate C# - Tutorial • Sprites OtPokémon 9.4 e 10.1 • Liberando espaço de sprites no old client • Deixar OTClient com zoom padrão
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.