Postado Julho 30, 2016 8 anos Boa tarde galera, estou precisando da ajuda de voces Queria deixar fly, teleport para premium, Alguem poderia me ajudar ? OTbase: DXP Esse Script é o Order.lua: Citar function onUse(cid, item, frompos, item2, topos) if getCreatureCondition(cid, CONDITION_EXHAUST) or isWatchingTv(cid) then return true end doAddCondition(cid, ordercondition) local pPos = getThingPos(cid) pPos.stackpos = 0 local pos = getThingFromPos(pPos) if isSurf(cid) or isInArray(11756, item2.itemid) or item2.itemid == 11756 or isInArray(11756, pos.itemid) or pos.itemid == 11756 or isInArray({11756, 11675, 11676, 460}, pos.itemid) then return doPlayerSendCancel(cid, MSG_NAO_E_POSSIVEL) end if item2.uid == cid then -- demound poke if isPlayer(item2.uid) and isInDuel(item2.uid) then return doPlayerSendCancel(cid, MSG_NAO_E_POSSIVEL) end if isRiderOrFlyOrSurf(cid) then local ball = getPlayerSlotItem(cid, 8) doGoPokemonInOrder(cid, ball, false) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSay(cid, getCreatureNick(getCreatureSummons(cid)[1]) .. orderTalks["downability"].talks[math.random(#orderTalks["downability"].talks)]) doRegainSpeed(cid) setPlayerStorageValue(cid, orderTalks["ride"].storage, -1) setPlayerStorageValue(cid, orderTalks["fly"].storage, -1) doPlayerSendCancel(cid, '12//,show') return true end end --- ride/fly retirada if isRiderOrFlyOrSurf(cid) then return doPlayerSendCancel(cid, MSG_NAO_E_POSSIVEL) end if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "Você precisa de um pokemon para usar o order.") end local poke = getCreatureSummons(cid)[1] local pokeName = getCreatureNick(poke) local habilidades = getPokemonSkills(getCreatureName(poke)) if item2.uid == cid then if isFight(cid) then -- Edição pra ficar igual pxg.. nao dar fly ou ride com fight setMoveSummon(cid, false) addEvent(doMovePokeToPos, 5, poke, getThingPos(cid)) return true end if isMega(poke) then return doPlayerSendCancel(cid, "Pokemons megas não tem habilidades de fly/ride.") end if isPlayer(item2.uid) and (isInDuel(item2.uid) or getCreatureSkullType(item2.uid) == SKULL_WHITE or getCreatureSkullType(item2.uid) == 1 or getCreatureSkullType(item2.uid) == 2) then return doPlayerSendCancel(cid, MSG_NAO_E_POSSIVEL) end if not (getThingPos(poke) or getThingPos(item2.uid)) then -- correção de um erro. return true end local dist = getDistanceBetween(getThingPos(poke), getThingPos(item2.uid)) --- ride if string.find(habilidades, "ride") then doPlayerSay(cid, pokeName..orderTalks["ride"].talks[math.random(#orderTalks["ride"].talks)]) if dist == 1 then doUp(cid, poke, "ride") return true end setMoveSummon(cid, false) addEvent(doMovePokeToPos, 200, poke, topos) setPlayerStorageValue(poke, orderTalks["ride"].storage, 1) elseif string.find(habilidades, "fly") or string.find(habilidades, "levitate") then if string.find(habilidades, "levitate") then doPlayerSay(cid, pokeName..orderTalks["levitate"].talks[math.random(#orderTalks["levitate"].talks)]) else doPlayerSay(cid, pokeName..orderTalks["fly"].talks[math.random(#orderTalks["fly"].talks)]) end if not isPremium(cid) then end if dist == 1 then doUp(cid, poke, "fly") return true end setMoveSummon(cid, false) addEvent(doMovePokeToPos, 200, poke, topos) setPlayerStorageValue(poke, orderTalks["fly"].storage, 1) end ----------------- Ditto ----------------- elseif isMonster(item2.uid) and isInArray({"Shiny Ditto", "Ditto"}, getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")) then if isPlayer(item2.uid) and isInDuel(item2.uid) then return doPlayerSendCancel(cid, MSG_NAO_E_POSSIVEL) end if isPlayerSummon(cid, item2.uid) and isInArray({"Shiny Ditto", "Ditto"}, getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")) and not isInArray({"Shiny Ditto", "Ditto"}, getItemAttribute(getPlayerSlotItem(cid, 8).uid, "copyName")) then doCopyPokemon(poke, getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke"), true) doPlayerSay(cid, getCreatureNick(getCreatureSummons(cid)[1])..", reverta-se.") return true elseif not isPlayerSummon(cid, item2.uid) and getPokeName(item2.uid) ~= getPokeName(poke) then if isSummon(item2.uid) then if getPlayerSlotItem(getCreatureMaster(item2.uid), 8).uid ~= 0 and isInArray({"Shiny Ditto", "Ditto"}, getItemAttribute(getPlayerSlotItem(getCreatureMaster(item2.uid), 8).uid, "poke")) then doSendMsg(cid, "Você não pode fazer uma copia de um outro ditto.") return true end end local thingName = doCorrectString(getCreatureName(item2.uid)) if pokes[thingName].level > getPlayerLevel(cid) then doSendMsg(cid, "Você não tem level para copiar este pokémon.") return true end doCopyPokemon(poke, thingName, true) return true end ----------------- Mover ----------------- elseif not isCreature(item2.uid) then setMoveSummon(cid, false) doEreaseUsingOrder(poke) local oldTopos = getThingPos(item2.uid) local oldTopos_2 = topos local x, y = 0, 0 if (topos.x - getThingPos(poke).x) > 0 then topos.x = topos.x +1 elseif (topos.x - getThingPos(poke).x) < 0 then topos.x = topos.x -1 end if (topos.y - getThingPos(poke).y) > 0 then topos.y = topos.y +1 elseif (topos.y - getThingPos(poke).y) < 0 then topos.y = topos.y -1 end setPlayerStorageValue(poke, 505, getThingPos(cid).x) setPlayerStorageValue(poke, 506, getThingPos(cid).y) addEvent(doMovePokeToPos, 5, poke, topos) doWalkAgain(poke) ----- Edições dig/cut/rock smash/headbutt/blink local buracos = {468, 481, 483} local arvores = {2767} local pedras = {1285} local headbutt = {2707} if item2.uid == 0 then return true end local pos = getThingPos(item2.uid) local dist = getDistanceBetween(getThingPos(poke), getThingPos(item2.uid)) if not isFight(cid) then -- Edição pra ficar igual pxg.. nao dar fly ou ride com fight if isInArray(buracos, item2.itemid) then ----------------------- DIG if not string.find(habilidades, "dig") then return doPlayerSendCancel(cid, "Esse pokemon não tem a habilidade de cavar.") end doMarkedPos(poke, getThingPos(item2.uid)) doEreaseUsingOrder(cid) setPlayerStorageValue(poke, orderTalks["dig"].storage, 1) setMoveSummon(cid, false) if dist == 1 then recheck(poke, "cut", getThingPos(item2.uid)) else addEvent(doMovePokeToPos, 200, poke, topos) end doPlayerSay(cid, getCreatureNick(poke)..orderTalks["dig"].talks[math.random(#orderTalks["dig"].talks)]) return true elseif isInArray(arvores, item2.itemid) then ----------------------- CUT if not string.find(habilidades, "cut") then return doPlayerSendCancel(cid, "Esse pokemon não tem a habilidade de cortar.") end doMarkedPos(poke, getThingPos(item2.uid)) doEreaseUsingOrder(cid) setPlayerStorageValue(poke, orderTalks["cut"].storage, 1) setMoveSummon(cid, false) if dist == 1 then addEvent(recheck, (1000 - (2.3*getCreatureSpeed(poke))) * dist, poke, "cut", getThingPos(item2.uid)) else addEvent(doMovePokeToPos, 200, poke, topos) end doPlayerSay(cid, getCreatureNick(poke)..orderTalks["cut"].talks[math.random(#orderTalks["cut"].talks)]) return true elseif isInArray(pedras, item2.itemid) then ----------------------- ROCK if not string.find(habilidades, "rock smash") then return doPlayerSendCancel(cid, "Esse pokemon não tem a habilidade de quebrar.") end local pos = getThingPos(item2.uid) doMarkedPos(poke, getThingPos(item2.uid)) doEreaseUsingOrder(cid) setPlayerStorageValue(poke, orderTalks["rock"].storage, 1) setMoveSummon(cid, false) if dist == 1 then addEvent(recheck, (1000 - (2.3*getCreatureSpeed(poke))) * dist, poke, "rock", getThingPos(item2.uid)) else addEvent(doMovePokeToPos, 200, poke, topos) end doPlayerSay(cid, getCreatureNick(poke)..orderTalks["rock"].talks[math.random(#orderTalks["rock"].talks)]) return true elseif isInArray(headbutt, item2.itemid) then ----------------------- HEAD if not string.find(habilidades, "headbutt") then return doPlayerSendCancel(cid, "Esse pokemon nao tem a habilidade de balancar Arvores.") end local pos = getThingPos(item2.uid) doMarkedPos(poke, getThingPos(item2.uid)) doEreaseUsingOrder(cid) setPlayerStorageValue(poke, orderTalks["headbutt"].storage, 1) setMoveSummon(cid, false) if dist <= 1 then addEvent(recheck, (1000 - (2.3*getCreatureSpeed(poke))) * dist, poke, "headbutt", getThingPos(item2.uid)) else addEvent(doMovePokeToPos, 200, poke, topos) end doPlayerSay(cid, getCreatureNick(poke)..orderTalks["headbutt"].talks[math.random(#orderTalks["headbutt"].talks)]) return true end end if string.find(habilidades, "blink") then if os.time() < getPlayerStorageValue(poke, storages.blink) and not isGod(cid) then doPlayerSay(cid, getCreatureNick(poke)..orderTalks["move"].talks[math.random(#orderTalks["move"].talks)]) return true elseif (getCreatureSkullType(cid) == SKULL_WHITE or isInDuel(cid)) and getTileInfo(getThingPos(item2.uid)).protection then doSendMsg(cid, "Você não pode usar blink em protection zone quando está em duelo.") return true end setPlayerStorageValue(poke, storages.blink, os.time()+7) doSendMagicEffect(getThingPos(poke), 134) doTeleportThing(poke, getThingPos(item2.uid), false) doSendMagicEffect(getThingPos(poke), 134) doPlayerSay(cid, getCreatureNick(poke)..orderTalks["blink"].talks[math.random(#orderTalks["blink"].talks)]) return true end doPlayerSay(cid, getCreatureNick(poke)..orderTalks["move"].talks[math.random(#orderTalks["move"].talks)]) end return true end function isGhost(cid) local hab = getPokemonSkills(string.lower(getPokeName(cid))) if string.find(hab, "ghost") then return true end return false end Teleport.lua Citar local UP_FLOORS = {1386, 3678, 5543, 8599, 10035, 384} local DRAW_WELL = 1369 function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == DRAW_WELL and item.actionid ~= 100) then return false end if(item.itemid == 1368 and item.actionid ~= 100) then return false end fromPosition.stackpos = STACKPOS_GROUND if(isInArray(UP_FLOORS, item.itemid)) then fromPosition.z = fromPosition.z - 1 fromPosition.y = fromPosition.y + 1 if(doTileQueryAdd(cid, fromPosition, 4, false) ~= RETURNVALUE_NOERROR) then fromPosition.y = fromPosition.y - 2 end else fromPosition.z = fromPosition.z + 1 end if(doTileQueryAdd(cid, fromPosition, 4, false) ~= RETURNVALUE_NOERROR) then return false end local pos, dir = getCreaturePosition(cid), SOUTH if(pos.x < fromPosition.x) then dir = EAST elseif(pos.x == fromPosition.x) then if(pos.y == fromPosition.y) then dir = getCreatureLookDirection(cid) elseif(pos.y > fromPosition.y) then dir = NORTH end elseif(pos.x > fromPosition.x) then dir = WEST end doTeleportThing(cid, fromPosition, false) doCreatureSetLookDirection(cid, dir) if #getCreatureSummons(cid) >= 1 then doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid)) doSendMagicEffect(getThingPos(cid), 21) end return true end Fly.lua: Citar function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isMonster(cid) and not isSummon(cid) then if isInArray(WATER_BORDERS, item.itemid) then if getCreatureTarget(cid) >= 1 then doTeleportThing(cid, getMarkedSpawnPos(cid)) doSendMagicEffect(getThingPos(cid), 10) return true end doTeleportThing(cid, fromPosition) end return true elseif isSummon(cid) then if isInArray(WATER, item.itemid) then doTeleportThing(cid, getThingPos(getCreatureMaster(cid))) setMoveSummon(getCreatureMaster(cid), false) return true end end if (isFly(cid)) then ---- fly local toPos = toPosition toPos.stackpos = 0 if not flyBlackSQM then toPos.z = 7 doCreateTile(toPos) if getThingFromPos(toPos).itemid < 1 or getThingFromPos(toPos).itemid == ITEM_FLYTILE then doTeleportThing(cid, fromPosition) return true end toPos.z = toPosition.z end if nonFlyableBorder and type(nonFlyableBorder) == "table" then for i = toPos.z, 14 do toPos.z = i toPos.stackpos = 1 doCreateTile(toPos) if isInArray(nonFlyableBorder, getThingFromPos(toPos).itemid) then doTeleportThing(cid, fromPosition) return true end end toPos.z = getCreaturePosition(cid).z toPos.stackpos = 0 end for _, area in ipairs(getArea(toPos, RANGEX, RANGEY)) do doCreateTile(area) local thing = getThingFromPos(area) if thing.itemid < 1 or thing.itemid == ITEM_FLYTILE then local itemFly = doCreateItem(ITEM_FLYTILE, 1, area) doItemSetAttribute(itemFly, "flyOrder", getCreatureName(cid)) elseif thing.itemid == ITEM_WATERTILE or isInArray(WATER, thing.itemid) then doTransformItem(thing.uid, ITEM_WATERTILE) doItemSetAttribute(thing.uid, "flyOrder", getCreatureName(cid)) end end return true end if isPlayer(cid) then -- surf if isInArray(WATER, item.itemid) then ---//// Seguranças \\\\--- if isSurf(cid) then return true end ---//// Seguranças \\\\--- if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "Você não pode andar sobre a água.") doTeleportThing(cid, fromPosition, false) return true end local poke = getCreatureSummons(cid)[1] local name = string.lower(getPokeName(poke)) local habilidades = getPokemonSkills(name) if not string.find(habilidades, "surf") then if isInArray(WATER, item.itemid) then doPlayerSendCancel(cid, "Seu pokemon não tem a habilidade de surfar.") doTeleportThing(cid, fromPosition, false) return true end end if isFight(cid) then -- Edição pra ficar igual pxg.. nao dar fly ou ride com fight doPlayerSendCancel(cid, "Você não pode surfar se estiver em batalha.") doTeleportThing(cid, fromPosition, false) return true end if not isSurf(cid) then doSendMagicEffect(toPosition, 53) setPlayerStorageValue(cid, orderTalks["surf"].storage, 1) local outfit = getPokemonOutfitToSkill(name) local speed = getPokemonSpeedToSkill(name) doSetCreatureOutfit(cid, {lookType = outfit}, -1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, speed) doPlayerSay(cid, getCreatureName(poke)..orderTalks["surf"].talks[math.random(#orderTalks["surf"].talks)]) doRemoveCreature(poke) end end return true end return true end local function doSendMagicEffecte(pos, effect) addEvent(doSendMagicEffect, 50, pos, effect) end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isInArray({460, 11675, 11676}, item.itemid) then doRemoveItem(item.uid) end local area = getAreaToRemove(fromPosition, toPosition) if isMonster(cid) and not isSummon(cid) then if isInArray(WATER_BORDERS, item.itemid) then doTeleportThing(cid, toPosition) end return true end if isFly(cid) or isSurf(cid) then local direffects = {84, 85, 86, 87} if isInArray(WATER, item.itemid) then if getCreatureLookDir(cid) == NORTH then fromPosition.y = fromPosition.y +1 end doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1]) -- efeito end end if isSurf(cid) and #getCreatureSummons(cid) == 0 then local pPos = toPosition pPos.stackpos = 0 local pos = getThingFromPos(pPos) if isInArray(WATER, item.itemid) and not isInArray(WATER, pos.itemid) then local ball = getPlayerSlotItem(cid, 8) doGoPokemonInOrder(cid, ball, false) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSay(cid, getCreatureName(getCreatureSummons(cid)[1]) .. orderTalks["downability"].talks[math.random(#orderTalks["downability"].talks)]) doRegainSpeed(cid) setPlayerStorageValue(cid, orderTalks["surf"].storage, -1) doSendMagicEffect(fromPosition, 53) end return true end for _, arear in ipairs(area) do doCreateTile(arear) local thing = getThingFromPos(arear) if thing.itemid == ITEM_FLYTILE or isInArray({460, 11675, 11676}, thing.itemid) then if getItemAttribute(thing.uid, "flyOrder") == getCreatureName(cid) then doRemoveItem(thing.uid) end elseif thing.itemid == ITEM_WATERTILE then doTransformItem(thing.uid, WATER[1]) end end return true end Up Editado Agosto 1, 2016 8 anos por lkrazy (veja o histórico de edições)
Postado Agosto 1, 2016 8 anos @lkrazy Vejá este tópico, deve lhe ajudar: Obs: Se lhe ajudei, de um REP+ :D
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.