Ir para conteúdo

[Encerrado] [DÚVIDA] Pokemon PDA By Slicer


TraaNe

Posts Recomendados

Eai Beleza Pessoal?

Gostaria De Saber Se Existe Um Sistem Vip Perfeito Para Pokemon Pda

Tipo Qria Um Vip System Mesmo Esquema Do Svke

 

Fly Só Pra Vip

Areas Vips

Itens Tipo Diamonds

Quest Exclusivas

 

 

 

Bom Só Isso

Agradeço !

Link para o comentário
Compartilhar em outros sites

  • Respostas 67
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Isso é super fácil de fazer, as áreas VIP, você terá que baixar ou fazer o mapa, as quests também, já o Fly e os Diamonds, eu poderia ajudar! Me passe o seu script de Fly!

Link para o comentário
Compartilhar em outros sites

Usuario, para facilitar vou postar um npc que troca 10 small diamonds por 31 dias de vip.

 

crie um npc a sua escolha com .XML (ex:DinoAdmin.xml) e cole isso dentro:

 

 

<?xml version="1.0" encoding="UTF-8"?>

<npc name="DinoAdmin" script="data/npc/scripts/diamond.lua" walkinterval="3000" floorchange="0" access="5" >

<health now="150" max="150"/>

<look type="545" head="0" body="114" legs="114" feet="0"/>

<parameters>

<parameter key="message_greet" value="Bem-vindo a loja do diamond, aqui voce pode comprar sua Premium , mudar de sexo e comprar bencao.Para ver as ofertas diga 'offer' "/>

<parameter key="message_farewell" value="Ate a proxima, Beijoss!"/>

</parameters>

</npc>

 

 

salve em data/npc.

 

Agora crie um arquivo chamado diamond.lua e cole isso dentro

 

 

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end

function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end

function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end

function onThink() npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid

-- Conversa Jogador/NPC

if(msgcontains(msg, 'offer') or msgcontains(msg, 'offer')) then

selfSay('Para Premium diga ( premium ) Para bencao diga ( bencao ) Para trocar de sexo diga ( trocar sexo ) Para trocar de cidade natal diga ( cidade natal ).', cid)

elseif(msgcontains(msg, 'premium') or msgcontains(msg, 'Premium')) then

selfSay('dialogo da premium - diga sim para comprar-', cid)

talkState[talkUser] = 1

elseif(msgcontains(msg, 'bencao') or msgcontains(msg, 'Bencao')) then

selfSay('Com bencao reduz sua penalidade quando morto ( perde menos XP skills etc..) ela custa apenas 3 Diamond.Deseja ter a Bencao??', cid)

talkState[talkUser] = 2

elseif(msgcontains(msg, 'trocar sexo') or msgcontains(msg, 'trocar sexo')) then

selfSay('Para trocar de sexo sao nescessarios 5 Diamonds. Deseja mudar seu sexo??', cid)

talkState[talkUser] = 3

elseif(msgcontains(msg, 'cidade natal') or msgcontains(msg, 'cidade natal')) then

selfSay('deseja trocar de cidade natal? custa apenasDiamond. Deseja trocar Cidade Natal??', cid)

talkState[talkUser] = 4

-- Confirmação da Compra

elseif(msgcontains(msg, 'sim') and talkState[talkUser] == 1) then

if(doPlayerRemoveItem(cid, 2145, 10) == true) then

selfSay('Parabens, Premium de 30 dias!', cid)

doPlayerAddPremiumDays(cid, 31)

talkState[talkUser] = 0

else

selfSay('Voce nao tem Diamonds suficientes.', cid)

talkState[talkUser] = 0

end

elseif(msgcontains(msg, 'sim') and talkState[talkUser] == 2) then

if getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) and getPlayerBlessing(cid, 5) then

selfSay('Voce ja esta usando bencao!', cid)

else

if(doPlayerRemoveItem(cid, 2145, 3) == true) then

selfSay('Thanks!', cid)

doPlayerAddBlessing(cid, 1)

doPlayerAddBlessing(cid, 2)

doPlayerAddBlessing(cid, 3)

doPlayerAddBlessing(cid, 4)

doPlayerAddBlessing(cid, 5)

