É só esse o arquivo do HM? parece ter mais, pq esse só setta o atributo 'rideItem'
Você vai ter que adicionar uma linha lá pra checar se ele tem addon, caso ele tenha addon, usar a outfit da lib
Vê aí certinho se não tem mais arquivo nenhum
info
Grupo: Infante
Registrado: 22/12/12
Posts: 2k
Reputação: +736
Gênero: Masculino
Char no Tibia: Marley

É só esse o arquivo do HM? parece ter mais, pq esse só setta o atributo 'rideItem'
Você vai ter que adicionar uma linha lá pra checar se ele tem addon, caso ele tenha addon, usar a outfit da lib
Vê aí certinho se não tem mais arquivo nenhum
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+

34 minutos atrás, bXnny disse:É só esse o arquivo do HM? parece ter mais, pq esse só setta o atributo 'rideItem'
Você vai ter que adicionar uma linha lá pra checar se ele tem addon, caso ele tenha addon, usar a outfit da lib
Vê aí certinho se não tem mais arquivo nenhum
tem não, benny... ele só muda algumas linhas no order.lua, adiciona uma tabela no configuration.lua e as actions, mais nada...
Editado Fevereiro 20 por boxxer321
info
Grupo: Infante
Registrado: 22/12/12
Posts: 2k
Reputação: +736
Gênero: Masculino
Char no Tibia: Marley

então, essas linhas no order mesmo
posta ai pra nósss
info
Grupo: Colaborador
Registrado: 27/12/10
Posts: 271
Reputação: +87
Gênero: Masculino

posta seu order ai
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+

