Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''advanced''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 8 registros

  1. •[Pokemon] PDA v1.8 (Slicer) com editaçoes no mapa (totalmente refeito)• • Menu: ├ Informações; ├ Ediçoes; ├ Erros; ├ Prints; ├ Download; ├ Senha do ADM; └ Creditos. • Informações Basicas • • Edições / Ajustes • • Erros Do Servidor • • PrintScreen • • Download's • PDA v1.8 Mapa totalmente refeito (4Shared). Client ja vem junto com o server. http://www.4shared.com/rar/m5QfBBFf/PDA_V18_f_Creditos_-_Slicer_St.html Versão v0.2 http://www.mediafire.com/?o7xmeczpb7az5yj @Client ja vem junto a pasta do servídor, Good luck ! OBS: Se gostarem do server, Comentem e deem sua sugestão para atalizar, não irei pedir 'rep+' pois pra min isso não muda nada, mais sim contribui meu trabalho • Creditos • Slicer - Por ataliza diariamente o PDA v1.8 sendo uns dos melhore servidor pokemon ja posto pra dowload. Stylo Maldoso - Por ter refeito o mapa. Brunin123 por criar o pda Gabrielxtu por ter me ajudado <3 Equipe Pdaventures pelo mapa
  2. Olá Homo-Sapiens. Resolvi trazer para vocês esse sistema de Quest que eu criei para resolver alguns inconvenientes em meu ot serv. Quais são as características dele? Ele é totalmente inserido através do mapper sem precisar criar scripts. Ele contém um sistema de parâmetros que podem ser usados para determinar a quem pode receber o prêmio. Ele não usa marcação por storage evitando assim conflitos com outros scripts que usam storage como marcação. Com esse sistema inserido vocês podem criar quest por vocação única, promovidos, mages ou kinas/palas. Como ela pode usar os items dentro do baú como items obtiveis de quest, ela aceita qualquer tipo de item inserido, mesmo keys e runas. Implementação Em actions.xml adicione: <!-- Quests baus --> <action fromid="1740" toid="1741" event="script" value="quests/quests.lua"/> <action fromid="1747" toid="1749" event="script" value="quests/quests.lua"/> <action fromid="1410" toid="1420" event="script" value="quests/quests.lua"/> <action actionid="2000" event="script" value="quests/quests.lua"/> Agora em scripts/quests crie ou modifique seu quests.lua para esse: --[[ autor = Marcryzius data = segunda-feira, 28 de Dezembro de 2015 >> Alguns parametros de uso. item.uid = itemid << id do item que será ganho - caso o item esteja 'inside' no baú, não se faz nescessario usar o id do item na uid - para habilitar o bau com os items como sendo uma quest se faz necessario acrescentar uma AID. actionid = validação << o baú só será usado na forma de quest se tiver alguma aid. pode usar marcação de vocação como na instrução abaixo ou setar aid 2000 para validar o baú como uma quest. actionid = quantidade << desde que ela seja maior que 100 e menor que 200 (150 = 50 items, 200 = 100 items) actionid = vocação << o primeiro numero diz que é uma quest de vocação; o segundo habilita que, as vocações promovidas também podem fazer a quest; os dois ultimos numero é da vocação em questão. exemplo 1 = 1201 << sorceres e master sorceres -- promovidos exemplo 2 = 1200 << kina e EK -- promovidos exemplo 3 = 1102 << apenas druids e não elder druids -- vocação especifica exemplo 4 = 1000 << apenas knights e paladins. exemplo 5 = 1100 << apenas sorcerers e druids. inside = varios items << todos os items que forem colocados dentro do bau será usado como referencia do premio da quest; pode-se tambem usar aid para determinar a vocação nescessaria dessa quest. -- ### -- Com o uso da nova função, não está mais sendo "setado" no player a store da "quest" usando setPlayerStorageValue(). ]] function onUse(cid,item,pos) if(item.actionid >= 1000 and item.actionid < 3000)then if(item.actionid == 1000 and not(isPaladin(cid) or isKnight(cid)))then -- somente kina ou pala recebem o item return true,doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") elseif(item.actionid-1000 == 100 and not(isSorcerer(cid) or isDruid(cid)))then -- somente mages recebem o item return true,doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") elseif(item.actionid-1000 > 0 and item.actionid-1000 < 100 and not(getPlayerVocation(cid) == item.actionid-1000))then -- vocação especifica - kina pala. return true,doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") elseif(item.actionid-1000 > 100 and item.actionid-1000 < 200 and not(getPlayerVocation(cid) == item.actionid-1100))then -- vocação especifica - mages. return true,doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") elseif(item.actionid-1000 >= 200 and item.actionid-1000 < 300 and not(getPlayerVocation(cid) % 4 == item.actionid-1200))then -- vocações promovidas. return true,doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") end elseif(item.uid > 12000 and item.actionid == 0)then -- um baú qualquer return false -- abre o baú para pegarem os items 'inside' sem marcar nada, como se fosse abrir um baú qualquer sem ser de quest. end local quests_quant = (item.actionid-100 < 1) and 1 or (item.actionid-100 > 100) and 100 or item.actionid-100--Defini a quantidade de items. local playerCap,cap = getPlayerFreeCap(cid),getItemWeightById(item.uid,quests_quant) or 0 if(item.uid > 1000 and cap > 0)then -- quest por uid if(getSaveQuestsInfor(item.uid,cid))then --Função não usa marcação (getPlayerStore...) if(playerCap >= cap)then if(item.uid == 2493)then setPlayerStorageValue(cid,2493,1) end -- compatibilidade, verificar uso > ???...D:::H...??? doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a '..((quests_quant == 1) and '' or quests_quant)..' '..getItemNameById(item.uid)..'.') saveQuestsInfor(item.uid,getItemNameById(item.uid),cid,"Quest system by uid.") doPlayerAddItemEx(cid,doCreateItemEx(item.uid, quests_quant),true) else return false,doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a '..(quests_quant == 1 and '' or quests_quant)..' '..getItemNameById(item.uid)..' weighing '..math.floor(cap)..' oz it\'s too heavy.') end else--caso o player já tenha feito a quest, abri-se o baú de forma convencional, podendo obter os items que estejam dentro dele. return false end return true end local size,texto,rewards,peso = isContainer(item.uid) and getContainerSize(item.uid) or 0,'You have found a ',{},0 if(size > 0)then for i = size,0,-1 do local tmp = getContainerItem(item.uid, i) if(tmp.itemid > 0) then if(isItemContainer(tmp.itemid))then -- só é possível adicionar mais um inside. ou seja, uma bolsa com algo dentro desde que não tenha outra bolsa com mais coisas dentro, dentro dessa bolsa primária. table.insert(rewards,1,{[tmp.itemid] = {}}) texto = texto..' a '..getItemNameById(tmp.itemid)..''..(i+1<size and ',' or '.') for insize = getContainerSize(tmp.uid),0,-1 do local newtmp = getContainerItem(tmp.uid, insize) table.insert(rewards[1][tmp.itemid],{id=newtmp.itemid, val=(newtmp.actionid > 0 and newtmp.actionid or newtmp.type)}) end else --Foi feito dessa forma para não haver conflito com items do mesmo tipo. table.insert(rewards,{[tmp.itemid]=(tmp.actionid > 0 and tmp.actionid or tmp.type)}) if(tmp.type > 0)then texto = texto..' '..(tmp.type > 0 and tmp.type..' charges of ' or 1)..' '..getItemNameById(tmp.itemid)..''..(i+1<size and ',' or '.') elseif(tmp.actionid > 0)then texto = texto..' '..(tmp.type > 0 and tmp.type..' charges of ' or 1)..' '..getItemNameById(tmp.itemid)..''..(i+1<size and ',' or '.') else texto = texto..' '..getItemNameById(tmp.itemid)..''..(i+1<size and ',' or '.') end end peso = peso + getItemWeight(tmp.uid) end end if(getSaveQuestsInfor(tonumber(pos.x..''..pos.y..''..pos.z),cid))then --Função não usa marcação (getStore...)) if(playerCap >= peso)then for _,reward in pairs(rewards) do for item,valor in pairs(reward) do if(type(valor) == "table")then local bag = doCreateItemEx(item) for _,value in pairs(valor) do if(value and value.id > 0)then doAddContainerItemEx(bag,doCreateItemEx(value.id,(value.val<=0 and 1 or value.val))) end end doPlayerAddItemEx(cid,bag,true) elseif(isInArray(KEYS_DOOR,item))then -- se o item for uma key local ch = doCreateItemEx(item,1) doItemSetAttribute(ch,'aid',valor) doPlayerAddItemEx(cid,ch) else doPlayerAddItemEx(cid,doCreateItemEx(item, valor),true) end end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, texto) saveQuestsInfor(tonumber((pos.x)..''..(pos.y)..''..(pos.z)),getItemNameById(table.maxn(rewards)),cid,"Quest system by Inside.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, texto..' weighing '..math.floor(peso)..' oz it\'s too heavy.' ) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") end else return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") end return true end Em lib/050-functions.lua adicione: function getSaveQuestsInfor(uid,cid) --[[( Marcryzius )]]-- local str = false if not(db.executeQuery("SELECT * FROM `server_quests`;"))then -- caso a table não exista, será criada db.executeQuery("CREATE TABLE `server_quests` (`uid` INTEGER, `name` VARCHAR(255), `name_player` VARCHAR(255), `pos` VARCHAR(255), `other` TEXT);") return getSaveQuestsInfor(uid,cid) end if(tonumber(uid))then str = db.getResult("SELECT * FROM `server_quests` WHERE `uid` = '"..uid.."' AND `name_player` = ".. db.escapeString(getCreatureName(cid))..";") elseif(type(uid) == 'string')then str = db.getResult("SELECT * FROM `server_quests` WHERE `name_player` = " ..db.escapeString(getCreatureName(cid)).. " AND `name` = '"..uid.."';") else return false,print('getSaveQuestInfor: tipo de uid invalido > '..tostring(type(uid))) end return (str:getID() == -1) and true or false end function saveQuestsInfor(uid,name,cid,other) --[[( Marcryzius )]]-- --[[ uid = Item.uid usado no bau(entre outros) para receber o item da Quest name = nome do item dado ao player ou nome da quest cid = identificacao do player other = informacoes adicionais para serem salvas junto a quest ]]-- if not(db.executeQuery("SELECT * FROM `server_quests`;"))then -- caso a table não exista, será criada db.executeQuery("CREATE TABLE `server_quests` (`uid` INTEGER, `name` VARCHAR(255), `name_player` VARCHAR(255), `pos` VARCHAR(255), `other` TEXT);") end -- caso o parametro uid seja numero, pega-se a posição do item ou, caso não, pega-se a posição do player. local other,pos2 = other or '','' local pos = type(uid) == 'number' and getThingPos(uid) or getCreaturePosition(cid) pos2 = 'x='..pos.x..', y='..pos.y..', z='..pos.z -- verifica se tudo está correto. if not(type(name) == 'string') or not(tonumber(cid))then return false, print('Funcao requer parametros: name,cid') end -- salva as informações na database. db.executeQuery("INSERT INTO `server_quests` (`uid`, `name`, `name_player`,`pos`,`other`) VALUES ("..(uid or tonumber(pos.x..''..pos.y..''..pos.z))..",'"..name.."', '"..getCreatureName(cid).."','"..pos2.."','"..other.."');") return true end Exemplos de uso do sistema Quest na qual dá o prêmio de 100 gps: Quest na qual dá o prêmio apenas para knights (e não para EKs e outras promoções de knight): Quest na qual dá o prêmio apenas para paladins e suas promotions: Ressalva: Caso queira fazer para knights use o id 0 (zero) e não 4 (quatro). Quest na qual dá o prêmio apenas para todos: Nesse caso você pode usar AID 0 (zero) ou AID (2000). Caso usem o metodo 'inside' de items no baú pode-se também usar esses mesmos parâmetros para estabelecer a quem pode ganhar os items inseridos no baú. Lembre-se que em quests 'insides' não se usa UID, mantenha ela em 0 (zero): Utilizando o metodo 'inside' ela só se tornará uma quest caso tenha alguma AID para válidar como quest. Então para fazer uma validação na qual qualquer player possa obter os itens 'inside' como sendo uma quest, adicione a AID 2000 ao baú: Bem, é isso pessoal. Para finalizar, aqui vai uma crítica ao xtibia. MELHOREM ESSE SISTEMA DE EDIÇÃO DE TEXTO.
  3. Script feito por Ahilphino, adiciona uma mensagem com o tempo que você levou para upar, ao upar. creaturescripts\scripts\timelevel.lua function timeString(timeDiff) local dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find("second") then local a, b = ret:find(" and ") ret = ret:sub(b+1) end return ret end function onAdvance(player, skill, oldlevel, newlevel) if skill ~= SKILL_LEVEL then return true end oldtime = player:getStorageValue(3499) timenow = os.time() if oldtime == -1 then player:setStorageValue(3499, timenow) else player:sendTextMessage(MESSAGE_INFO_DESCR, "It took you " .. timeString(timenow - oldtime) .. " to advance in level from your last advance.") player:setStorageValue(3499, timenow) end return true end login.lua player:registerEvent("timelevel") creaturescripts.xml <event type="advance" name="timelevel" script="timelevel.lua"/>
  4. Script : Spells e versao 8.54 Pokemon Dash Advanced (1.0) Sou nivel medio de experience Bom... Eu ja tenho as Mega evolucaos 100% (so de 15 pokemons) mais falta 1 error aqui que Nao sei como faz vai na imagem e vei o ataque que tem Charizard para poder faz Mega Despois ele tranforma O que eu quero faz e do que o ataque que eu vo usar Colocar esse imagem
  5. Bom Dia/Noite/Tarde, Como Podem ver o titulo ja diz tudo ! Estou com esse projeto em mente a muito tempo e agora resolvi tomar uma atitude e espero encontrar aqui no :XTibia_smile: minha futura equipe, Bom vamos la. Projeto vai ser sério com dedicado e tudo mais. Todo gasto sera bancado por mim e a equipe ira receber uma porcentagem do lucro claro e a outra sera automaticamente aplicada no servidor, bom vamos ao que interessa de verdade. Oque pretende fazer no servidor? :forward: Site Proprio :button_ok: :forward: Client Proprio :button_ok: :forward: Npc's de tasks espalhados pelo mapa :button_ok: :forward: Varias Hunts/Quests :button_ok: :forward: Eventos com dias marcados :button_ok: :forward: E Mais coisas que depois atualizo que estou sem tempo .... Bom Galera Vou encerrar por aqui mais tem muito mais coisa ja estou editando as citys pisos novos, pisos de houses totalmente LINDOS locais de pescas reformulados e muito mais hoje ainda estarei colocando online para quem se interessar vir dar uma olhada criticar/elogiar ou até mesmo começar me ajudando hoje e é isso abrass irei atualizar esse topico sempre que fizer algo de novo la ! obrigado pela atenção. e antes que esqueça quér fazer parte da equipe? deixe sua msg privado ou ae mesmo no comentario [Mapper] (Eu) [scrippter] (Eu) (Vago) [Gm] (Vago) 2x [Website] (vago) não vou pedir muita experiencia não apenas que saibao que esta fazendo ! obrigado e aguardo vocês até logo.
  6. 1° Vá em Data/Monsters/pokes e crie um arquivo XML em uma pasta que tem os pokémons . Depois crie uma pasta com o nome do Pokémon pode ser qualquer Pokémon eu vou criar o Piplup (só e um exemplo) 2° Copie a pasta de algum pokémon e renomeie a pasta XML para Piplup (exemplo) 3° Abra a pasta com o programa Bloco de notas (clique com a tecla direita e vá em Abrir com -> Bloco de Notas após ter aberto edite tudo feche e salve . Depois volte e vá para Monster.xml copie isso de algum pokémon Feche e salve. vá em data/lib e vá na pasta configuration.lua Valeu galera meu primeiro tutorial desculpe os erros. Ajeitei alguns erro que eu não sabia como usar muito o xtibia agradeço ao Roksas. Mereço Rep+ ?
  7. Dúvidas sobre o Servidor - Pda Tópico para dúvidas sobre o servidor de pokémon dash advanced, principalmente o PDA by Slicer! Organizadores do Tópico:Kurobisu, Slicer, Entre outros... Links Uteis: Criando seu Client próprio, http://vapus.net/customclient Download's Links do tópico bem antigo: Regras .. Duvidas ja respondidas ..
  8. cerejo

    Boost Pokémon!

    Seguinte galera, há um tempo atrás 1 dia acho( ) postei um tópico(http://www.xtibia.co...kables-pokemon/)pedindo ajuda pra transformar as stones do meu server em agrupáveis, as respostas foram inúteis, mas eu consegui descobrir sozinho como fazia, enfim... agora venho pedir outra coisa. Após transformá-las em agrupáveis eu criei um problema nos boosts, problema não, apenas continua a mesma coisa, quando clocamos 100 stones em um mesmo slot da caixa de boosts, ele boosta como se só existisse 1 stone na caixa. Ex: Coloquei 100 stones na caixa de boosts. Meu pokémon precisa de dois stones pra alcançar um boost, se eu coloco 100 no mesmo espaço ele diz que não tenho stones suficientes, porém se eu as separo em vários slots ele as lê normalmente '-' Alguém se habilita? segue o arquivo .lua dos boosts local ballslot = 12355 local ballslot_run = 12352 local stoneslot = 12354 local stoneslot_run = 12353 local button = 12356 local button_run = 12357 function isRunning(id) if isInArray({button_run, stoneslot_run, ballslot_run}, id) then return true end return false end boost_stones = { ["Bulbasaur"] = {leaf}, ["Ivysaur"] = {leaf}, ["Venusaur"] = {leaf}, ["Charmander"] = {fire}, ["Charmeleon"] = {fire}, ["Charizard"] = {fire}, ["Squirtle"] = {water}, ["Wartortle"] = {water}, ["Blastoise"] = {water}, ["Caterpie"] = {coccon}, ["Metapod"] = {coccon}, ["Butterfree"] = {coccon}, ["Weedle"] = {coccon}, ["Kakuna"] = {coccon}, ["Beedrill"] = {coccon}, ["Pidgey"] = {heart}, ["Pidgeotto"] = {heart}, ["Pidgeot"] = {heart}, ["Rattata"] = {heart}, ["Raticate"] = {heart}, ["Spearow"] = {heart}, ["Fearow"] = {heart}, ["Ekans"] = {venom}, ["Arbok"] = {venom}, ["Pikachu"] = {thunder}, ["Raichu"] = {thunder}, ["Sandshrew"] = {earth}, ["Sandslash"] = {earth}, ["Nidoran Female"] = {venom}, ["Nidorina"] = {venom}, ["Nidoqueen"] = {venom, earth}, ["Nidoran Male"] = {venom}, ["Nidorino"] = {venom}, ["Nidoking"] = {venom, earth}, ["Clefairy"] = {heart}, ["Clefable"] = {heart}, ["Vulpix"] = {fire}, ["Ninetales"] = {fire}, ["Jigglypuff"] = {heart}, ["Wigglytuff"] = {heart}, ["Zubat"] = {venom}, ["Golbat"] = {venom}, ["Oddish"] = {leaf, venom}, ["Gloom"] = {leaf, venom}, ["Vileplume"] = {leaf, venom}, ["Paras"] = {coccon, leaf}, ["Parasect"] = {coccon, leaf}, ["Venonat"] = {coccon, venom}, ["Venomoth"] = {coccon, venom}, ["Diglett"] = {earth}, ["Dugtrio"] = {earth}, ["Meowth"] = {heart}, ["Persian"] = {heart}, ["Psyduck"] = {water}, ["Golduck"] = {water, enigma}, ["Mankey"] = {punch}, ["Primeape"] = {punch}, ["Growlithe"] = {fire}, ["Arcanine"] = {fire}, ["Poliwag"] = {water}, ["Poliwhirl"] = {water}, ["Poliwrath"] = {water, punch}, ["Abra"] = {enigma}, ["Kadabra"] = {enigma}, ["Alakazam"] = {enigma}, ["Machop"] = {punch}, ["Machoke"] = {punch}, ["Machamp"] = {punch}, ["Bellsprout"] = {leaf, venom}, ["Weepinbell"] = {leaf, venom}, ["Victreebel"] = {leaf, venom}, ["Tentacool"] = {water, venom}, ["Tentacruel"] = {water, venom}, ["Geodude"] = {earth, rock}, ["Graveler"] = {earth, rock}, ["Golem"] = {earth, rock}, ["Ponyta"] = {fire}, ["Rapidash"] = {fire}, ["Slowpoke"] = {water, enigma}, ["Slowbro"] = {water, enigma}, ["Magnemite"] = {thunder, metal}, ["Magneton"] = {thunder, metal}, ["Farfetch'd"] = {heart}, ["Doduo"] = {heart}, ["Dodrio"] = {heart}, ["Seel"] = {water, ice}, ["Dewgong"] = {water, ice}, ["Grimer"] = {venom}, ["Muk"] = {venom}, ["Shellder"] = {water, ice}, ["Cloyster"] = {water, ice}, ["Gastly"] = {dark}, ["Haunter"] = {dark}, ["Gengar"] = {dark}, ["Onix"] = {rock, earth}, ["Drowzee"] = {enigma}, ["Hypno"] = {enigma}, ["Krabby"] = {water}, ["Kingler"] = {water}, ["Voltorb"] = {thunder}, ["Electrode"] = {thunder}, ["Exeggcute"] = {enigma, leaf}, ["Exeggutor"] = {enigma, leaf}, ["Cubone"] = {earth}, ["Marowak"] = {earth}, ["Hitmonlee"] = {punch}, ["Hitmonchan"] = {punch}, ["Lickitung"] = {heart}, ["Koffing"] = {venom}, ["Weezing"] = {venom}, ["Rhyhorn"] = {earth, rock}, ["Rhydon"] = {earth, rock}, ["Chansey"] = {heart}, ["Tangela"] = {leaf}, ["Kangaskhan"] = {heart}, ["Horsea"] = {water}, ["Seadra"] = {water}, ["Goldeen"] = {water}, ["Seaking"] = {water}, ["Staryu"] = {water}, ["Starmie"] = {water}, ["Mr. Mime"] = {enigma}, ["Scyther"] = {coccon}, ["Jynx"] = {enigma, ice}, ["Electabuzz"] = {thunder}, ["Magmar"] = {fire}, ["Pinsir"] = {coccon}, ["Tauros"] = {heart}, ["Magikarp"] = {water}, ["Gyarados"] = {water, crystal}, ["Lapras"] = {water, ice}, ["Ditto"] = {heart}, ["Eevee"] = {heart}, ["Vaporeon"] = {water}, ["Jolteon"] = {thunder}, ["Flareon"] = {fire}, ["Porygon"] = {heart, enigma}, ["Omanyte"] = {rock, water}, ["Omastar"] = {rock, water}, ["Kabuto"] = {rock, water}, ["Kabutops"] = {rock, water}, ["Aerodactyl"] = {rock}, ["Snorlax"] = {heart}, ["Articuno"] = {ice}, ["Zapdos"] = {thunder}, ["Moltres"] = {fire}, ["Dratini"] = {crystal}, ["Dragonair"] = {crystal}, ["Dragonite"] = {crystal}, ["Mewtwo"] = {enigma}, ["Shiny Bulbasaur"] = {leaf}, ["Shiny Ivysaur"] = {leaf}, ["Shiny Venusaur"] = {leaf}, ["Shiny Charmander"] = {fire}, ["Shiny Charmeleon"] = {fire}, ["Shiny Charizard"] = {fire}, ["Shiny Squirtle"] = {water}, ["Shiny Wartortle"] = {water}, ["Shiny Blastoise"] = {water}, ["Shiny Caterpie"] = {coccon}, ["Shiny Metapod"] = {coccon}, ["Shiny Butterfree"] = {coccon}, ["Shiny Weedle"] = {coccon}, ["Shiny Kakuna"] = {coccon}, ["Shiny Beedrill"] = {coccon}, ["Shiny Pidgey"] = {heart}, ["Shiny Pidgeotto"] = {heart}, ["Shiny Pidgeot"] = {heart}, ["Shiny Rattata"] = {heart}, ["Shiny Raticate"] = {heart}, ["Shiny Spearow"] = {heart}, ["Shiny Fearow"] = {heart}, ["Shiny Ekans"] = {venom}, ["Shiny Arbok"] = {venom}, ["Shiny Pikachu"] = {thunder}, ["Shiny Raichu"] = {thunder}, ["Shiny Sandshrew"] = {earth}, ["Shiny Sandslash"] = {earth}, ["Shiny Nidoran Female"] = {venom}, ["Shiny Nidorina"] = {venom}, ["Shiny Nidoqueen"] = {venom, earth}, ["Shiny Nidoran Male"] = {venom}, ["Shiny Nidorino"] = {venom}, ["Shiny Nidoking"] = {venom, earth}, ["Shiny Clefairy"] = {heart}, ["Shiny Clefable"] = {heart}, ["Shiny Vulpix"] = {fire}, ["Shiny Ninetales"] = {fire}, ["Shiny Jigglypuff"] = {heart}, ["Shiny Wigglytuff"] = {heart}, ["Shiny Zubat"] = {venom}, ["Shiny Golbat"] = {venom}, ["Shiny Oddish"] = {leaf, venom}, ["Shiny Gloom"] = {leaf, venom}, ["Shiny Vileplume"] = {leaf, venom}, ["Shiny Paras"] = {coccon, leaf}, ["Shiny Parasect"] = {coccon, leaf}, ["Shiny Venonat"] = {coccon, venom}, ["Shiny Venomoth"] = {coccon, venom}, ["Shiny Diglett"] = {earth}, ["Shiny Dugtrio"] = {earth}, ["Shiny Meowth"] = {heart}, ["Shiny Persian"] = {heart}, ["Shiny Psyduck"] = {water}, ["Shiny Golduck"] = {water, enigma}, ["Shiny Mankey"] = {punch}, ["Shiny Primeape"] = {punch}, ["Shiny Growlithe"] = {fire}, ["Shiny Arcanine"] = {fire}, ["Shiny Poliwag"] = {water}, ["Shiny Poliwhirl"] = {water}, ["Shiny Poliwrath"] = {water, punch}, ["Shiny Abra"] = {enigma}, ["Shiny Kadabra"] = {enigma}, ["Shiny Alakazam"] = {enigma}, ["Shiny Machop"] = {punch}, ["Shiny Machoke"] = {punch}, ["Shiny Machamp"] = {punch}, ["Shiny Bellsprout"] = {leaf, venom}, ["Shiny Weepinbell"] = {leaf, venom}, ["Shiny Victreebel"] = {leaf, venom}, ["Shiny Tentacool"] = {water, venom}, ["Shiny Tentacruel"] = {water, venom}, ["Shiny Geodude"] = {earth, rock}, ["Shiny Graveler"] = {earth, rock}, ["Shiny Golem"] = {earth, rock}, ["Shiny Ponyta"] = {fire}, ["Shiny Rapidash"] = {fire}, ["Shiny Slowpoke"] = {water, enigma}, ["Shiny Slowbro"] = {water, enigma}, ["Shiny Magnemite"] = {thunder, metal}, ["Shiny Magneton"] = {thunder, metal}, ["Shiny Farfetch'd"] = {heart}, ["Shiny Doduo"] = {heart}, ["Shiny Dodrio"] = {heart}, ["Shiny Seel"] = {water, ice}, ["Shiny Dewgong"] = {water, ice}, ["Shiny Grimer"] = {venom}, ["Shiny Muk"] = {venom}, ["Shiny Shellder"] = {water, ice}, ["Shiny Cloyster"] = {water, ice}, ["Shiny Gastly"] = {dark}, ["Shiny Haunter"] = {dark}, ["Shiny Gengar"] = {dark}, ["Shiny Onix"] = {rock, earth}, ["Shiny Drowzee"] = {enigma}, ["Shiny Hypno"] = {enigma}, ["Shiny Krabby"] = {water}, ["Shiny Kingler"] = {water}, ["Shiny Voltorb"] = {thunder}, ["Shiny Electrode"] = {thunder}, ["Shiny Exeggcute"] = {enigma, leaf}, ["Shiny Exeggutor"] = {enigma, leaf}, ["Shiny Cubone"] = {earth}, ["Shiny Marowak"] = {earth}, ["Shiny Hitmonlee"] = {punch}, ["Shiny Hitmonchan"] = {punch}, ["Shiny Lickitung"] = {heart}, ["Shiny Koffing"] = {venom}, ["Shiny Weezing"] = {venom}, ["Shiny Rhyhorn"] = {earth, rock}, ["Shiny Rhydon"] = {earth, rock}, ["Shiny Chansey"] = {heart}, ["Shiny Tangela"] = {leaf}, ["Shiny Kangaskhan"] = {heart}, ["Shiny Horsea"] = {water}, ["Shiny Seadra"] = {water}, ["Shiny Goldeen"] = {water}, ["Shiny Seaking"] = {water}, ["Shiny Staryu"] = {water}, ["Shiny Starmie"] = {water}, ["Shiny Mr. Mime"] = {enigma}, ["Shiny Scyther"] = {coccon}, ["Shiny Jynx"] = {enigma, ice}, ["Shiny Electabuzz"] = {thunder}, ["Shiny Magmar"] = {fire}, ["Shiny Pinsir"] = {coccon}, ["Shiny Tauros"] = {heart}, ["Shiny Magikarp"] = {water}, ["Shiny Gyarados"] = {water, crystal}, ["Shiny Lapras"] = {water, ice}, ["Shiny Ditto"] = {heart}, ["Shiny Eevee"] = {heart}, ["Shiny Vaporeon"] = {water}, ["Shiny Jolteon"] = {thunder}, ["Shiny Flareon"] = {fire}, ["Shiny Porygon"] = {heart, enigma}, ["Shiny Omanyte"] = {rock, water}, ["Shiny Omastar"] = {rock, water}, ["Shiny Kabuto"] = {rock, water}, ["Shiny Kabutops"] = {rock, water}, ["Shiny Aerodactyl"] = {rock}, ["Shiny Snorlax"] = {heart}, ["Shiny Articuno"] = {ice}, ["Shiny Zapdos"] = {thunder}, ["Shiny Moltres"] = {fire}, ["Shiny Dratini"] = {crystal}, ["Shiny Dragonair"] = {crystal}, ["Shiny Dragonite"] = {crystal}, ["Shiny Mewtwo"] = {enigma}, ["Shiny Mew"] = {enigma}, ["Mew"] = {enigma}} function doRestoreBoostMachine(cid, b_pos, p_pos, s_pos, msg, msg2) doSendAnimatedText(b_pos, "DONE.", 215) if isCreature(cid) then doCreatureSetNoMove(cid, false) doPlayerSendTextMessage(cid, 27, msg) doPlayerSendTextMessage(cid, 27, msg2) end local ball_s = getTileItemById(p_pos, ballslot_run) doTransformItem(ball_s.uid, ballslot) local stne_s = getTileItemById(s_pos, stoneslot_run) doTransformItem(stne_s.uid, stoneslot) local butn_s = getTileItemById(b_pos, button_run) doTransformItem(butn_s.uid, button) end local stones_required = { -- custo base de stones para boostar [heart] = 1, [leaf] = 1, [water] = 1, [venom] = 1, [thunder] = 1, [rock] = 1, [punch] = 1, [fire] = 1, [coccon] = 1, [crystal] = 1, [dark] = 1, [earth] = 1, [enigma] = 1, [ice] = 1, } local stone_increase = { -- a cada quantos boosts irá aumentar o custo de stones [heart] = 0, [leaf] = 0, [water] =0, [venom] = 0, [thunder] = 0, [rock] = 0, [punch] =0 , [fire] = 0, [coccon] = 0, [crystal] = 0, [dark] = 0, [earth] = 0, [enigma] = 0, [ice] = 0, } function onUse(cid, item, topos, item2, frompos) if isRunning(item.itemid) then doPlayerSendCancel(cid, "Wait until boosting finishes.") return true end if item.itemid == button then local pbpos = topos pbpos.x = pbpos.x + 1 local ball_slot = getTileItemById(pbpos, ballslot) local myball = getContainerItem(ball_slot.uid, 0) if myball.uid <= 0 or getItemWeight(myball.uid) == 0 then doPlayerSendCancel(cid, "You need to put a pokeball in the ball slot.") return true end local pokemon = getItemAttribute(myball.uid, "poke") local boost = getItemAttribute(myball.uid, "boost") or 0 if boost >= 200 then doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.") return true end local stnpos = pbpos stnpos.x = stnpos.x - 2 local stone_slot = getTileItemById(stnpos, stoneslot) local stone = getContainerItem(stone_slot.uid, 0) if stone.uid <= 0 then doPlayerSendCancel(cid, "You need to put a stone in the stone slot.") return true end if not isStone(stone.itemid) then doPlayerSendCancel(cid, "Please, put only stones in the stone slot.") return true end if not isInArray(boost_stones[pokemon], stone.itemid) then local cancelstr = "Sorry, you are not using the correct stone." if #boost_stones[pokemon] > 1 then local stonesused = "" cancelstr = cancelstr.." This pokemon needs " for su = 1, #boost_stones[pokemon] do local n = doCorrectString(getItemNameById(boost_stones[pokemon][su])) if su == #boost_stones[pokemon] then stonesused = stonesused.." or "..getArticle(n).." "..n.."" elseif su == 1 then stonesused = stonesused..""..getArticle(n).." "..n.."" else stonesused = stonesused..", "..n.."" end end cancelstr = cancelstr..""..stonesused.." to be boosted." else cancelstr = cancelstr.." This pokemon needs a "..doCorrectString(getItemNameById(boost_stones[pokemon][1])).." to be boosted." end doPlayerSendCancel(cid, cancelstr) return true end local removeStones = 0 local extraStones = math.floor(boost / stone_increase[stone.itemid]) local required_stones = stones_required[stone.itemid] + extraStones local boosts = 0 for a = 0, getContainerSize(stone_slot.uid) - 1 do local it = getContainerItem(stone_slot.uid, a) if it.uid > 0 then if not isStone(it.itemid) then doPlayerSendCancel(cid, "Please, put only stones in the stone slot.") return true end if it.itemid ~= stone.itemid then doPlayerSendCancel(cid, "Please, put only one type of stone in the stone slot.") return true end if required_stones > 0 then required_stones = required_stones - 1 if required_stones <= 0 then boosts = boosts + 1 removeStones = removeStones + stones_required[stone.itemid] + extraStones if boost + boosts <= 200 then extraStones = math.floor((boost + boosts) / stone_increase[stone.itemid]) required_stones = stones_required[stone.itemid] + extraStones end end end end end if required_stones > 0 and boosts == 0 then doPlayerSendCancel(cid, "You need more stones to boost this pokemon.") return true end for b = 1, removeStones do doRemoveItem(getContainerItem(stone_slot.uid, 0).uid, 1) end local off = pokes[pokemon].offense * boost_rate * boosts local def = pokes[pokemon].defense * boost_rate * boosts local agi = pokes[pokemon].agility * boosts local spatk = pokes[pokemon].specialattack * boost_rate * boosts local vit = pokes[pokemon].vitality * boost_rate * boosts doSetItemAttribute(myball.uid, "boost", boost + boosts) doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off) doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def) doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi) doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk) doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit) local msg = "Your "..getPokeballName(myball.uid).." ["..getItemAttribute(myball.uid, "level").."] has been boosted!" local msg2 = "• Boost: "..(boost + boosts).." (+"..boosts..") • Offense: +"..doMathDecimal(off).." • Defense: +"..doMathDecimal(def).." • Spc. Atk: +"..doMathDecimal(spatk).." • Agility: +"..doMathDecimal(agi).." • Vitality: +"..doMathDecimal(vit).."" local downpos = getThingPos(cid) downpos.y = downpos.y + 1 local mypos = getThingPos(cid) doTeleportThing(cid, downpos, false) doTeleportThing(cid, mypos, false) doTransformItem(ball_slot.uid, ballslot_run) doTransformItem(stone_slot.uid, stoneslot_run) doTransformItem(item.uid, button_run) doCreatureSetNoMove(cid, true) doCreatureAddCondition(cid, boostcondition) addEvent(doRestoreBoostMachine, 300, cid, getThingPos(item.uid), getThingPos(ball_slot.uid), getThingPos(stone_slot.uid), msg, msg2) return true end end
×
×
  • Criar Novo...