talkState[talkUser] = 0

else

selfSay('Voce nao tem Diamonds suficientes.', cid)

talkState[talkUser] = 0

end

end

elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then

if(doPlayerRemoveItem(cid, 2145, 5) == true) then

selfSay('Thanks!', cid)

if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then

doPlayerSetSex(cid, PLAYERSEX_MALE)

else

doPlayerSetSex(cid, PLAYERSEX_FEMALE)

end

talkState[talkUser] = 0

else

selfSay('Você nao tem Diamonds suficientes.', cid)

talkState[talkUser] = 0

end

elseif(msgcontains(msg, 'sendas') and talkState[talkUser] == 4) then

if(doPlayerRemoveItem(cid, 2145, 5) == true) then

selfSay('Thanks!', cid)

doPlayerSetTown(cid, 2)

talkState[talkUser] = 0

else

selfSay('Você nao tem Diamonds suficientes.', cid)

talkState[talkUser] = 0

end

elseif(msgcontains(msg, 'falador') and talkState[talkUser] == 4) then

if(doPlayerRemoveItem(cid, 2145, 5) == true) then

selfSay('Thanks!', cid)

doPlayerSetTown(cid, 1)

talkState[talkUser] = 0

else

selfSay('Você não tem Dimond suficientes.', cid)

talkState[talkUser] = 0

end

end

return TRUE

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

 

 

Salve em "data/npc/script"

 

agora é so vc por em config.lua o status do premium (coloque false)

Link para o comentário
Compartilhar em outros sites

Usuario vamos lá:

vá em data/movements/procure por fly apague tudo que estiver dentro e cole isto:

 

 

 

local del = {'460', '1022', '1023', '1024'}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

position.stackpos = 0

local premium = true

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

if getPlayerStorageValue(cid, 17000) <= 0 then

doTeleportThing(cid, fromPosition, false)

doRemoveItem(getTileThingByPos(position).uid, 1)

doPlayerSendCancel(cid, "You can't fly.")

return true

end

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

doAreaCombatHealth(cid, FLYSYSTEMDAMAGE, getThingPos(cid), splash, 0, 0, 255)

local pos = getThingPos(cid)

if pos.z == 7 then return true end

pos.z = pos.z + 1

for i = 0, 255 do

pos.stackpos = i

local tile = getTileThingByPos(pos)

if tile.itemid ~= 0 and not isCreature(tile.uid) then

if hasProperty(tile.uid, 3) or hasProperty(tile.uid, 7) or tile.itemid == 919 then

doTransformItem(item.uid, 11677)

end

end

end

return true

end

function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

local effect = 2

if toPosition.z == fromPosition.z and getCreatureOutfit(cid).lookType ~= 316 and getCreatureOutfit(cid).lookType ~= 648 then

doSendMagicEffect(fromPosition, effect)

end

local oldtpos = fromPosition

oldtpos.stackpos = STACKPOS_GROUND

 

if getTileThingByPos(oldtpos).itemid >= 1 then

doRemoveItem(getTileThingByPos(oldtpos).uid, 1)

end

return true

end

 

 

 

Agora o Surf. (em data/movements/ procure por surf.lua apague tudo e cole isto)

 

 

 

ocal 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}

--alterado v2.5

local flie = {'4820', '4821', '4822', '4823', '4824', '4825'}

--alterado v2.6 tabela agora em configuration.lua!

local premium = true

function onStepIn(cid, item, position, fromPosition)

if not isPlayer(cid) or getPlayerAccess(cid) >= 6 then

return true

end

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

if (not isInArray(specialabilities["surf"], getPokemonName(getCreatureSummons(cid)[1]))) then --alterado v2.6

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 v2.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 v2.6

doTeleportThing(cid, fromPosition, false)

return true

end

--alterado v2.6

doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1)

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)

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)

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 v2.6

 

doTeleportThing(pk, fromPosition, false)

doTeleportThing(pk, getThingPos(cid), true)

doCreatureSetLookDir(pk, getCreatureLookDir(cid))

adjustStatus(pk, item.uid, true, false, true)

end

return true

end

 

 

 

 

Agora o teleport. Vá em data/talkaction/ procure por tele.lua apague tudo que estiver dentro e cole isto:

 

 

 