20 minutos atrás, Kuro o Shiniga disse:posta seu order ai
21 minutos atrás, bXnny disse:então, essas linhas no order mesmo
posta ai pra nósss
aqui está:
local skills = specialabilities local surfborders = {4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663} local storages = {17000, 63215, 17001, 13008, 5700} --alterado v1.9 \/ local unfix = {x = 1, y = 1, z = 1} local txt = { ["rock smash"] = {"break that rock!", "smash that rock!", "destroy that rock!", "smash it!", "break it!", "destroy it!"}, ["cut"] = {"cut that bush!", "cut it down!", "cut it off!", "cut off that bush!", "cut down that bush!", "cut that bush down!"}, ["move"] = {"move!", "move there!", "go there!", "walk there!"}, ["light"] = {"flash!", "light!", "flash this place!", "light up this place!"}, ["dig"] = {"open that hole!", "dig that hole!", "open it!", "dig it!"}, ["blink"] = {"teleport there!", "blink there!", "blink!", "teleport!"}, ["ride"] = {"let me ride you!", "let's ride!", "let me mount you!", "let me get on you!"}, ["fly"] = {"let's fly!", "let me get on you!"} , ["untransform"] = {"go back to normal!", "transform into yourself again!", "stop transformation!"}, ["headbutt"] = {"headbutt on three", "headbutt that three!", "headbutt it off"}, ["levitate_fly"] = {"let's levitate!", "let me get on you!", "let's scary someone!"}, --alterado v1.8 } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid,130130) >= 1 then doPlayerSendTextMessage(cid, 19, "Nao Pode Dar Order Nessa Area.") return true end if getPlayerStorageValue(cid,6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then doPlayerSendTextMessage(cid, 19, "[Order] Nao Pode usa Order Nessa Area.") return true end local checkpos = topos checkpos.stackpos = 0 if getTileThingByPos(checkpos).uid <= 0 then return true end --------END FLY/RIDE -------- if getCreatureCondition(cid, CONDITION_OUTFIT) and (item2.uid == cid or getRecorderPlayer(topos) == cid) and (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1) then if isInArray({460, 11675, 11676, 11677}, getTileInfo(getThingPos(cid)).itemid) then doPlayerSendCancel(cid, "You can\'t stop flying at this height!") return true end local item = getPlayerSlotItem(cid, 8) local pokemon = getItemAttribute(item.uid, "poke") local x = pokes[pokemon] if getTileInfo(getThingPos(cid)).itemid >= 4820 and getTileInfo(getThingPos(cid)).itemid <= 4825 then doPlayerSendCancel(cid, "You can\'t stop flying above the water!") return true end doSummonMonster(cid, pokemon, posgoback) if getItemAttribute(item.uid, "addonNow") then local item = getPlayerSlotItem(cid, 8) local pk = getCreatureSummons(cid)[1] local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doCreatureChangeOutfit(pk, {lookType = getItemAttribute(item.uid, "addonNow"), lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}) end local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then pk = doCreateMonster(pokemon, backupPos) if not isCreature(pk) then doPlayerSendCancel(cid, "You can't stop flying/riding here.") return true end doConvinceCreature(cid, pk) end adjustStatus(pk, item.uid, true, false, true) doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), true) if getItemAttribute(item.uid, "ehditto") or getItemAttribute(item.uid, "ehshinyditto") and not getItemAttribute(item.uid, "nick") then doCreatureSetNick(pk, "Ditto") end doPlayerSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", let me get down!", TALKTYPE_ORANGE_1) if getCreatureCondition(cid, CONDITION_PARALYZE) == true then doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(doAddCondition, 10, cid, paralizeArea) --alterado v2.4 end if getCreatureCondition(cid, CONDITION_PARALYZE) == true then doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(doAddCondition, 10, cid, paralizeArea2) --alterado v2.5 end doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 17000, -1) setPlayerStorageValue(cid, 17001, -1) return true end if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "You need a pokemon to use order!") end if getCreatureNoMove(getCreatureSummons(cid)[1]) then return true end markLP(getCreatureSummons(cid)[1], -1) if getMarkedPos(getCreatureSummons(cid)[1]).x == topos.x and getMarkedPos(getCreatureSummons(cid)[1]).y == topos.y then return true end local unfix = {x = 1, y = 1, z = 1} local thisball = getPlayerSlotItem(cid, 8) local mysum = getCreatureSummons(cid)[1] local sid = mysum or cid local maxMoveDist = getDistanceBetween(getThingPos(sid), topos) * 2 + 1 markPos(mysum, topos) markOwnerPos(mysum, getThingPos(cid)) -------- ROCK SMASH --------- if item2.itemid == 1285 and isInArray(skills["rock smash"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "smashItem") then doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["rock smash"][math.random(1, #txt["rock smash"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "rock smash", isCreature(getCreatureTarget(cid))) return true end ----------------------------- -------- HEADBUTT ----------- if item2.itemid == 12591 and isInArray(skills["headbutt"], getPokemonName(mysum)) then --alterado v1.6 --id do item arvore normal doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["headbutt"][math.random(1, #txt["headbutt"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "headbutt", isCreature(getCreatureTarget(cid))) return true end ---------------------------- -------- CUT ---------------- if item2.itemid == 2767 and isInArray(skills["cut"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "cutItem") then doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["cut"][math.random(1, #txt["cut"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "cut", isCreature(getCreatureTarget(cid))) return true end ----------------------------- -------- TRANSFORM DITTO NORMAL---------- if (getCreatureName(mysum) == "Ditto") or getItemAttribute(thisball.uid, "ehditto") == 1 and getItemAttribute(thisball.uid, "ehditto") ~= -1 and isMonster(item2.uid) and pokes[getCreatureName(item2.uid)] then local m = getCreatureMaster(cid) local p = getPlayerSlotItem(m, 8) local proibidossempre = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew", "Shiny Rhydon", "Shiny Ariados", "Shiny Magneton", "Shiny Ninetales", "Shiny Politoed", "Shiny Stantler", "Shiny Dodrio", "Shiny Espeon", "Shiny Umbreon"} -- Nunca permitir local proibidosboost = {"Shiny Dragonite", "Shiny Snorlax", "Shiny Gyarados", "Shiny Scyther"} -- Permitir se ditto for +50 local boost = getItemAttribute(thisball.uid, "boost") or 0 if getCreatureName(item2.uid) == "Ditto" or getCreatureName(item2.uid) == "Shiny Ditto" then doPlayerSendCancel(cid, "Your ditto can't transform into another ditto.") markPos(mysum, unfix) return true end if isInArray(proibidossempre, getCreatureName(item2.uid)) then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if isInArray(proibidosboost, getCreatureName(item2.uid)) and boost < 50 then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if getCreatureName(item2.uid) == getPlayerStorageValue(mysum, 1010) then doPlayerSendCancel(cid, "Your ditto is already transformed into that pokemon.") markPos(mysum, unfix) return true end markPos(mysum, unfix) local name = getCreatureName(item2.uid) setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid)) doItemSetAttribute(thisball.uid, "ehditto", 1) doItemSetAttribute(thisball.uid, "poke", getCreatureName(item2.uid)) doUpdateMoves(cid) doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1) doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER) doFaceCreature(mysum, getThingPos(item2.uid)) doSendMagicEffect(getThingPos(mysum), 184) doPlayerSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", TALKTYPE_ORANGE_1) return true end ----------------------------- -------- TRANSFORM DITTO SHINY ---------- if (getCreatureName(mysum) == "Shiny Ditto") or getItemAttribute(thisball.uid, "ehshinyditto") == 1 and getItemAttribute(thisball.uid, "ehshinyditto") ~= -1 and isMonster(item2.uid) and pokes[getCreatureName(item2.uid)] then local m = getCreatureMaster(cid) local p = getPlayerSlotItem(m, 8) local proibidossempre = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew", "Shiny Rhydon", "Shiny Ariados", "Shiny Magneton", "Shiny Ninetales", "Shiny Politoed", "Shiny Stantler", "Shiny Dodrio", "Shiny Espeon", "Shiny Umbreon"} -- Nunca permitir local proibidosboost = {"Shiny Dragonite", "Shiny Snorlax", "Shiny Gyarados", "Shiny Scyther"} -- Permitir se ditto for +50 local boost = getItemAttribute(thisball.uid, "boost") or 0 if getCreatureName(item2.uid) == "Ditto" or getCreatureName(item2.uid) == "Shiny Ditto" then doPlayerSendCancel(cid, "Your ditto can't transform into another ditto.") markPos(mysum, unfix) return true end if isInArray(proibidossempre, getCreatureName(item2.uid)) then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if isInArray(proibidosboost, getCreatureName(item2.uid)) and boost < 50 then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if getCreatureName(item2.uid) == getPlayerStorageValue(mysum, 1010) then doPlayerSendCancel(cid, "Your ditto is already transformed into that pokemon.") markPos(mysum, unfix) return true end markPos(mysum, unfix) local name = getCreatureName(item2.uid) setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid)) doItemSetAttribute(thisball.uid, "ehshinyditto", 1) doItemSetAttribute(thisball.uid, "poke", getCreatureName(item2.uid)) doUpdateMoves(cid) doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1) doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER) doFaceCreature(mysum, getThingPos(item2.uid)) doSendMagicEffect(getThingPos(mysum), 184) doCreatureSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", TALKTYPE_ORANGE_1) return true end ----------------------------- -------- LIGHT -------------- if isMonster(item2.uid) and getCreatureMaster(item2.uid) == cid and isInArray(skills["light"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "flashItem") then markPos(mysum, unfix) if not isInArray(skills["light"], getPokemonName(item2.uid)) then doPlayerSendCancel(cid, "Your pokemon can't use flash.") return true end local cd = getCD(thisball.uid, "light", 30) if cd > 0 then doPlayerSendCancel(cid, "Your pokemon is too tired to use flash. Cooldown: ("..getStringmytempo(cd)..")") return true end doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["light"][math.random(1, #txt["light"])].."", TALKTYPE_ORANGE_1) doCreatureSay(mysum, "FLASH!", TALKTYPE_MONSTER) doSendMagicEffect(getThingPos(mysum), 28) local size = 5 size = size + math.floor(getSpecialAttack(mysum) / 60) size = size + math.ceil(getPokemonLevel(mysum) / 60) if size > 11 then size = 11 end doSetCreatureLight(mysum, size, 215, 600*1000) local delay = math.floor(30 - getPokemonLevel(mysum) / 4) if delay > 0 then setCD(thisball.uid, "light", delay) end return true end ----------------------------- -------- DIG ---------------- if isInArray(skills["digholes"], item2.itemid) and isInArray(skills["dig"], getPokemonName(mysum)) then doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["dig"][math.random(1, #txt["dig"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "dig", isCreature(getCreatureTarget(cid))) return true end ----------------------------- -------- BLINK / MOVE ------- if not isCreature(item2.uid) and isInArray(skills["blink"], getPokemonName(mysum)) then local cd = getCD(thisball.uid, "blink", 30) if getPlayerStorageValue(mysum, 2365487) == 1 then return true --alterado v2.4 end if cd > 0 or not canWalkOnPos(topos, false, false, true, true, true) then doPlayerSendCancel(cid, "Blink cooldown: ("..getStringmytempo(cd)..")") doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["move"][math.random(1, #txt["move"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist) return true end local CD = isShinyName(getCreatureName(mysum)) and 20 or 30 --edited blink markPos(mysum, topos) markOwnerPos(mysum, getThingPos(cid)) setCD(thisball.uid, "blink", CD) doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["blink"][math.random(1, #txt["blink"])].."", TALKTYPE_ORANGE_1) doSendDistanceShoot(getThingPos(mysum), topos, 39) doSendMagicEffect(getThingPos(mysum), 211) doTeleportThing(mysum, topos, false) doSendMagicEffect(topos, 134) doCreatureSay(mysum, "BLINK!", TALKTYPE_MONSTER) goThere(mysum, topos, "blink", isCreature(getCreatureTarget(cid))) --edited blink return true end ----------------------------- ----START FLY or RIDE or LEVITATE --------- if (item2.uid == cid or getRecorderPlayer(topos) == cid) and (isInArray(skills["fly"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "flyItem") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "rideItem") or isInArray(skills["ride"], getPokemonName(mysum)) or isInArray(skills["levitate_fly"], getPokemonName(mysum))) then --alterado v1.8 >> if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v1.7 end if #getCreatureSummons(cid) > 1 then --alterado v1.9 return doPlayerSendCancel(cid, "You can't do it right now!") end if getPlayerStorageValue(cid, 52480) >= 1 then return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v1.6 end if getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9 doPlayerSendCancel(cid, "You can't do that while is mount in a bike!") return true end if getPlayerStorageValue(cid, 22545) >= 1 and (isInArray(skills["fly"], getPokemonName(mysum)) or isInArray(skills["levitate_fly"], getPokemonName(mysum))) then return doPlayerSendCancel(cid, "You can't do that while in the Golden Arena!") --alterado v1.8 end local pct = getCreatureHealth(mysum) / getCreatureMaxHealth(mysum) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", 1 - pct) if isInArray(skills["fly"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "flyItem") then doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["fly"][math.random(1, #txt["fly"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "fly", isCreature(getCreatureTarget(cid))) setPlayerStorageValue(cid, 85091, -1) elseif isInArray(skills["levitate_fly"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "flyItem") then doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["levitate_fly"][math.random(1, #txt["levitate_fly"])].."", TALKTYPE_ORANGE_1) --alterado v1.8 addEvent(goThere, 500, mysum, topos, "fly", isCreature(getCreatureTarget(cid))) setPlayerStorageValue(cid, 85091, -1) elseif isInArray(skills["ride"], getPokemonName(mysum)) or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "rideItem") then doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["ride"][math.random(1, #txt["ride"])].."", TALKTYPE_ORANGE_1) addEvent(goThere, 500, mysum, topos, "ride", isCreature(getCreatureTarget(cid))) setPlayerStorageValue(cid, 85091, -1) end return true end ----------------------------------Control Mind-------------------------------------------- alterado v2.5 if isCreature(item2.uid) and ehMonstro(item2.uid) and isInArray(skills["control mind"], getCreatureName(mysum)) and item2.uid ~= mysum then if not isCreature(item2.uid) then return true end if isSleeping(mysum) then return doPlayerSendCancel(cid, "Your pokemon is sleeping...zZzZ") end if getTileInfo(getThingPos(cid)).protection or getTileInfo(getThingPos(getCreatureSummons(cid)[1])).protection then return doPlayerSendCancel(cid, "You or your pokemon are in Pz zone!") end if #getCreatureSummons(cid) == 2 then return doPlayerSendCancel(cid, "You only can control one Pokemon!") end local cd = getCD(thisball.uid, "control", 120) if cd > 0 then doPlayerSendCancel(cid, "You have to wait "..cd.." segs to use Control Mind again!") return true end if getPokemonLevel(item2.uid) >= getPokemonLevel(mysum) then return doPlayerSendCancel(cid, "Your pokemon can't control this mind!") end local cmed = item2.uid setCD(thisball.uid, "control", 120) doSendDistanceShoot(getThingPos(mysum), getThingPos(cmed), 39) -------------- setPlayerStorageValue(cid, 212124, 1) doConvinceCreature(cid, cmed) setPlayerStorageValue(cmed, 212123, 1) doCreatureSay(cid, ""..getCreatureName(mysum)..", control "..string.lower(getCreatureName(cmed)).."'s mind!", TALKTYPE_ORANGE_1) local cmname = getCreatureName(mysum) local cmpos = getThingPos(mysum) local pokelife = (getCreatureHealth(mysum) / getCreatureMaxHealth(mysum)) doItemSetAttribute(thisball.uid, "hp", pokelife) doRemoveCreature(mysum) local cmzao = doSummonCreature(""..cmname.." cm", cmpos) doConvinceCreature(cid, cmzao) setPlayerStorageValue(cid, 888, 1) if useKpdoDlls then doUpdateMoves(cid) end local function check(cid, controled, rod) if isCreature(cid) then ball2 = getPlayerSlotItem(cid, 8) if getPlayerStorageValue(cid, 888) <= 0 then return true end if not isCreature(controled) then setPlayerStorageValue(cid, 212124, 0) local sum = isCreature(getCreatureSummons(cid)[1]) and getCreatureSummons(cid)[1] or getCreatureSummons(cid)[2] local pkcmpos = getThingPos(sum) doRemoveCreature(sum) local item = getPlayerSlotItem(cid, 8) local pk = doSummonCreature(getItemAttribute(item.uid, "poke"), pkcmpos) doConvinceCreature(cid, pk) doCreatureSetLookDir(getCreatureSummons(cid)[1], 2) addEvent(doAdjustWithDelay, 100, cid, pk, true, true, false) setPlayerStorageValue(cid, 888, 0) cleanCMcds(item.uid) registerCreatureEvent(pk, "SummonDeath") --alterado v2.6 if useKpdoDlls then doUpdateMoves(cid) end return true end if rod <= 0 then --Pokemon controlado local cmed2 = getCreatureSummons(cid)[1] local poscmed = getThingPos(cmed2) local cmeddir = getCreatureLookDir(cmed2) local namecmed = getCreatureName(cmed2) local gender = getPokemonGender(cmed2) --local level = getWildPokemonLevel(cmed2) local hp, maxHp = getCreatureHealth(getCreatureSummons(cid)[1]), getCreatureMaxHealth(getCreatureSummons(cid)[1]) doRemoveCreature(getCreatureSummons(cid)[1]) local back = doCreateMonster(namecmed, poscmed) addEvent(doCreatureSetSkullType, 150, back, gender) --addEvent(setWildPokemonLevel, 150, back, level) --doWildAttackPlayer(back, cid) doCreatureSetLookDir(back, cmeddir) addEvent(doCreatureAddHealth, 100, back, hp-maxHp) -- pokemon controlador local mynewpos = getThingPos(getCreatureSummons(cid)[1]) doRemoveCreature(getCreatureSummons(cid)[1]) local pk2 = doSummonCreature(getItemAttribute(ball2.uid, "poke"), mynewpos) doConvinceCreature(cid, pk2) addEvent(doAdjustWithDelay, 100, cid, pk2, true, true, false) setPlayerStorageValue(cid, 888, 0) doCreatureSetLookDir(getCreatureSummons(cid)[1], 2) setPlayerStorageValue(cid, 212124, 0) cleanCMcds(ball2.uid) registerCreatureEvent(pk2, "SummonDeath") --alterado v2.6 if useKpdoDlls then doUpdateMoves(cid) end else if isInArray({"Haunter", "Gengar", "Shiny Gengar"}, cmname) then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 214) else doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 220) end end end addEvent(check, 500, cid, controled, rod-1) end check(cid, cmed, 40) return true end --------------------------------------------------------------------- -------- MOVE / END --------- local onlyWater = false if isWater(getTileThingByPos(checkpos).itemid) then onlyWater = true for checkwater = 0, 7 do if not isWater(getTileThingByPos(getPosByDir(checkpos, checkwater)).itemid) then onlyWater = false end end end if onlyWater then doPlayerSendCancel(cid, "Destination is not reachable.") return true end doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["move"][math.random(1, #txt["move"])].."", TALKTYPE_ORANGE_1) if isCreature(getCreatureTarget(cid)) then goThere(mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist) else addEvent(goThere, 500, mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist) end ----------------------------- return true end
Só procurar por "flyitem" "cutitem" "rideitem" etc eo do surf fica em movements:
local function doSendMagicEffecte(pos, effect) addEvent(doSendMagicEffect, 50, pos, effect) end local waters = {11756, 4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825} local flie = {'4820', '4821', '4822', '4823', '4824', '4825'} --alterado v1.6 tabelas agora em configuration.lua! local premium = false function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) or isInArray({5, 6}, getPlayerGroupId(cid)) then --alterado v1.9 return true end if getPlayerStorageValue(cid, 75846) >= 1 then return true end --alterado v1.9 if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV if isPlayer(cid) and not isPremium(cid) and premium == true then doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Only premium members are allowed to surf.") return true end if getCreatureOutfit(cid).lookType == 316 or getCreatureOutfit(cid).lookType == 648 then doSendMagicEffect(fromPosition, 136) end if (getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1) then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to surf.") doTeleportThing(cid, fromPosition, false) return true end --alterado v1.6 if (not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "surfItem") and getPokemonName(getCreatureSummons(cid)[1])) then doPlayerSendCancel(cid, "This pokemon cannot surf.") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 5700) == 1 then doPlayerSendCancel(cid, "You can't do that while is mount in a bike!") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v1.6 doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 52480) >= 1 then doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v1.6 doTeleportThing(cid, fromPosition, false) return true end local pokemon = surfs[getPokemonName(getCreatureSummons(cid)[1])] if not pokemon then pokemon = surfItem[getPokemonName(getCreatureSummons(cid)[1])].outfit else pokemon = pokemon[1] end if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v1.7 doTeleportThing(cid, fromPosition, false) return true end --alterado v1.6 --doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) local go = false local pks = getCreatureSummons(cid)[1] if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7") end if go then local item = getPlayerSlotItem(cid, 8) local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1) else doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) end doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid))) local speed = 75 + PlayerSpeed + getSpeed(getCreatureSummons(cid)[1]) * 8 * speedRate setPlayerStorageValue(cid, 54844, speed) doChangeSpeed(cid, speed) local pct = getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1]) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pct) doRemoveCreature(getCreatureSummons(cid)[1]) addEvent(setPlayerStorageValue, 100, cid, 63215, 1) local item = getPlayerSlotItem(cid, 8) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) <= 0 then addEvent(sendAuraEffect, 120, cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end if useOTClient then doPlayerSendCancel(cid, '12//,hide') --alterado v1.8 end return true end local direffects = {30, 49, 9, 51} function onStepOut(cid, item, position, fromPosition) if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end local checkpos = fromPosition checkpos.stackpos = 0 if isInArray(waters, getTileInfo(checkpos).itemid) then if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 then doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1]) end end if not isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then if getPlayerStorageValue(cid, 17000) >= 1 then return true end if getPlayerStorageValue(cid, 63215) <= 0 then return true end doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 63215, -1) local item = getPlayerSlotItem(cid, 8) local pokemon = getItemAttribute(item.uid, "poke") local x = pokes[pokemon] if not x then return true end if getItemAttribute(item.uid, "nick") then doCreatureSay(cid, getItemAttribute(item.uid, "nick")..", I'm tired of surfing!", 1) else doCreatureSay(cid, getItemAttribute(item.uid, "poke")..", I'm tired of surfing!", 1) end doSummonMonster(cid, pokemon, posgoback) if getItemAttribute(item.uid, "addonNow") then local item = getPlayerSlotItem(cid, 8) local pk = getCreatureSummons(cid)[1] local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doCreatureChangeOutfit(pk, {lookType = getItemAttribute(item.uid, "addonNow"), lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}) end local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then pk = doCreateMonster(pokemon, backupPos) if not isCreature(pk) then doPlayerSendCancel(cid, "You can't stop surfing here.") doTeleportThing(cid, fromPosition, false) return true end doConvinceCreature(cid, pk) end doChangeSpeed(pk, getCreatureSpeed(cid)) doChangeSpeed(cid, -getCreatureSpeed(cid)) doRegainSpeed(cid) --alterado v1.6 --doTeleportThing(pk, fromPosition, false) --doTeleportThing(pk, getThingPos(cid), true) --doCreatureSetLookDir(pk, getCreatureLookDir(cid)) adjustStatus(pk, item.uid, true, false, true) if useOTClient then doPlayerSendCancel(cid, '12//,show') --alterado v1.8 end doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), true) end return true end
Editado Fevereiro 20 por boxxer321
A linha do addon, esse número 15512 é algum item, ou a outfit do poke ?
[15512] = {stor = 200013, addon = 1824, spec = 1825}, -- Tauros 1
Ou no caso, qual parte dessa linha ai seria o ride/fly ?
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+

