Qual a base? Se possível, poste order.lua, de data/actions/scripts (se ele existir, claro).
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Aqui amigo
local nao = {'4820', '4821', '4822', '4823', '4824', '4825', '1395', '1389', '1391', '1393', '460'}
local direction = {'4', '5', '6', '7'}-- rideflylocal ridefly = {'Elder Charizard', 'Crystal Onix', 'Venusaur', 'Ninetales', 'Arcanine', 'Ponyta', 'Rapidash', 'Doduo', 'Dodrio', 'Onix', 'Rhyhorn', 'Tauros', 'Porygon', 'Aerodactyl', 'Dragonite', 'Charizard', 'Pidgeot', 'Fearow', 'Moltres', 'Zapdos', 'Articuno', 'Mew', 'Mewtwo', 'Lugia', 'Ho-Oh', 'Entei', 'Raikou', 'Suicune'}local ride = {'Crystal Onix', 'Venusaur', 'Ninetales', 'Arcanine', 'Ponyta', 'Rapidash', 'Doduo', 'Dodrio', 'Onix', 'Rhyhorn', 'Tauros', 'Entei', 'Suicune', 'Raikou'}local fly = {'Elder Charizard', 'Porygon', 'Aerodactyl', 'Dragonite', 'Charizard', 'Pidgeot', 'Fearow', 'Zapdos', 'Moltres', 'Articuno', 'Mew', 'Mewtwo', 'Lugia', 'Ho-Oh'}local flys = {[294] = {295, 2200, 525}, -- Elder Charizard[265] = {229, 2300, 350}, -- moltres[283] = {230, 2100, 350}, -- artic[199] = {224, 2600, 350}, -- zapdos[9] = {232, 2200, 525}, -- 1000[34] = {233, 2200, 525},-- two[210] = {221, 1300, 410},-- nite[80] = {222, 900, 375}, -- geot[17] = {226, 800, 400}, -- fearow[10] = {227, 1100, 410}, -- aero[67] = {216, 1000, 410}, -- chari[97] = {316, 600, 440}, -- porygon[535] = {535, 2300, 350}, -- lugia[533] = {533, 2300, 350}, -- ho-oh}local rides = {[93] = {128, 780, 400}, -- tauros[114] = {129, 800, 375}, -- kyuubi[220] = {130, 800, 395}, -- rapid[16] = {131, 410, 500}, -- ponyta[77] = {132, 400, 510}, -- rhyhorn[88] = {12, 900, 390}, -- arcan[493] = {492, 1000, 360}, -- shiny arca[496] = {494, 420, 420}, -- shiny vneu[292] = {293, 480, 430}, -- cristal onix[248] = {126, 450, 450}, -- onix[22] = {134, 390, 450}, -- venu[120] = {133, 750, 380}, -- dodrio[26] = {135, 420, 500}, -- doduo[536] = {536, 750, 380}, -- entei[537] = {537, 420, 500}, -- raikou[538] = {538, 420, 500}, -- suicune}local bolas = {'2222', '2223', '2224'}local ultra = {'2220', '2221', '2227'}local etudao = 9506local mind = 9507-- LIGHTlocal light = {"Divine Light", "Kadabra", "Alakazam", "Magnemite", "Magneton", "Drowzee", "Hypno", "Voltorb", "Electrode", "Mrmime", "Electabuzz", "Jolteon", "Porygon", "Pikachu", "Raichu"}local exhautStorage = 9500local time = 600local cd = 17-- LIGHT-- BLINKlocal blink = {"Abra", "Kadabra", "Alakazam", "Porygon", "Mew", "Mewtwo", "MrMime"}local exhaustblink = 9501local cdblink = 50-- BLINKlocal systems = {["rock smash"] = {"Sandshrew", "Sandslash", "Diglett", "Dugtrio", "Primeape", "Machop", "Machoke", "Machamp", "Geodude", "Graveler", "Golem" , "Onix", "Cubone", "Marowak", "Rhyhorn", "Rhydon", "Kangaskhan", "Tauros", "Snorlax", "Poliwrath", "Hitmonlee", "Hitmonchan", "Aerodactyl", "Charizard", "Blastoise", "Typhlosion", "Feraligatr", "Furret", "Ledian", "Ampharos", "Politoed", "Quagsire", "Forretress", "Steelix", "Snubbull", "Granbull", "Sudowoodo", "Gligar", "Scizor", "Heracross", "Sneasel", "Ursaring", "Teddiursa", "Slugma", "Magcargo", "Piloswine", "Swinub", "Corsola", "Phanpy", "Donphan", "Tyrogue", "Hitmontop", "Miltank", "Blissey", "Tyranitar", "Pupitar"},["cut"] = {"Charmander", "Raticate", "Bulbasaur", "Ivysaur", "Venusaur", "Charmeleon", "Sandshrew", "Sandslash", "Gloom", "Vileplume", "Paras", "Parasect", "Meowth", "Persian", "Bellsprout", "Weepinbell", "Victreebel", "Farfetchd", "Krabby", "Kingler", "Exeggutor", "Cubone", "Marowak", "Tangela", "Scyther", "Pinsir", "Chikorita", "Bayleef", "Meganium", "Croconow", "Feraligatr", "Furret", "Bellossom", "Hoppip", "Skiploom", "Jumpluff", "Sunkern", "Sunflora", "Scizor", "Heracross", "Sneasel", "Teddiursa", "Ursaring", "Gligar", "Skarmory"},["digholes"] = {"468", "481", "483"},["dig"] = {"Raticate", "Sandshrew", "Sandslash", "Diglett", "Dugtrio", "Primeape", "Machop", "Machoke", "Machamp", "Geodude", "Graveler", "Golem" , "Onix", "Cubone", "Marowak", "Rhyhorn", "Rhydon", "Kangaskhan", "Tauros", "Snorlax", "Eevee", "Dunsparce", "Flareon", "Jolteon", "Vaporeon", "Espeon", "Umbreon", "Vulpix", "Ninetales", "Nidorina", "Nidoqueen", "Nidorino", "Nidoking", "Persian", "Arcanine"},["blink"] = {"Abra", "Kadabra", "Alakazam", "Porygon", "Porygon2", "Mew", "Mewtwo", "MrMime"}}-------- DITTO E CONTROL MIND ---------function onUse(cid, item, frompos, item2, topos, item3)if getPlayerItemCount(cid, item2.itemid) >= 1 thenreturn falseendif isMonster(item2.uid) and item2.uid ~= getCreatureSummons(cid)[1] and item2.uid ~= cid thenif #getCreatureSummons(cid) == 0 thendoPlayerSendCancel(cid, "Você precisa de um pokemon para usar order.")return trueendif exhaustion.get(cid, mind) thendoPlayerSendCancel(cid, "Seu pokemon está exausto para usar Control MIND, Espere 2 minutos para usar esse move denovo.")return trueendif isPlayer(getCreatureMaster(item2.uid)) thendoPlayerSendCancel(cid, "Você só pode usar esse move em pokemons.")return trueendif not isInArray({"Alakazam", "Tentacruel", "Gengar", "Ditto"}, getCreatureName(getCreatureSummons(cid)[1])) thendoPlayerSendCancel(cid, "Este pokemon não tem esse move.")return trueendif getCreatureName(item2.uid) == "Ditto" and isMonster(item2.uid) == TRUE and getCreatureName(getCreatureSummons(cid)[1]) == "Ditto" thendoCreatureSay(cid, "Ditto, reverse transformation!", 1)xd = doSummonCreature(getCreatureName(item2.uid), topos)doCreatureAddHealth(xd, -getCreatureHealth(xd)+getCreatureHealth(getCreatureSummons(cid)[1]))doTeleportThing(xd, getCreaturePosition(getCreatureSummons(cid)[1]), false)doRemoveCreature(item2.uid)doConvinceCreature(cid, xd)return TRUEend------ \/ dittoif isMonster(item2.uid) == TRUE and getCreatureName(getCreatureSummons(cid)[1]) == "Ditto" thenif getPlayerLevel(cid) >= pokes[getCreatureName(item2.uid)].level thenif getPlayerStorageValue(item2.uid, 202) >= 1 thendoPlayerSendTextMessage(cid, 27, "Sorry, you dont transform your ditto in GYM pokes.")return trueenddoCreatureSay(cid, "Ditto, transformation ".. getCreatureName(item2.uid) .."!", 1)doCreatureSay(cid, "Transform!", TALKTYPE_MONSTER)doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 184)doSetCreatureOutfit(getCreatureSummons(cid)[1], getCreatureOutfit(item2.uid), -1)movesDitto(cid, item2.uid)doCureAllStatus(getPlayerSlotItem(cid, 8).uid)elsedoPlayerSendTextMessage(cid, 27, "Sorry, you need a level ".. pokes[getCreatureName(item2.uid)].level .. " for transform your Ditto in "..getCreatureName(item2.uid)..".")return trueendreturn TRUEendexhaustion.set(cid, mind, 240)doCreatureSay(getCreatureSummons(cid)[1], "CONTROL MIND!", TALKTYPE_MONSTER)doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), getThingPos(item2.uid), 39)registerCreatureEvent(item2.uid, "Controled")doSendMagicEffect(getThingPos(item2.uid), 136)doSendMagicEffect(getThingPos(item2.uid), 134)doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 133)setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))doConvinceCreature(cid, item2.uid)if getCreatureSpeed(item2.uid) == 0 thendoChangeSpeed(item2.uid, 180)enddoCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", control "..string.lower(getCreatureName(item2.uid)).."'s mind!", 1)local cmed = item2.uidlocal cmname = getCreatureName(getCreatureSummons(cid)[1])local cmpos = getThingPos(getCreatureSummons(cid)[1])doRemoveCreature(getCreatureSummons(cid)[1])local cmzao = doSummonCreature(""..cmname.." cm", cmpos)doConvinceCreature(cid, cmzao)setPlayerStorageValue(cid, 888, 1)local function check(params)if isCreature(params.cid) thenif getPlayerStorageValue(params.cid, 888) <= 0 thenreturn trueendif not isCreature(cmed) thenlocal pkcmpos = getThingPos(getCreatureSummons(cid)[1])doRemoveCreature(getCreatureSummons(cid)[1])local item = getPlayerSlotItem(cid, 8)local pk = doSummonCreature(getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."), pkcmpos)doConvinceCreature(cid, pk)doCreatureSetLookDir(getCreatureSummons(cid)[1], 2)registerCreatureEvent(pk, "DiePoke")registerCreatureEvent(pk, "Exp")registerCreatureEvent(cid, "PlayerPokeDeath")setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))setPlayerStorageValue(cid, 888, 0)endif params.rod == 20 thenlocal lifecmed = getCreatureMaxHealth(cmed) - getCreatureHealth(cmed)local poscmed = getThingPos(cmed)local cmeddir = getCreatureLookDir(cmed)local namecmed = getCreatureName(cmed)doRemoveCreature(getCreatureSummons(cid)[1])local back = doSummonCreature(""..namecmed.." s", poscmed)if getCreatureSpeed(back) == 0 thendoChangeSpeed(back, 180)enddoCreatureSetLookDir(back, cmeddir)doCreatureAddHealth(back, -lifecmed)local item = getPlayerSlotItem(cid, 8)local mynewpos = getThingPos(getCreatureSummons(cid)[1])doRemoveCreature(getCreatureSummons(cid)[1])pk = doSummonCreature(getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."), mynewpos)doConvinceCreature(cid, pk)doCreatureSetLookDir(getCreatureSummons(cid)[1], 2)registerCreatureEvent(pk, "DiePoke")registerCreatureEvent(pk, "Exp")registerCreatureEvent(cid, "PlayerPokeDeath")setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))setPlayerStorageValue(cid, 888, 0)elsedoSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 220)endendendfor rod = 1, 20 doaddEvent(check, rod*500, {cid = cid, rod = rod})endreturn trueendif item2.uid == cid thenif getPlayerStorageValue(cid, 888) >= 1 thendoPlayerSendCancel(cid, "You cant fly neither ride pokemons being controled.")return trueendif #getCreatureSummons(cid) == 0 and getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 thendoPlayerSendCancel(cid, "You need a pokemon to use order.")return trueendif getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and not isInArray(ridefly, getCreatureName(getCreatureSummons(cid)[1])) thendoPlayerSendCancel(cid, "You can't ride this pokemon nor fly with it.")return trueendif getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getCreatureSpeed(getCreatureSummons(cid)[1]) == 0 thenreturn trueend------------------------------------- RIDE ---------if getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 and isInArray(ride, getCreatureName(getCreatureSummons(cid)[1])) thenlocal pokemon = rides[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType]if getCreatureSpeed(getCreatureSummons(cid)[1]) >= 1 thendoChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1]))endlocal function ride(params)if isCreature(params.cid) thenif isCreature(getCreatureSummons(params.cid)[1]) thenif getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(cid)) <= params.d thendoChangeSpeed(cid, -250)doChangeSpeed(cid, pokemon[2])exhaustion.set(cid, etudao, 4)setPlayerStorageValue(cid, 17001, 1)doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))doRemoveCreature(getCreatureSummons(cid)[1])elsedirh = getDirectionTo(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(params.cid))if dirh == NORTHWEST thenif math.random(1,100) >= 51 thendirh = NORTHelsedirh = WESTendelseif dirh == SOUTHWEST thenif math.random(1,100) >= 51 thendirh = SOUTHelsedirh = WESTendelseif dirh == SOUTHEAST thenif math.random(1,100) >= 51 thendirh = SOUTHelsedirh = EASTendelseif dirh == NORTHEAST thenif math.random(1,100) >= 51 thendirh = NORTHelsedirh = EASTendendlocal dirh = dirhif getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 thendoChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1]))doPushCreature(getCreatureSummons(params.cid)[1], dirh, 1, 0)doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1]))elsedoPushCreature(getCreatureSummons(params.cid)[1], dirh, 1, 0)doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1]))endendendendendlocal function speed(params)if isCreature(params.cid) thenif isCreature(getCreatureSummons(params.cid)[1]) thenif getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 thendoChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1]))endendendenddoCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", let me ride you!", 1)exhaustion.set(cid, etudao, 4)if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 6 thendistanc = 1elsedistanc = 0endlocal distance = distancfor i=1,12 doaddEvent(ride, pokemon[3]*i, {cid = cid, d = distance})addEvent(speed, ((pokemon[3]*12)+100), {cid = cid})endreturn trueend------------------------------------- FLY ---------if getPlayerStorageValue(cid, 17001) >= 1 thensetPlayerStorageValue(cid, 17001, 0)if getPlayerGroupId(cid) ~= 6 thensetPlayerGroupId(cid, 8)enddoCreatureSetLookDir(cid, 2)doChangeSpeed(cid, -(getCreatureSpeed(cid)))if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 7 thendoChangeSpeed(cid, 400*getPlayerGroupId(cid))elsedoChangeSpeed(cid, 250)enddoRemoveCondition(cid, CONDITION_OUTFIT)local item = getPlayerSlotItem(cid, 8)doCreatureSay(cid, "" .. getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")..", let me get down!", 1)doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."))local pk = getCreatureSummons(cid)[1]registerCreatureEvent(cid, "PlayerPokeDeath")registerCreatureEvent(pk, "DiePoke")registerCreatureEvent(pk, "Exp")setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))return trueendif getPlayerStorageValue(cid, 17000) >= 1 thenif isInArray({460, 1022, 1023}, getTileInfo(getThingPos(cid)).itemid) thendoPlayerSendCancel(cid, "You can\'t stop flying at this height!")return trueendif getTileInfo(getThingPos(cid)).itemid >= 4820 and getTileInfo(getThingPos(cid)).itemid <= 4825 thendoPlayerSendCancel(cid, "Você não pode parar de voar na água!")return trueendif getPlayerGroupId(cid) ~= 6 thensetPlayerGroupId(cid, 8)enddoCreatureSetLookDir(cid, 2)setPlayerStorageValue(cid, 17000, 0)doChangeSpeed(cid, -(getCreatureSpeed(cid)))if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 7 thendoChangeSpeed(cid, 200*getPlayerGroupId(cid))elsedoChangeSpeed(cid, 250)enddoRemoveCondition(cid, CONDITION_OUTFIT)local item = getPlayerSlotItem(cid, 8)doCreatureSay(cid, "" .. getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")..", let me get down!", 1)doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."))local pk = getCreatureSummons(cid)[1]registerCreatureEvent(cid, "PlayerPokeDeath")registerCreatureEvent(pk, "DiePoke")registerCreatureEvent(pk, "Exp")setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))return trueendif getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and isInArray(fly, getCreatureName(getCreatureSummons(cid)[1])) thenif getPlayerStorageValue(cid, 17000) <= 0 thenlocal pokemon = flys[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType]local function fly(params)if isCreature(params.cid) thenif isCreature(getCreatureSummons(params.cid)[1]) thenif getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(cid)) <= params.dd thendoPlayerSendTextMessage(cid, 27, "Type 'up' or 'h1' to fly higher and 'down' or 'h2' to fly lower.")setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))setPlayerStorageValue(cid, 17000, 1)registerCreatureEvent(cid, "Flying")doChangeSpeed(cid, -250)doChangeSpeed(cid, pokemon[2])exhaustion.set(cid, etudao, 4)doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)doRemoveCreature(getCreatureSummons(cid)[1])elsedir = getDirectionTo(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(params.cid))if dir == NORTHWEST thenif math.random(1,100) >= 51 thendir = NORTHelsedir = WESTendelseif dir == SOUTHWEST thenif math.random(1,100) >= 51 thendir = SOUTHelsedir = WESTendelseif dir == SOUTHEAST thenif math.random(1,100) >= 51 thendir = SOUTHelsedir = EASTendelseif dir == NORTHEAST thenif math.random(1,100) >= 51 thendir = NORTHelsedir = EASTendendlocal dir = dirif getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 thendoChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1]))doPushCreature(getCreatureSummons(params.cid)[1], dir, 1, 0)doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1]))elsedoPushCreature(getCreatureSummons(params.cid)[1], dir, 1, 0)doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1]))endendendendendlocal function speed(params)if isCreature(params.cid) thenif isCreature(getCreatureSummons(params.cid)[1]) thenif getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 thendoChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1]))endendendenddoCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", let's fly!", 1)exhaustion.set(cid, etudao, 4)if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 6 thendistancc = 1elsedistancc = 0endlocal distancee = distanccfor i=1,12 doaddEvent(fly, pokemon[3]*i, {cid = cid, dd = distancee})addEvent(speed, ((pokemon[3]*12)+100), {cid = cid})endreturn trueendreturn trueendend------------------------------------- ROCK SMASH ---------if item2.itemid == 1285 and isInArray(systems["rock smash"], getCreatureName(getCreatureSummons(cid)[1])) thenif getMarkedPos(getCreatureSummons(cid)[1]).x == topos.x and getMarkedPos(getCreatureSummons(cid)[1]).y == topos.y thenreturn trueendmarkPos(getCreatureSummons(cid)[1], topos)markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid))doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", rock smash!", 1)addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "rock smash", isCreature(getCreatureTarget(cid)))return trueend------------------------------------- CUT ----------------if item2.itemid == 2767 and isInArray(systems["cut"], getCreatureName(getCreatureSummons(cid)[1])) thenif getMarkedPos(getCreatureSummons(cid)[1]).x == topos.x and getMarkedPos(getCreatureSummons(cid)[1]).y == topos.y thenreturn trueendmarkPos(getCreatureSummons(cid)[1], topos)markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid))doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", cut this!", 1)addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "cut", isCreature(getCreatureTarget(cid)))return trueend------------------------------------- DIG ----------------if isInArray(systems["digholes"], item2.itemid) and isInArray(systems["dig"], getCreatureName(getCreatureSummons(cid)[1])) thenif getMarkedPos(getCreatureSummons(cid)[1]).x == topos.x and getMarkedPos(getCreatureSummons(cid)[1]).y == topos.y thenreturn trueendmarkPos(getCreatureSummons(cid)[1], topos)markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid))doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", open that hole!", 1)addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "dig", isCreature(getCreatureTarget(cid)))return trueend------------------------------------- BLINK ----------------if #getCreatureSummons(cid) == 0 and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 thendoPlayerSendCancel(cid, "You need a pokemon to use order.")return trueendif not isMonster(item2.uid) and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 thenif isInArray(blink, getCreatureName(getCreatureSummons(cid)[1])) thenif exhaustion.get(cid, exhaustblink) thendoPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", move!", 1)doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1]))addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "move", isCreature(getCreatureTarget(cid)))if getMarkedPos(getCreatureSummons(cid)[1]).x == topos.x and getMarkedPos(getCreatureSummons(cid)[1]).y == topos.y thenreturn trueendmarkPos(getCreatureSummons(cid)[1], topos)markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid))addEvent(goThere, 500, getCreatureSummons(cid)[1], topos)elseif not isWalkable(topos, cid, 0, 0) thendoPlayerSendCancel(cid, "Your pokemon cannot teleport there.")return trueendif getItemName(item2.uid) == "shallow water" thendoPlayerSendCancel(cid, "Your pokemon cannot teleport there.")return trueendaddEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "move", isCreature(getCreatureTarget(cid)))doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), topos, 39)doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 211)doTeleportThing(getCreatureSummons(cid)[1], topos, false)doSendMagicEffect(topos, 134)doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", teleport there!", 1)doCreatureSay(getCreatureSummons(cid)[1], "BLINK!", TALKTYPE_MONSTER)addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "move", isCreature(getCreatureTarget(cid)))exhaustion.set(cid, exhaustblink, cdblink)addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "move", isCreature(getCreatureTarget(cid)))return trueendreturn trueendend------------------------------------- LIGHT ----------------if isCreature(item2.uid) and getCreatureMaster(item2.uid) == cid and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 and item2.uid ~= cid thenif not isInArray(light, getCreatureName(getCreatureSummons(cid)[1])) thendoPlayerSendCancel(cid, "Esse pokemon não tem LIGHT.")return trueendif isInArray(light, getCreatureName(getCreatureSummons(cid)[1])) thenif not isMonster(item2.uid) and getCreatureMaster(item2.uid) ~= cid thenreturn doPlayerSendCancel(cid,"Por Favor usar LIGHT em seu pokemon.")endif exhaustion.get(cid, exhautStorage) thendoPlayerSendCancel(cid,"Por Favor espere alguns segundos para usar LIGHT denovo!")return trueendexhaustion.set(cid, exhautStorage, cd)doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use light!", 1)doCreatureSay(getCreatureSummons(cid)[1], "LIGHT!", TALKTYPE_MONSTER)doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28)doSetCreatureLight(getCreatureSummons(cid)[1], 8, 215, time*1000)return trueendend------------------------------------- MOVE ---------if getMarkedPos(getCreatureSummons(cid)[1]).x == topos.x and getMarkedPos(getCreatureSummons(cid)[1]).y == topos.y thenreturn trueendmarkPos(getCreatureSummons(cid)[1], topos)markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid))doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", move!", 1)addEvent(goThere, 500, getCreatureSummons(cid)[1], topos, "move", isCreature(getCreatureTarget(cid)))return trueend-----------------------------
Editado Outubro 14 por Iluargrott2
if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and isInArray(fly, getCreatureName(getCreatureSummons(cid)[1])) then
local fly_areas, canFly = {
--{fromPos = {posição_superior_esquerda_da_área}, toPos = {posição_inferior_direita_da_área}},
{fromPos = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}},
{fromPos = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}},
--etc
}
for _, coordinates in pairs(fly_areas) do
if isInRange(getThingPos(cid), coordinates.fromPos, coordinates.toPos) then
canFly = true
break
end
end
if not canFly then
return doPlayerSendCancel(cid, "You can't fly here.")
end
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Testado e aprovado! ![]()
Porém esqueci de algo, desculpe.
O player consegue voar em x área pré selecionada, porém ele pode sair voando pra qualquer lugar após o fly.
Editado Outubro 15 por Iluargrott2
Se possível, poste o arquivo relacionado ao sistema de fly encontrado em data/movements/scripts.
info
Grupo: Marquês
Registrado: 03/02/13
Posts: 1.2k
Reputação: +254
Gênero: Masculino
Char no Tibia: Partiu Baladinha