local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Porygon2', "Shiny Abra",

"Shiny Kadabra", "Shiny Alakazam", "Shiny Drowzee", "Shiny Hypno", "Shiny Mr. Mime", "Shiny Porygon"}

local etele = 9499

local cdtele = 1800

local config = {

premium = true, -- 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},

[2] = {name = "Cerulean", id = 2},

[3] = {name = "Lavender", id = 3},

[4] = {name = "Fuchsia", id = 4},

[5] = {name = "Celadon", id = 5},

[6] = {name = "Pewter", id = 6},

[7] = {name = "Pallet", id = 7},

[8] = {name = "Viridian", id = 8},

[9] = {name = "Vermilion", id = 9},

[10] = {name = "Cinnabar", id = 10},

[11] = {name = "Unnamed Town", id = 11},

[12] = {name = "Diamond City", id = 12},

[13] = {name = "Hasland Island", id = 13},

}

function onSay(cid, words, param)

if #getCreatureSummons(cid) == 0 then

doPlayerSendCancel(cid, "You need a pokemon to use teleport.")

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, "You can't do that while the golden arena!")

return true

end

 

if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6

return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!")

end

if getPlayerStorageValue(cid, 52480) >= 1 then

return doPlayerSendCancel(cid, "You can't do it while a duel!") --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, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.")

return true

end

if config.premium and not isPremium(cid) then

doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.")

return true

end

if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then

doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")

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, "You don't own a house.")

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, "That place doesn't exist.")

return true

end

end

if myplace ~= "" and townid > 0 then

telepos = getTownTemplePosition(townid)

end

if getDistanceBetween(getThingPos(cid), telepos) <= 15 then

doPlayerSendCancel(cid, "You are too near to the place you want to go!")

return true

end

doSendMagicEffect(getThingPos(summon), 29)

doSendMagicEffect(getThingPos(cid), 29)

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), CONST_ME_TELEPORT)

exhaustion.set(cid, etele, cdtele)

return true

end

 

 

 

 

Agora voce tem fly,surf,teleport somente para vip.

 

Agora vá em Config.lua procure por :

 

-- Premium-related
freePremium = true
premiumForPromotion = true

 

Onde esta true voce coloca "false"

 

Fonte: Servidor do Slicer.

Ediçao:DinoAdmin

Editado por DinoAdmin
Link para o comentário
Compartilhar em outros sites

Para Fly,Ride,etc ser apenas para Premiums, não vai precisar de NPC algum. Basta adiciona a função "if isPremium(cid) then" nos scripts. Irei aguardar ele postar os scripts de Order dele e então basta arrumar!

 

@EDIT

Tente assim:

 

local del = {'460', '1022', '1023', '1024'}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

position.stackpos = 0

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

   if getPlayerStorageValue(cid, 17000) <= 0 then
   if isPremium(cid) then
       doTeleportThing(cid, fromPosition, false)
       doRemoveItem(getTileThingByPos(position).uid, 1)
       doPlayerSendCancel(cid, "You can't fly.")
   return true
   end
   end

   doAreaCombatHealth(cid, FLYSYSTEMDAMAGE, getThingPos(cid), splash, 0, 0, 255)

local pos = getThingPos(cid)
   if pos.z == 7 then return true end
pos.z = pos.z + 1

   for i = 0, 255 do
    pos.stackpos = i
    local tile = getTileThingByPos(pos)
    if tile.itemid ~= 0 and not isCreature(tile.uid) then
	    if hasProperty(tile.uid, 3) or hasProperty(tile.uid, 7) or tile.itemid == 919 then
		    doTransformItem(item.uid, 11677)
	    end
    end
   end

return true
end

function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

local effect = 2

   if toPosition.z == fromPosition.z and getCreatureOutfit(cid).lookType ~= 316 and getCreatureOutfit(cid).lookType ~= 648 then
       doSendMagicEffect(fromPosition, effect)
   end

local oldtpos = fromPosition
oldtpos.stackpos = STACKPOS_GROUND


if getTileThingByPos(oldtpos).itemid >= 1 then
doRemoveItem(getTileThingByPos(oldtpos).uid, 1)
end

return true
end   