1 hora atrás, Refe disse:A linha do addon, esse número 15512 é algum item, ou a outfit do poke ?
[15512] = {stor = 200013, addon = 1824, spec = 1825}, -- Tauros 1
Ou no caso, qual parte dessa linha ai seria o ride/fly ?
[15512] = {stor = 200013, addon = 1824, spec = 1825}, -- Tauros 1
é assim:
[Id do item] = {stor = 200013, addon = outfit com Addon , spec = outfit para ride}, -- Tauros 1
preciso da função goThere
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+

3 horas atrás, Refe disse:preciso da função goThere
aqui está:
function goThere(sid, thepos, skill, target, rept) if not isCreature(sid) then return true end if getCreatureNoMove(sid) or isSleeping(sid) or isParalyze(sid) then return true end --alterado v2.6 if thepos.x ~= getMarkedPos(sid).x or thepos.y ~= getMarkedPos(sid).y then return true end if isCreature(getCreatureTarget(getCreatureMaster(sid))) and target == false or (rept and rept <= 0) then doRegainSpeed(sid) markPos(sid, {x=1,y=1,z=7}) return true end if (skill == "ride" or skill == "fly") and getDistanceBetween(getThingPos(sid), getMarkedPos(sid)) <= 1 then local currentPos = getThingPos(getCreatureMaster(sid)) local summonPos = getThingPos(sid) local masterPos = getCreatureLastPosition(sid) if (getThingPos(sid).x == getThingPos(getCreatureMaster(sid)).x and getThingPos(sid).y == getThingPos(getCreatureMaster(sid)).y) or (currentPos.x == masterPos.x and currentPos.y == masterPos.y) then recheck(sid, skill, thepos) return true end if currentPos.x == thepos.x and currentPos.y == thepos.y then if getDirectionTo(getThingPos(sid), getThingPos(getCreatureMaster(sid))) <= 3 then doRegainSpeed(sid) local ndelay = getNextStepDelay(sid, 0) doTeleportThing(sid, thepos, true) doChangeSpeed(sid, -getCreatureSpeed(sid)) markPos(sid, getThingPos(getCreatureMaster(sid))) addEvent(goThere, ndelay, sid, getMarkedPos(sid), skill, target) else doChangeSpeed(sid, - getCreatureSpeed(sid)) doRegainSpeed(sid) markPos(sid, getThingPos(getCreatureMaster(sid))) local x = walkTo(sid, getDirectionTo(getThingPos(sid), getMarkedPos(sid)), getMarkedPos(sid), skill == "ride" or skill == "fly") doChangeSpeed(sid, - getCreatureSpeed(sid)) addEvent(goThere, x, sid, getMarkedPos(sid), skill, target) end return true else markPos(sid, getThingPos(getCreatureMaster(sid))) doChangeSpeed(sid, - getCreatureSpeed(sid)) doRegainSpeed(sid) local ndelay = getNextStepDelay(sid, 0) if getDirectionTo(getThingPos(sid), getMarkedPos(sid)) >= 4 then local x = walkTo(sid, getDirectionTo(getThingPos(sid), getMarkedPos(sid)), getMarkedPos(sid), skill == "ride" or skill == "fly") else doTeleportThing(sid, getPosByDir(getThingPos(sid), getDirectionTo(getThingPos(sid), getMarkedPos(sid)))) end doChangeSpeed(sid, - getCreatureSpeed(sid)) addEvent(goThere, x and x or ndelay, sid, getMarkedPos(sid), skill, target) return true end addEvent(recheck, 350, sid, skill, thepos) return true end if getThingPos(sid).x == getMarkedPos(sid).x and getThingPos(sid).y == getMarkedPos(sid).y then if isCreature(getCreatureTarget(sid)) then doFaceCreature(sid, getThingPos(getCreatureTarget(sid))) end if skill == "blink" then doChangeSpeed(sid, - getCreatureSpeed(sid)) --edited blink end addEvent(recheck, 350, sid, skill, thepos) return true end if (getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y) and isCreature(getCreatureTarget(getCreatureMaster(sid))) == false and skill == "move" then doRegainSpeed(sid) markPos(sid, {x=1,y=1,z=7}) return true end doRegainSpeed(sid) local holeid = thepos holeid.stackpos = 0 holeid = getTileThingByPos(holeid).itemid if getDistanceBetween(getThingPos(sid), getMarkedPos(sid)) <= 1 and (not isWalkable(getPosByDir(getThingPos(sid), getDirectionTo(getThingPos(sid), getMarkedPos(sid))), true, false, false, true) or isInArray(specialabilities["digholes"], holeid)) then if isGhostPokemon(sid) and getPlayerStorageValue(getCreatureMaster(sid), 990) <= 0 then local todir = getDirectionTo(getThingPos(sid), getMarkedPos(sid)) if todir <= 3 then doTeleportThing(sid, getMarkedPos(sid), true) else local gotopos = getPosByDir(getThingPos(sid), dirpref[math.random(1, 2)][todir][1][math.random(1, 2)]) doTeleportThing(sid, gotopos, true) addEvent(goThere, getNextStepDelay(sid, 0), sid, getMarkedPos(sid), skill, target) return true end end doFaceCreature(sid, getMarkedPos(sid)) addEvent(recheck, 180, sid, skill, thepos) doChangeSpeed(sid, - getCreatureSpeed(sid)) return true end local ret = 0 if getDistanceBetween(getThingPos(sid), getMarkedPos(sid)) <= 1 then ret = walkTo(sid, getDirectionTo(getThingPos(sid), getMarkedPos(sid)), getMarkedPos(sid), skill == "ride" or skill == "fly" or isGhostPokemon(sid)) if not tonumber(ret) then doFaceCreature(sid, getMarkedPos(sid)) addEvent(recheck, 180, sid, skill, thepos) doChangeSpeed(sid, - getCreatureSpeed(sid)) return true end else ret = walkTo(sid, getDirectionTo(getThingPos(sid), getMarkedPos(sid)), getMarkedPos(sid), skill == "ride" or skill == "fly" or not isGhostPokemon(sid))-- and isSightClear(getThingPos(sid), getMarkedPos(sid), false))) end if not tonumber(ret) then doPlayerSendCancel(getCreatureMaster(sid), "Destination is not reachable.") markPos(sid, {x=1,y=1,z=7}) return true end doChangeSpeed(sid, - getCreatureSpeed(sid)) addEvent(goThere, tonumber(ret), sid, getMarkedPos(sid), skill, target, rept and rept - 1 or 22) end
Editado Fevereiro 21 por boxxer321
Me manda a recheck
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+

