Postado Dezembro 29, 2014 10 anos Autor o Teleporte seria esse? aonde ficaria a area de mudar o efeito para quando ser teleportado e chegar teleportado Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Dezembro 30, 2014 10 anos aonde ficaria a area de mudar o efeito para quando ser teleportado e chegar teleportado Editei e puis essa besteirinha, no efeitoplayer é o efeito de tp no player, e efeitopoke é o efeito de tp no poke local efeitoplayer = 29 local efeitopoke = CONST_ME_TELEPORT local poke = {"Shiny Xatu", "Jynx", "Shiny Jynx", "Xatu", "Natu", "Exeggutor", "Slowking", "Slowbro", "Shiny Mr. Mime", 'Mew', 'Mewtwo', 'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Shiny Abra', 'Shiny Alakazam', 'Shiny Hypno', 'Porygon2'} --alterado v1.9 local etele = 222468 local cdtele = 1800 local config = { premium = false, -- se precisa ser premium account (true or false) battle = true -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas } local places = { [1] = {name = "Saffron", id = 1, sto = 897530}, [2] = {name = "Cerulean", id = 2, sto = 897531}, [3] = {name = "Lavender", id = 3, sto = 897532}, [4] = {name = "Fuchsia", id = 4, sto = 897533}, [5] = {name = "Celadon", id = 5, sto = 897534}, [6] = {name = "Viridian", id = 6, sto = 897535}, --alterado v1.7 [7] = {name = "Vermilion", id = 7, sto = 897536}, [8] = {name = "Pewter", id = 8, sto = 897537}, [9] = {name = "Pallet", id = 18}, [10] = {name = "Cinnabar", id = 9, sto = 897538}, [11] = {name = "Snow", id = 10, sto = 897539}, } function onSay(cid, words, param) if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "Você precisa de um pokemon para usar teleporte.") return true end if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then return 0 end if getPlayerStorageValue(cid, 22545) == 1 then --golden arena doPlayerSendCancel(cid, "Você não pode fazer isso enquanto esta na golden arena!") return true end if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6 return doPlayerSendCancel(cid, "Você não pode fazer isso com um pokemon com a mente controlada!") end if getPlayerStorageValue(cid, 52480) >= 1 then return doPlayerSendCancel(cid, "Você não pode teleporta enquanto um duelo!") --alterado v2.6 end if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then local tempo = tonumber(exhaustion.get(cid, etele)) or 0 local min = math.floor(tempo) doPlayerSendCancel(cid, "Seu pokemon está cansado, espere "..getStringmytempo(tempo).." para se teletransportar novamente.") return true end if config.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Somente usuários especiais estão autorizados a usar teleportet.") return true end if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Os seus pokemon não consegue se concentrar durante as batalhas.") return true end if (param == '') then local str = "" str = str .. "Places to go :\n\nHouse\n" for a = 1, #places do str = str..""..places[a].name.."\n" end doShowTextDialog(cid, 7416, str) return true end local item = getPlayerSlotItem(cid, 8) local nome = getPokeballName(item.uid) local summon = getCreatureSummons(cid)[1] local lastppos = getThingPos(cid) local lastspos = getThingPos(summon) local telepos = {} local myplace = "" local townid = 0 if string.lower(param) == "house" then if not getHouseByPlayerGUID(getPlayerGUID(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não é dono de uma casa.") return true end telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))) myplace = "our home" else for x = 1, #places do if string.find(string.lower(places[x].name), string.lower(param)) then townid = places[x].id myplace = places[x].name end end if myplace == "" then doPlayerSendCancel(cid, "Esse lugar não existe.") return true end end if myplace ~= "" and townid > 0 then telepos = getTownTemplePosition(townid) end if getDistanceBetween(getThingPos(cid), telepos) <= 15 then doPlayerSendCancel(cid, "Você está muito perto do lugar que você quer ir!") return true end doSendMagicEffect(getThingPos(summon), 29) doSendMagicEffect(getThingPos(cid), efeitoplayer) doTeleportThing(cid, telepos, false) local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH)) doTeleportThing(summon, pos2, false) doSendMagicEffect(getThingPos(cid), 29) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos) doCreatureSetLookDir(cid, SOUTH) doCreatureSetLookDir(summon, SOUTH) doSendMagicEffect(getThingPos(summon), efeitopoke) exhaustion.set(cid, etele, cdtele) return true end _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Dezembro 30, 2014 10 anos 2º function onSay(cid, words, param) if not param then return doPlayerSendCancel(cid, "Especifique os parâmetros.") end local p = param:explode(",") local itemid = tonumber(p[1]) local qnt = tonumber(p[2]) local msg = p[3] if not itemid then return doPlayerSendCancel(cid, "Sorry, not possible.") elseif not qnt then qnt = 1 --quantidade padrão elseif not msg then msg = "You received "..qnt.." "..getItemNameById(itemid).." from the admin." --msg padrão end for _, pid in pairs(getPlayersOnline()) do doPlayerAddItem(pid, itemid, qnt) doPlayerSendTextMessage(pid, 27, msg) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You gave to all players online "..qnt.." "..getItemNameById(itemid)..".") return true end Suponho que saiba fazer a tag em talkactions.xml, certo? Modo de uso é como você especificou no tópico: itemid,quantidade,mensagem Editado Dezembro 30, 2014 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Dezembro 30, 2014 10 anos Autor Editei e puis essa besteirinha, no efeitoplayer é o efeito de tp no player, e efeitopoke é o efeito de tp no poke local efeitoplayer = 29 local efeitopoke = CONST_ME_TELEPORT local poke = {"Shiny Xatu", "Jynx", "Shiny Jynx", "Xatu", "Natu", "Exeggutor", "Slowking", "Slowbro", "Shiny Mr. Mime", 'Mew', 'Mewtwo', 'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Shiny Abra', 'Shiny Alakazam', 'Shiny Hypno', 'Porygon2'} --alterado v1.9 local etele = 222468 local cdtele = 1800 local config = { premium = false, -- se precisa ser premium account (true or false) battle = true -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas } local places = { [1] = {name = "Saffron", id = 1, sto = 897530}, [2] = {name = "Cerulean", id = 2, sto = 897531}, [3] = {name = "Lavender", id = 3, sto = 897532}, [4] = {name = "Fuchsia", id = 4, sto = 897533}, [5] = {name = "Celadon", id = 5, sto = 897534}, [6] = {name = "Viridian", id = 6, sto = 897535}, --alterado v1.7 [7] = {name = "Vermilion", id = 7, sto = 897536}, [8] = {name = "Pewter", id = 8, sto = 897537}, [9] = {name = "Pallet", id = 18}, [10] = {name = "Cinnabar", id = 9, sto = 897538}, [11] = {name = "Snow", id = 10, sto = 897539}, } function onSay(cid, words, param) if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "Você precisa de um pokemon para usar teleporte.") return true end if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then return 0 end if getPlayerStorageValue(cid, 22545) == 1 then --golden arena doPlayerSendCancel(cid, "Você não pode fazer isso enquanto esta na golden arena!") return true end if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6 return doPlayerSendCancel(cid, "Você não pode fazer isso com um pokemon com a mente controlada!") end if getPlayerStorageValue(cid, 52480) >= 1 then return doPlayerSendCancel(cid, "Você não pode teleporta enquanto um duelo!") --alterado v2.6 end if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then local tempo = tonumber(exhaustion.get(cid, etele)) or 0 local min = math.floor(tempo) doPlayerSendCancel(cid, "Seu pokemon está cansado, espere "..getStringmytempo(tempo).." para se teletransportar novamente.") return true end if config.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Somente usuários especiais estão autorizados a usar teleportet.") return true end if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Os seus pokemon não consegue se concentrar durante as batalhas.") return true end if (param == '') then local str = "" str = str .. "Places to go :\n\nHouse\n" for a = 1, #places do str = str..""..places[a].name.."\n" end doShowTextDialog(cid, 7416, str) return true end local item = getPlayerSlotItem(cid, 8) local nome = getPokeballName(item.uid) local summon = getCreatureSummons(cid)[1] local lastppos = getThingPos(cid) local lastspos = getThingPos(summon) local telepos = {} local myplace = "" local townid = 0 if string.lower(param) == "house" then if not getHouseByPlayerGUID(getPlayerGUID(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não é dono de uma casa.") return true end telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))) myplace = "our home" else for x = 1, #places do if string.find(string.lower(places[x].name), string.lower(param)) then townid = places[x].id myplace = places[x].name end end if myplace == "" then doPlayerSendCancel(cid, "Esse lugar não existe.") return true end end if myplace ~= "" and townid > 0 then telepos = getTownTemplePosition(townid) end if getDistanceBetween(getThingPos(cid), telepos) <= 15 then doPlayerSendCancel(cid, "Você está muito perto do lugar que você quer ir!") return true end doSendMagicEffect(getThingPos(summon), 29) doSendMagicEffect(getThingPos(cid), efeitoplayer) doTeleportThing(cid, telepos, false) local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH)) doTeleportThing(summon, pos2, false) doSendMagicEffect(getThingPos(cid), 29) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos) doCreatureSetLookDir(cid, SOUTH) doCreatureSetLookDir(summon, SOUTH) doSendMagicEffect(getThingPos(summon), efeitopoke) exhaustion.set(cid, etele, cdtele) return true end 2º function onSay(cid, words, param) if not param then return doPlayerSendCancel(cid, "Especifique os parâmetros.") end local p = param:explode(",") local itemid = tonumber(p[1]) local qnt = tonumber(p[2]) local msg = p[3] if not itemid then return doPlayerSendCancel(cid, "Sorry, not possible.") elseif not qnt then qnt = 1 --quantidade padrão elseif not msg then msg = "You received "..qnt.." "..getItemNameById(itemid).." from the admin." --msg padrão end for _, pid in pairs(getPlayersOnline()) do doPlayerAddItem(pid, itemid, qnt) doPlayerSendTextMessage(pid, 27, msg) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You gave to all players online "..qnt.." "..getItemNameById(itemid)..".") return true end Suponho que saiba fazer a tag em talkactions.xml, certo? Modo de uso é como você especificou no tópico: itemid,quantidade,mensagem já já eu testo agora vou sair se funcionar rep+ para os 2 Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
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.