Editado por Roksas
Link para o comentário
Compartilhar em outros sites

Voce Quer Npc Diamond Que da Fly Somente Para os VIP ?

Não Ele Quer, Que Fly, Ride Etc.. Seja Para Premiuns, Dai Ele Vai Precisa De Um NPC Que Ja Foi Postador E Edita No Scripts!

 

Eu tenho Npc Que da A vip Por 10 Diamond ele da 30 dias VIP e Fly Ride Teport Que so usam Comprando VIP no Diamond =) isso que ele quer ?

Link para o comentário
Compartilhar em outros sites

Voce Quer Npc Diamond Que da Fly Somente Para os VIP ?

Não Ele Quer, Que Fly, Ride Etc.. Seja Para Premiuns, Dai Ele Vai Precisa De Um NPC Que Ja Foi Postador E Edita No Scripts!

 

Eu tenho Npc Que da A vip Por 10 Diamond ele da 30 dias VIP e Fly Ride Teport Que so usam Comprando VIP no Diamond =) isso que ele quer ?

se voce percebeu eu já diponibilizei o npc que tem esta funçao.

Link para o comentário
Compartilhar em outros sites

Não Sei Se é esse

Mas Acho Q esse Order

http://wklej.org/id/900692/

 

 

E tipo Outra A Coisa

Os personagens Podem Logar Com Pz ;S Como Arruma

A E eu Só Qeria Q Vips Podesse USar Ride E Fly O Resto Free

E Tipo Comprar Os Só Por Site

 

 

Desculpem Exigir Muito ;)

Mas Agradeço Todos !!

Link para o comentário
Compartilhar em outros sites

Lek Entao Tome O Orden.lua La em data/Actions/scrpts/Orden.lua Meu =)

 

 

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 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"},

}

-- NAME OUTFIT SPEED

local flys = {

["Moltres"] = {229, 2300}, -- moltres

["Articuno"] = {230, 2100}, -- artic

["Zapdos"] = {224, 2600}, -- zapdos

["Mew"] = {232, 2200}, -- 1000

["Mewtwo"] = {233, 2200},-- two

["Dragonite"] = {221, 1300},-- nite

["Pidgeot"] = {222, 900}, -- geot

["Fearow"] = {226, 800}, -- fearow

["Aerodactyl"] = {227, 1100}, -- aero

["Charizard"] = {216, 1000}, -- chari

["Porygon"] = {316, 600}, -- porygon

}

function onUse(cid, item, frompos, item2, topos)

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)

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

doTeleportThing(pk, getThingPos(cid), false)

doCreatureSetLookDir(pk, getCreatureLookDir(cid))

adjustStatus(pk, item.uid, true, false, true)

doPlayerSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", let me get down!", 1)

doChangeSpeed(cid, - getCreatureSpeed(cid))