5 minutos atrás, Refe disse:Me manda a recheck
aqui está:
function recheck(sid, skill, pos) if not isCreature(sid) then return end local cid = getCreatureMaster(sid) if skill == "cut" then local item = getTileItemById(pos, 2767) doCreatureSay(sid, "CUT!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 141) doTransformItem(item.uid, 6216) local function growBush() doTransformItem(getTileItemById(pos, 6216).uid, 2767) end addEvent(growBush, intervalToRegrowBushAndStones * 1000) elseif skill == "rock smash" then local item = getTileItemById(pos, 1285) doCreatureSay(sid, "ROCK SMASH!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 118) doTransformItem(item.uid, 3610) local function growRock() doTransformItem(getTileItemById(pos, 3610).uid, 1285) end addEvent(growRock, intervalToRegrowBushAndStones * 1000) elseif skill == "headbutt" then --alterado v1.6 local master = getCreatureMaster(sid) local array = {} for lvls, pokes in pairs(headbutt) do if getPlayerLevel(master) >= lvls[1] and getPlayerLevel(master) <= lvls[2] then array = pokes break end end if not next(array) then --proteçao para caso algum player tenha lvl maior q o limite da tabela, q ali ta 100k print("Some player have level bigger then 100k ") doPlayerSendTextMessage(cid, 20, "You can't have level bigger then 100k ") return true end local rand = array[math.random(#array)] for j = 1, rand[2] do local poke = doCreateMonster(rand[1], getClosestFreeTile(sid, pos), false) doSetMonsterPassive(poke) end local item = getTileItemById(pos, 12591) --id do item arvore normal doCreatureSay(sid, "HEADBUTT!", TALKTYPE_MONSTER) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 118) doTransformItem(item.uid, 12592) --id do item arvore quebrada local function growHead() doTransformItem(getTileItemById(pos, 12592).uid, 12591) --id do item arvore quebrada, arvore normal end addEvent(growHead, choose(5, 10, 20, 30) * 60 * 1000) --o tempo pra arvore voltar ao normal varia de 5~30min elseif skill == "dig" then local item = getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) doCreatureSay(sid, "DIG!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 3) doTransformItem(item.uid, item.itemid+1) local function closeHole() doTransformItem(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).uid, item.itemid) end addEvent(closeHole, intervalToRegrowBushAndStones * 1000) elseif skill == "fly" then --if not isPremium(cid) then --doPlayerSendCancel(cid, "Only premium members are allowed to fly.") --return true --end local pokemon = flys[getPokemonName(getCreatureSummons(cid)[1])] doPlayerSendTextMessage(cid, 27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower.") doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) local go = false local pks = getCreatureSummons(cid)[1] if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7") end if go then local item = getPlayerSlotItem(cid, 8) local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1) else --doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = color1, lookBody = color2, lookLegs = color3, lookFeet = color4}, -1) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) end --doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) if getPlayerGroupId(cid) == 8 then setPlayerGroupId(cid, 1) end if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) sendMovementEffect(cid, 136, getThingPos(cid)) --edited efeito quando anda com o porygon end return true elseif skill == "ride" then local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) if getPlayerGroupId(cid) == 8 then setPlayerGroupId(cid, 1) end return true end if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y or isCreature(getCreatureTarget(getCreatureMaster(sid))) then doRegainSpeed(sid) markPos(sid, {x=1,y=1,z=7}) return true end addEvent(recheck, 120, sid) end
3 minutos atrás, boxxer321 disse:aqui está:
function recheck(sid, skill, pos) if not isCreature(sid) then return end local cid = getCreatureMaster(sid) if skill == "cut" then local item = getTileItemById(pos, 2767) doCreatureSay(sid, "CUT!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 141) doTransformItem(item.uid, 6216) local function growBush() doTransformItem(getTileItemById(pos, 6216).uid, 2767) end addEvent(growBush, intervalToRegrowBushAndStones * 1000) elseif skill == "rock smash" then local item = getTileItemById(pos, 1285) doCreatureSay(sid, "ROCK SMASH!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 118) doTransformItem(item.uid, 3610) local function growRock() doTransformItem(getTileItemById(pos, 3610).uid, 1285) end addEvent(growRock, intervalToRegrowBushAndStones * 1000) elseif skill == "headbutt" then --alterado v1.6 local master = getCreatureMaster(sid) local array = {} for lvls, pokes in pairs(headbutt) do if getPlayerLevel(master) >= lvls[1] and getPlayerLevel(master) <= lvls[2] then array = pokes break end end if not next(array) then --proteçao para caso algum player tenha lvl maior q o limite da tabela, q ali ta 100k print("Some player have level bigger then 100k ") doPlayerSendTextMessage(cid, 20, "You can't have level bigger then 100k ") return true end local rand = array[math.random(#array)] for j = 1, rand[2] do local poke = doCreateMonster(rand[1], getClosestFreeTile(sid, pos), false) doSetMonsterPassive(poke) end local item = getTileItemById(pos, 12591) --id do item arvore normal doCreatureSay(sid, "HEADBUTT!", TALKTYPE_MONSTER) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 118) doTransformItem(item.uid, 12592) --id do item arvore quebrada local function growHead() doTransformItem(getTileItemById(pos, 12592).uid, 12591) --id do item arvore quebrada, arvore normal end addEvent(growHead, choose(5, 10, 20, 30) * 60 * 1000) --o tempo pra arvore voltar ao normal varia de 5~30min elseif skill == "dig" then local item = getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) doCreatureSay(sid, "DIG!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 3) doTransformItem(item.uid, item.itemid+1) local function closeHole() doTransformItem(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).uid, item.itemid) end addEvent(closeHole, intervalToRegrowBushAndStones * 1000) elseif skill == "fly" then --if not isPremium(cid) then --doPlayerSendCancel(cid, "Only premium members are allowed to fly.") --return true --end local pokemon = flys[getPokemonName(getCreatureSummons(cid)[1])] doPlayerSendTextMessage(cid, 27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower.") doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) local go = false local pks = getCreatureSummons(cid)[1] if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7") end if go then local item = getPlayerSlotItem(cid, 8) local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1) else --doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = color1, lookBody = color2, lookLegs = color3, lookFeet = color4}, -1) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) end --doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) if getPlayerGroupId(cid) == 8 then setPlayerGroupId(cid, 1) end if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) sendMovementEffect(cid, 136, getThingPos(cid)) --edited efeito quando anda com o porygon end return true elseif skill == "ride" then local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) if getPlayerGroupId(cid) == 8 then setPlayerGroupId(cid, 1) end return true end if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y or isCreature(getCreatureTarget(getCreatureMaster(sid))) then doRegainSpeed(sid) markPos(sid, {x=1,y=1,z=7}) return true end addEvent(recheck, 120, sid) end
Cara, parece tá tudo normal, testa isso no fly:
function recheck(sid, skill, pos)
if not isCreature(sid) then return end
local cid = getCreatureMaster(sid)
if skill == "cut" then
local item = getTileItemById(pos, 2767)
doCreatureSay(sid, "CUT!", TALKTYPE_ORANGE_1)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 141)
doTransformItem(item.uid, 6216)
local function growBush()
doTransformItem(getTileItemById(pos, 6216).uid, 2767)
end
addEvent(growBush, intervalToRegrowBushAndStones * 1000)
elseif skill == "rock smash" then
local item = getTileItemById(pos, 1285)
doCreatureSay(sid, "ROCK SMASH!", TALKTYPE_ORANGE_1)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 118)
doTransformItem(item.uid, 3610)
local function growRock()
doTransformItem(getTileItemById(pos, 3610).uid, 1285)
end
addEvent(growRock, intervalToRegrowBushAndStones * 1000)
elseif skill == "headbutt" then --alterado v1.6
local master = getCreatureMaster(sid)
local array = {}
for lvls, pokes in pairs(headbutt) do
if getPlayerLevel(master) >= lvls[1] and getPlayerLevel(master) <= lvls[2] then
array = pokes
break
end
end
if not next(array) then --proteçao para caso algum player tenha lvl maior q o limite da tabela, q ali ta 100k
print("Some player have level bigger then 100k ")
doPlayerSendTextMessage(cid, 20, "You can't have level bigger then 100k ")
return true
end
local rand = array[math.random(#array)]
for j = 1, rand[2] do
local poke = doCreateMonster(rand[1], getClosestFreeTile(sid, pos), false)
doSetMonsterPassive(poke)
end
local item = getTileItemById(pos, 12591) --id do item arvore normal
doCreatureSay(sid, "HEADBUTT!", TALKTYPE_MONSTER)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 118)
doTransformItem(item.uid, 12592) --id do item arvore quebrada
local function growHead()
doTransformItem(getTileItemById(pos, 12592).uid, 12591) --id do item arvore quebrada, arvore normal
end
addEvent(growHead, choose(5, 10, 20, 30) * 60 * 1000) --o tempo pra arvore voltar ao normal varia de 5~30min
elseif skill == "dig" then
local item = getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
doCreatureSay(sid, "DIG!", TALKTYPE_ORANGE_1)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 3)
doTransformItem(item.uid, item.itemid+1)
local function closeHole()
doTransformItem(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).uid, item.itemid)
end
addEvent(closeHole, intervalToRegrowBushAndStones * 1000)
elseif skill == "fly" then
--if not isPremium(cid) then
--doPlayerSendCancel(cid, "Only premium members are allowed to fly.")
--return true
--end
local pokemon = flys[getPokemonName(getCreatureSummons(cid)[1])]
doPlayerSendTextMessage(cid, 27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower.")
doChangeSpeed(cid, -getCreatureSpeed(cid))
local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate
doChangeSpeed(cid, speed)
setPlayerStorageValue(cid, 54844, speed)
local go = false
local pks = getCreatureSummons(cid)[1]
if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7")
end
if out then
local item = getPlayerSlotItem(cid, 8)
local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4")
doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1)
else
--doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = color1, lookBody = color2, lookLegs = color3, lookFeet = color4}, -1)
doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
end
--doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
setPlayerStorageValue(cid, 17000, 1)
if getPlayerGroupId(cid) == 8 then
setPlayerGroupId(cid, 1)
end
if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then
markPosEff(cid, getThingPos(cid))
sendMovementEffect(cid, 136, getThingPos(cid)) --edited efeito quando anda com o porygon
end
return true
elseif skill == "ride" then
local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])]
doChangeSpeed(cid, -getCreatureSpeed(cid))
local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate
doChangeSpeed(cid, speed)
setPlayerStorageValue(cid, 54844, speed)
doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
setPlayerStorageValue(cid, 17001, 1)
if getPlayerGroupId(cid) == 8 then
setPlayerGroupId(cid, 1)
end
return true
end
if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y or isCreature(getCreatureTarget(getCreatureMaster(sid))) then
doRegainSpeed(sid)
markPos(sid, {x=1,y=1,z=7})
return true
end
addEvent(recheck, 120, sid)
end
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+