Assim que o membro @zipter98 terminar o suporte com o novo pedido irei mover o tópico.
Editado Outubro 15 por Lumus
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Se possível, poste o arquivo relacionado ao sistema de fly encontrado em data/movements/scripts.
local del = {'460', '1022', '1023'}local updown = {'1', '3'}function onStepIn(cid, item, frompos, item2, topos)if getPlayerStorageValue(cid, 17000) <= 0 thendoTeleportThing(cid, topos, false)doRemoveItem(getTileThingByPos(frompos).uid, 1)if isPlayer(cid) thendoPlayerSendCancel(cid, "You can't fly.")endreturn trueendif getPlayerStorageValue(cid, 17000) >= 1 thenif topos.z == frompos.z thenif getCreatureOutfit(cid).lookType == 316 theneffect = 136elseeffect = 2enddoSendMagicEffect(topos, effect)endendfor x=-1,1 dofor y=-1,1 doposa = {x=topos.x+x,y=topos.y+y,z=topos.z}if isInArray(del, getTileThingByPos(posa).itemid) thendoRemoveItem(getTileThingByPos(posa).uid, 1)endendendfor x=-1,1 dofor y=-1,1 dopose = {x=frompos.x+x,y=frompos.y+y,z=frompos.z}if getTileThingByPos(pose).itemid == 0 thendoCombatAreaHealth(cid, 0, pose, 0, 0, 0, CONST_ME_NONE)doCreateItem(460, 1, pose)endendenddoCombatAreaHealth(cid, 0, topos, 0, 0, 0, CONST_ME_NONE)doCreateItem(460, 1, frompos)if topos.z > frompos.z thendoCreateItem(1023, 1, frompos)doTransformItem(getTileThingByPos(frompos).uid, 1023)elseif topos.z < frompos.z thendoCreateItem(1022, 1, frompos)doTransformItem(getTileThingByPos(frompos).uid, 1022)endreturn trueend
if getPlayerStorageValue(cid, 17000) >= 1 then
local fly_areas, canFly = {
--{fromPos = {posição_superior_esquerda_da_área}, toPos = {posição_inferior_direita_da_área}},
{fromPos = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}},
{fromPos = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}},
--etc
}
for _, coordinates in pairs(fly_areas) do
if isInRange(getThingPos(cid), coordinates.fromPos, coordinates.toPos) then
canFly = true
break
end
end
if not canFly then
doPlayerSendCancel(cid, "You can't fly here.")
doTeleportThing(cid, frompos)
return true
endinfo
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Continua voando :\
Como meu jogo é dividido por mapas e tuneis, talvez colocar um tile na saída que impeça-o de passar com a storage do FLY?
Uhum, mais viável.
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Obrigado ZIpter! ![]()
Grato pela sua ativa ajuda em meu projeto. Podem dar o tópico como solucionado.
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Tópico Movido
Este tópico foi movido de "OTServ → Suporte OTServ → Suporte Scripting"
para "OTServ → Suporte OTServ → Suporte Scripting → Pedidos e dúvidas resolvidos - Scripting".





info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18
Provavelmente precisa ser no actions/scripts/Moves, né não? JAHAHAHA
Então, amigos.
Preciso de um suporte, para fechar com chave de ouro o Order do meu projeto.
Eu preciso que o Fly/Surf sejam proíbidos em certas áreas, ou melhor (como serão poucas as áreas possíveis..) que sejam possíveis somente em tal área, tipo, de x, y, z, to x,y,z.
AGRADEÇO desde já