doChangeSpeed(cid, PlayerSpeed)

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)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["rock smash"][math.random(1, #txt["rock smash"])].."", 1)

addEvent(goThere, 500, mysum, topos, "rock smash", isCreature(getCreatureTarget(cid)))

return true

end

-----------------------------

-------- HEADBUTT -----------

if item2.itemid == 2706 and isInArray(skills["headbutt"], getPokemonName(mysum)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["headbutt"][math.random(1, #txt["headbutt"])].."", 1)

addEvent(goThere, 500, mysum, topos, "headbutt", isCreature(getCreatureTarget(cid)))

return true

end

---------------------------

 

-------- CUT ----------------

if item2.itemid == 2767 and isInArray(skills["cut"], getPokemonName(mysum)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["cut"][math.random(1, #txt["cut"])].."", 1)

addEvent(goThere, 500, mysum, topos, "cut", isCreature(getCreatureTarget(cid)))

return true

end

-----------------------------

-------- TRANSFORM ----------

if getCreatureName(mysum) == "Ditto" and isMonster(item2.uid) then

if item2.uid == mysum then

if isTransformed(mysum) then

deTransform(mysum, getItemAttribute(thisball.uid, "transTurn"))

markPos(mysum, unfix)

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["untransform"][math.random(1, #txt["untransform"])].."", 1)

return true

end

doPlayerSendCancel(cid, "Your ditto is not transformed.")

markPos(mysum, unfix)

return true

end

if getCreatureName(item2.uid) == "Ditto" then

doPlayerSendCancel(cid, "Your ditto can't transform into another ditto.")

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

local cd = getCD(thisball.uid, "trans", 40)

if cd > 0 then

doPlayerSendCancel(cid, "Your pokemon is too tired to transform again. Cooldown: ("..getStringmytempo(cd)..")")

return true

end

if getHappiness(mysum) <= 50 then

doSendMagicEffect(getThingPos(mysum), happinessRate[1].effect)

markPos(mysum, unfix)

return true

end

local turn = getItemAttribute(thisball.uid, "transTurn")

if not turn or turn > 10 then

doItemSetAttribute(thisball.uid, "transTurn", 0)

else

doItemSetAttribute(thisball.uid, "transTurn", turn + 1)

end

local time = 140 + 2 * getPokemonLevel(mysum)

turn = getItemAttribute(thisball.uid, "transTurn")

markPos(mysum, unfix)

setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid))

doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1)

addEvent(deTransform, time * 1000, mysum, turn)

doSendMagicEffect(getThingPos(mysum), 184)

doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER)

local name = getCreatureName(item2.uid)

setCD(thisball.uid, "trans", 40)

doItemSetAttribute(thisball.uid, "transBegin", os.clock())

doSetItemAttribute(thisball.uid, "transLeft", time)

doSetItemAttribute(thisball.uid, "transOutfit", getCreatureOutfit(item2.uid).lookType)

doSetItemAttribute(thisball.uid, "transName", getCreatureName(item2.uid))

doFaceCreature(mysum, getThingPos(item2.uid))

doPlayerSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", 1)

if dittoCopiesStatusToo then

doSetItemAttribute(thisball.uid, "boffense", dittoBonus * getOffense(item2.uid))

doSetItemAttribute(thisball.uid, "bdefense", dittoBonus * getDefense(item2.uid))

doSetItemAttribute(thisball.uid, "bsattack", dittoBonus * getSpecialAttack(item2.uid))

doSetItemAttribute(thisball.uid, "bagility", dittoBonus * getSpeed(item2.uid))

adjustStatus(mysum, thisball.uid)

end

return true

end

-----------------------------

-------- LIGHT --------------

if isMonster(item2.uid) and getCreatureMaster(item2.uid) == cid 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"])].."", 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"])].."", 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", 170)

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"])].."", 1)

addEvent(goThere, 500, mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist)

return true

end

local distance = getDistanceBetween(getThingPos(mysum), topos)

markPos(mysum, unfix)

setCD(thisball.uid, "blink", distance * 12)

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["blink"][math.random(1, #txt["blink"])].."", 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, "move", isCreature(getCreatureTarget(cid)))

return true

end

-----------------------------

 

----START FLYorRIDE ---------

if (item2.uid == cid or getRecorderPlayer(topos) == cid) and (isInArray(skills["fly"], getPokemonName(mysum)) or isInArray(skills["ride"], getPokemonName(mysum))) then

if not isPremium(cid) then

doPlayerSendCancel(cid, "Only premium members are allowed to fly.")

return true

end

local pct = getCreatureHealth(mysum) / getCreatureMaxHealth(mysum)

doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", 1 - pct)

if isInArray(skills["fly"], getPokemonName(mysum)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["fly"][math.random(1, #txt["fly"])].."", 1)

addEvent(goThere, 500, mysum, topos, "fly", isCreature(getCreatureTarget(cid)))

else

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["ride"][math.random(1, #txt["ride"])].."", 1)

addEvent(goThere, 500, mysum, topos, "ride", isCreature(getCreatureTarget(cid)))

end

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"])].."", 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

-----------------------------

 

 

 

Fly Premium E Ride Premium =) se funfar Avisa

Editado por Flavio97
Link para o comentário
Compartilhar em outros sites

TraaNe, Eu disponibilizei o script de fly,surf,teleport,npc vip somente para PREMIUM.

basta voce fazer como eu falei.

e ai é so voce vender small diamonds no site que o jogador compra os small diamonds e trocam por 31 dias de vip, porendo usar as habilidades

Editado por DinoAdmin
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.

×
×
  • Criar Novo...