@Refe eu acho que o script em si está normal, eu achava que deveria criar uma condição (sei lá) no HM pra caso o player tivesse o addon, prevalecesse o outfit do addon.
Testando e dps edito
@Refe o fly funcionou! porém nada ainda no ride
1 hora atrás, Refe disse:Cara, parece tá tudo normal, testa isso no fly:
function recheck(sid, skill, pos) if not isCreature(sid) then return end local cid = getCreatureMaster(sid) if skill == "cut" then local item = getTileItemById(pos, 2767) doCreatureSay(sid, "CUT!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 141) doTransformItem(item.uid, 6216) local function growBush() doTransformItem(getTileItemById(pos, 6216).uid, 2767) end addEvent(growBush, intervalToRegrowBushAndStones * 1000) elseif skill == "rock smash" then local item = getTileItemById(pos, 1285) doCreatureSay(sid, "ROCK SMASH!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 118) doTransformItem(item.uid, 3610) local function growRock() doTransformItem(getTileItemById(pos, 3610).uid, 1285) end addEvent(growRock, intervalToRegrowBushAndStones * 1000) elseif skill == "headbutt" then --alterado v1.6 local master = getCreatureMaster(sid) local array = {} for lvls, pokes in pairs(headbutt) do if getPlayerLevel(master) >= lvls[1] and getPlayerLevel(master) <= lvls[2] then array = pokes break end end if not next(array) then --proteçao para caso algum player tenha lvl maior q o limite da tabela, q ali ta 100k print("Some player have level bigger then 100k ") doPlayerSendTextMessage(cid, 20, "You can't have level bigger then 100k ") return true end local rand = array[math.random(#array)] for j = 1, rand[2] do local poke = doCreateMonster(rand[1], getClosestFreeTile(sid, pos), false) doSetMonsterPassive(poke) end local item = getTileItemById(pos, 12591) --id do item arvore normal doCreatureSay(sid, "HEADBUTT!", TALKTYPE_MONSTER) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 118) doTransformItem(item.uid, 12592) --id do item arvore quebrada local function growHead() doTransformItem(getTileItemById(pos, 12592).uid, 12591) --id do item arvore quebrada, arvore normal end addEvent(growHead, choose(5, 10, 20, 30) * 60 * 1000) --o tempo pra arvore voltar ao normal varia de 5~30min elseif skill == "dig" then local item = getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) doCreatureSay(sid, "DIG!", TALKTYPE_ORANGE_1) markPos(sid, {x=1,y=1,z=7}) doFaceCreature(sid, pos) doSendMagicEffect(getThingPos(item.uid), 3) doTransformItem(item.uid, item.itemid+1) local function closeHole() doTransformItem(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).uid, item.itemid) end addEvent(closeHole, intervalToRegrowBushAndStones * 1000) elseif skill == "fly" then --if not isPremium(cid) then --doPlayerSendCancel(cid, "Only premium members are allowed to fly.") --return true --end local pokemon = flys[getPokemonName(getCreatureSummons(cid)[1])] doPlayerSendTextMessage(cid, 27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower.") doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) local go = false local pks = getCreatureSummons(cid)[1] if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6") elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then go = true out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7") end if out then local item = getPlayerSlotItem(cid, 8) local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1) else --doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = color1, lookBody = color2, lookLegs = color3, lookFeet = color4}, -1) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) end --doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) if getPlayerGroupId(cid) == 8 then setPlayerGroupId(cid, 1) end if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) sendMovementEffect(cid, 136, getThingPos(cid)) --edited efeito quando anda com o porygon end return true elseif skill == "ride" then local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) if getPlayerGroupId(cid) == 8 then setPlayerGroupId(cid, 1) end return true end if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y or isCreature(getCreatureTarget(getCreatureMaster(sid))) then doRegainSpeed(sid) markPos(sid, {x=1,y=1,z=7}) return true end addEvent(recheck, 120, sid) end
Editado Fevereiro 21 por boxxer321
function recheck(sid, skill, pos)
if not isCreature(sid) then return end
local cid = getCreatureMaster(sid)
if skill == "cut" then
local item = getTileItemById(pos, 2767)
doCreatureSay(sid, "CUT!", TALKTYPE_ORANGE_1)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 141)
doTransformItem(item.uid, 6216)
local function growBush()
doTransformItem(getTileItemById(pos, 6216).uid, 2767)
end
addEvent(growBush, intervalToRegrowBushAndStones * 1000)
elseif skill == "rock smash" then
local item = getTileItemById(pos, 1285)
doCreatureSay(sid, "ROCK SMASH!", TALKTYPE_ORANGE_1)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 118)
doTransformItem(item.uid, 3610)
local function growRock()
doTransformItem(getTileItemById(pos, 3610).uid, 1285)
end
addEvent(growRock, intervalToRegrowBushAndStones * 1000)
elseif skill == "headbutt" then --alterado v1.6
local master = getCreatureMaster(sid)
local array = {}
for lvls, pokes in pairs(headbutt) do
if getPlayerLevel(master) >= lvls[1] and getPlayerLevel(master) <= lvls[2] then
array = pokes
break
end
end
if not next(array) then --proteçao para caso algum player tenha lvl maior q o limite da tabela, q ali ta 100k
print("Some player have level bigger then 100k ")
doPlayerSendTextMessage(cid, 20, "You can't have level bigger then 100k ")
return true
end
local rand = array[math.random(#array)]
for j = 1, rand[2] do
local poke = doCreateMonster(rand[1], getClosestFreeTile(sid, pos), false)
doSetMonsterPassive(poke)
end
local item = getTileItemById(pos, 12591) --id do item arvore normal
doCreatureSay(sid, "HEADBUTT!", TALKTYPE_MONSTER)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 118)
doTransformItem(item.uid, 12592) --id do item arvore quebrada
local function growHead()
doTransformItem(getTileItemById(pos, 12592).uid, 12591) --id do item arvore quebrada, arvore normal
end
addEvent(growHead, choose(5, 10, 20, 30) * 60 * 1000) --o tempo pra arvore voltar ao normal varia de 5~30min
elseif skill == "dig" then
local item = getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
doCreatureSay(sid, "DIG!", TALKTYPE_ORANGE_1)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 3)
doTransformItem(item.uid, item.itemid+1)
local function closeHole()
doTransformItem(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).uid, item.itemid)
end
addEvent(closeHole, intervalToRegrowBushAndStones * 1000)
elseif skill == "fly" then
--if not isPremium(cid) then
--doPlayerSendCancel(cid, "Only premium members are allowed to fly.")
--return true
--end
local pokemon = flys[getPokemonName(getCreatureSummons(cid)[1])]
doPlayerSendTextMessage(cid, 27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower.")
doChangeSpeed(cid, -getCreatureSpeed(cid))
local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate
doChangeSpeed(cid, speed)
setPlayerStorageValue(cid, 54844, speed)
local go = false
local pks = getCreatureSummons(cid)[1]
if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7")
end
if out then
local item = getPlayerSlotItem(cid, 8)
local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4")
doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1)
else
--doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = color1, lookBody = color2, lookLegs = color3, lookFeet = color4}, -1)
doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
end
--doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
setPlayerStorageValue(cid, 17000, 1)
if getPlayerGroupId(cid) == 8 then
setPlayerGroupId(cid, 1)
end
if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then
markPosEff(cid, getThingPos(cid))
sendMovementEffect(cid, 136, getThingPos(cid)) --edited efeito quando anda com o porygon
end
return true
elseif skill == "ride" then
out = false
local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])]
doChangeSpeed(cid, -getCreatureSpeed(cid))
local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate
doChangeSpeed(cid, speed)
setPlayerStorageValue(cid, 54844, speed)
doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1]))
if getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec2")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec3")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec4")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec5")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec6")
elseif getCreatureOutfit(pks).lookType == getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then
go = true
out = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "spec7")
end
if out then
local item = getPlayerSlotItem(cid, 8)
local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4")
doSetCreatureOutfit(cid, {lookType = out, lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}, -1)
else
--doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = color1, lookBody = color2, lookLegs = color3, lookFeet = color4}, -1)
doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1)
end
doRemoveCreature(getCreatureSummons(cid)[1])
setPlayerStorageValue(cid, 17001, 1)
if getPlayerGroupId(cid) == 8 then
setPlayerGroupId(cid, 1)
end
return true
end
if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y or isCreature(getCreatureTarget(getCreatureMaster(sid))) then
doRegainSpeed(sid)
markPos(sid, {x=1,y=1,z=7})
return true
end
addEvent(recheck, 120, sid)
end
info
Grupo: Conde
Registrado: 03/11/11
Posts: 714
Reputação: +67
Gênero: Masculino
Char no Tibia: esqueci 20+
Galera, estou com um pequeno conflito entre esses dois sistemas... o que acontece, o sistema de HM libera uma outfit por exemplo no RIDE, assim como nessa linha:
rideItem = { -- HM Ride
["Tauros"] = {outfit = 128, speed = 960},
porém, com o sistema de addon, no ride, TAMBÉM, libera uma outfit e fica dando esse conflito, o pokémon não fica com o addon na hora do RIDE e sim, a da outfit do HM! linha do addon:
[15512] = {stor = 200013, addon = 1824, spec = 1825}, -- Tauros 1
queria saber se tem alguma forma de por no sistema que caso o pokémon tiver o addon, prevalecer a outfit de certo addon!
actions/addon:
function eraseAllOutfits(cid, summon)
for id1, id2 in pairs(itensAddons) do
local a = {"addon", "addon2", "addon3", "addon4", "addon5", "addon6", "addon7"}
for i = 1, #a do
if getItemAttribute(getPlayerSlotItem(cid, 8).uid, a) == id2.addon then
setPlayerStorageValue(cid, id2.stor, 1)
setPlayerStorageValue(cid, pokeAddons[getCreatureName(summon)].default, 1)
else
setPlayerStorageValue(cid, pokeAddons[getCreatureName(summon)].default, 1)
end
end
end
setPlayerStorageValue(cid, storages.addonSystem, "")
setPlayerStorageValue(cid, 130390, -1)
setPlayerStorageValue(cid, 130389, -1)
setPlayerStorageValue(cid, 15024, 1)
for i = 181612, 181638 do
if getPlayerStorageValue(cid, i) >= 1 then
setPlayerStorageValue(cid, storages.addonSystem, getPlayerStorageValue(cid, storages.addonSystem)..","..i)
setPlayerStorageValue(cid, i, 0)
end
end
for j = 100, 111 do
if getPlayerStorageValue(cid, j) >= 1 then
setPlayerStorageValue(cid, storages.addonSystem, getPlayerStorageValue(cid, storages.addonSystem)..","..j)
setPlayerStorageValue(cid, j, 0)
end
end
if pokeAddons[getCreatureName(summon)] then
doPlayerSendOutfitWindow(cid)
end
--doPlayerSendTextMessage(cid, 20, getPlayerStorageValue(cid, storages.addonSystem))
end
function onUse(cid, item, frompos, item2, topos)
if tonumber(getPlayerStorageValue(cid, storages.addonSystem3)) and getPlayerStorageValue(cid, storages.addonSystem3) <= 0 then setPlayerStorageValue(cid, storages.addonSystem3, "") end
local pk = getCreatureSummons(cid)
if isSummon(item2.uid) then
if isPlayerSummon(cid, item2.uid) then
if item.itemid == 13075 then
if not pokeAddons[getCreatureName(pk[1])] then
return doPlayerSendTextMessage(cid, 27, "This pokemon don't have any addons.")
end
eraseAllOutfits(cid, item2.uid)
--doPlayerSendTextMessage(cid, 20, getPlayerStorageValue(cid, storages.addonSystem3))
return true
end
for id1, id2 in pairs(itensAddons) do
if item.itemid == id1 then
if not pokeAddons[getCreatureName(pk[1])] then return doPlayerSendCancel(cid, "Sorry, this itens no belong in the your pokemon.") end
if not isInArray(pokeAddons[getCreatureName(pk[1])].itens, item.itemid) then
return doPlayerSendCancel(cid, "Sorry, this itens no belong in the your pokemon.")
end
setPlayerStorageValue(cid, storages.addonSystem3, getPlayerStorageValue(cid, storages.addonSystem3)..","..id2.stor)
local a = {"addon", "addon2", "addon3", "addon4", "addon5", "addon6", "addon7"}
for i = 1, #a do
if getItemAttribute(getPlayerSlotItem(cid, 8).uid, a) == id2.addon then
return doPlayerSendTextMessage(cid, 27, "This pokemon having this addon.")
end
end
if not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName", getItemNameById(id1))
elseif not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon2") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon2", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec2", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName2", getItemNameById(id1))
elseif not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon3") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon3", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec3", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName3", getItemNameById(id1))
elseif not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon4") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon4", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec4", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName4", getItemNameById(id1))
elseif not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon5") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon5", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec5", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName5", getItemNameById(id1))
elseif not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon6") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon6", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec6", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName6", getItemNameById(id1))
elseif not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "addon7") then
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addon7", id2.addon)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "spec7", id2.spec)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "addonName7", getItemNameById(id1))
end
doSendMagicEffect(getThingPos(item2.uid), 29)
doPlayerSendTextMessage(cid, 27, "Congrulations, your pokemon have now a "..getItemNameById(id1)..".")
eraseAllOutfits(cid, item2.uid)
--doCreatureChangeOutfit(pk[1], {lookType = id2.addon})
doRemoveItem(item.uid, 1)
return true
end
end
else
doPlayerSendCancel(cid, "Sorry, use this itens only your pokemons.")
return true
end
else
doPlayerSendCancel(cid, "Sorry, use this itens in only pokemons.")
return true
end
return true
end
actions/hm:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isCreature(itemEx.uid) then
return doPlayerSendCancel(cid, "Use in your pokeball.")
elseif not getItemAttribute(itemEx.uid, "poke") then
return doPlayerSendCancel(cid, "Use in your pokeball with your pokemon.")
elseif not rideItem[getItemAttribute(itemEx.uid, "poke")] then
return doPlayerSendCancel(cid, "This pokemon can not learn this HM.")
elseif getItemAttribute(getPlayerSlotItem(cid, 8).uid, "cutItem") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "rideItem") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "flyItem") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "smashItem") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "flashItem") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "surfItem") then
return doPlayerSendCancel(cid, "This pokemon has already learned an HM.")
elseif getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ehditto") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ehshinyditto") then
return doPlayerSendCancel(cid, "This pokemon does not accept HMs.")
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your pokemon has learned HM04 RIDE.")
doItemSetAttribute(itemEx.uid, "rideItem", true)
doRemoveItem(item.uid, 1)
return true
end