Admjuninho 0 Postado Abril 26, 2012 Share Postado Abril 26, 2012 Galera, queria que alguem me ajuda-se a colocar shiny resp por onspawn. Existe o script feito pelo slicer, mas eu não consegui colocar , quem mim ajudar dou rep+ ajuda pf galerinha. Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249064 Compartilhar em outros sites More sharing options...
Nu77 81 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Tonynamoral function onStepIn(cid, item, position, fromPosition) local pose = {x=100, y=100, z=7} -- Position que o efeito vai aparecer local str = "Texto aqui" -- Texto que vai aparecer na janela aberta local time = 10 -- Vezes que vai aparecer o efeito local storage = 18400 -- Storage que vai precisar para passar pelo tile local function sendEffect(cid) doSendMagicEffect(pose, 28) end if getPlayerStorageValue(cid, storage) >= 1 then setPlayerStorageValue(cid, storage, 0) else doTeleportThing(cid, fromPosition, false) doShowTextDialog(cid, 2382, str) for l = 1, #time do addEvent(sendEffect, l * 200, cid) end return false end return true end @movements.xml <movevent type="StepIn" actionid="9015" event="script" value="pisotest.lua"/> Tente esse avisando não testei ele... Qualquer erro poste aqui q eu arrumo Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249079 Compartilhar em outros sites More sharing options...
tonynamoral 27 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @SUJA , Obrigado , FUnfou direitinho Hoje já atingui o meu nivel de REP , mais amnha é certo! Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249088 Compartilhar em outros sites More sharing options...
FlamesAdmin 262 Postado Abril 26, 2012 Share Postado Abril 26, 2012 galera como faz pra por o surf pra premmy? fucei fucei nao achei rep+ Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249103 Compartilhar em outros sites More sharing options...
Hikigaya 37 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Suja Tem Alguma Previsao Para Postar o Server (Se Postar)? Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249110 Compartilhar em outros sites More sharing options...
fernandofw 2 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Flamesadmin vai no seu surf.lua e aperte ctrl +f e procura por "local premium = false" e troque o false para true, se nao tiver essa linha pegue o meu aqui que esta certo, totalmente arrumados os surfs local 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} local poke = {'Shiny Poliwag', 'Poliwag', 'Shiny Poliwhirl', 'Poliwhirl', 'Shiny Seaking', 'Seaking', 'Shiny Dewgong', 'Dewgong', 'Shiny Blastoise', 'Blastoise', 'Shiny Tentacruel', 'Tentacruel', 'Shiny Lapras', 'Lapras', 'Shiny Gyarados', 'Gyarados', 'Shiny Omastar', 'Omastar', 'Shiny Kabutops', 'Kabutops', 'Shiny Vaporeon', 'Vaporeon', 'Shiny Staryu', 'Staryu', 'Shiny Starmie', 'Starmie', 'Shiny Goldeen', 'Goldeen', 'Shiny Seadra', 'Seadra', 'Shiny Golduck', 'Golduck', 'Shiny Squirtle', 'Squirtle', 'Shiny Wartortle', 'Wartortle', 'Shiny Tentacool', 'Tentacool', 'Shiny Snorlax', 'Snorlax', 'Shiny Poliwrath', 'Poliwrath', 'Mantine', 'Totodile', 'Croconow', 'Feraligatr', 'Marill', 'Azumarill', 'Quagsire', 'Wooper', 'Octillery', 'Kingdra'} local flie = {'4820', '4821', '4822', '4823', '4824', '4825'} local surf = { ["Poliwag"] = {lookType=278, speed = 320}, ["Poliwhirl"] = {lookType=137, speed = 480}, ["Seaking"] = {lookType=269, speed = 520}, ["Dewgong"] = {lookType=183, speed = 700}, ["Blastoise"] = {lookType=184, speed = 850}, ["Tentacruel"] = {lookType=185, speed = 750}, ["Lapras"] = {lookType=186, speed = 960}, ["Gyarados"] = {lookType=187, speed = 1050}, ["Omastar"] = {lookType=188, speed = 680}, ["Kabutops"] = {lookType=189, speed = 840}, ["Poliwrath"] = {lookType=190, speed = 680}, ["Vaporeon"] = {lookType=191, speed = 800}, ["Staryu"] = {lookType=266, speed = 385}, ["Starmie"] = {lookType=267, speed = 685}, ["Goldeen"] = {lookType=268, speed = 355}, ["Seadra"] = {lookType=270, speed = 655}, ["Golduck"] = {lookType=271, speed = 760}, ["Squirtle"] = {lookType=273, speed = 365}, ["Wartortle"] = {lookType=275, speed = 605}, ["Tentacool"] = {lookType=277, speed = 340}, ["Snorlax"] = {lookType=300, speed = 500}, ----------------Shiny---------------------- ["Shiny Poliwag"] = {lookType=1010, speed = 352}, ["Shiny Poliwhirl"] = {lookType=1011, speed = 528}, ["Shiny Seaking"] = {lookType=1027, speed = 572}, ["Shiny Dewgong"] = {lookType=1015, speed = 770}, ["Shiny Blastoise"] = {lookType=1002, speed = 935}, ["Shiny Tentacruel"] = {lookType=1014, speed = 825}, ["Shiny Lapras"] = {lookType=1031, speed = 1056}, ["Shiny Gyarados"] = {lookType=1030, speed = 1155}, ["Shiny Omastar"] = {lookType=1033, speed = 748}, ["Shiny Kabutops"] = {lookType=1034, speed = 924}, ["Shiny Poliwrath"] = {lookType=1012, speed = 748}, ["Shiny Vaporeon"] = {lookType=1032, speed = 880}, ["Shiny Staryu"] = {lookType=1028, speed = 423.5}, ["Shiny Starmie"] = {lookType=1029, speed = 753.5}, ["Shiny Goldeen"] = {lookType=1026, speed = 390.5}, ["Shiny Seadra"] = {lookType=1025, speed = 720.5}, ["Shiny Golduck"] = {lookType=1009, speed = 836}, ["Shiny Squirtle"] = {lookType=1000, speed = 401.5}, ["Shiny Wartortle"] = {lookType=1001, speed = 665.5}, ["Shiny Tentacool"] = {lookType=1013, speed = 374}, ["Shiny Snorlax"] = {lookType=1035, speed = 550}, ----------------Johto---------------------- ["Mantine"] = {lookType=636, speed = 820}, ["Totodile"] = {lookType=637, speed = 360}, ["Croconow"] = {lookType=638, speed = 590}, ["Feraligatr"] = {lookType=645, speed = 900}, ["Marill"] = {lookType=639, speed = 340}, ["Azumarill"] = {lookType=642, speed = 680}, ["Quagsire"] = {lookType=643, speed = 740}, ["Kingdra"] = {lookType=644, speed = 1020}, ["Octillery"] = {lookType=641, speed = 600}, ["Wooper"] = {lookType=640, speed = 315}, } 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(poke, getPokemonName(getCreatureSummons(cid)[1]))) then doPlayerSendCancel(cid, "This pokemon cannot surf.") doTeleportThing(cid, fromPosition, false) return true end doSetCreatureOutfit(cid, {lookType = surf[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)) doChangeSpeed(cid, PlayerSpeed) doTeleportThing(pk, fromPosition, false) doTeleportThing(pk, getThingPos(cid), true) doCreatureSetLookDir(pk, getCreatureLookDir(cid)) adjustStatus(pk, item.uid, true, false, true) end return true end Valeu Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249129 Compartilhar em outros sites More sharing options...
Nu77 81 Postado Abril 26, 2012 Share Postado Abril 26, 2012 (editado) @Uchiha Vou postar sim, quando não sei pois ainda falta fazer muita coisa não so os script mais tambem o dat esta uma bagunça estou querendo deixar arrumadinho e tals... @All Estava tentando criar uma nova conta pois essa criei fais uns 7 anos e criei ela apenas para dar uma olhada no forum coloquei qualquer coisa... Ai quero uma nova so que não da pra criar, não esta enviando o email para confimar a conta... Alguem sabe o porque disso? Editado Abril 26, 2012 por SUJA Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249150 Compartilhar em outros sites More sharing options...
Maguito 21 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Suja se eu nao estou enganado é um problema no xtibia. Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249163 Compartilhar em outros sites More sharing options...
BrunooMaciell 85 Postado Abril 26, 2012 Share Postado Abril 26, 2012 Alguem sabe na onde eu edito pra almenta o lvl dos pokes eo boost eu ja postei issu umas pagina atras mais como ninguem reposdeu io qe respondeu falo pra min olha as paginas atras que ele posto mais nao achei mais se alguem poder post di nv o tuto agradeço e rep ++ ^^ Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249168 Compartilhar em outros sites More sharing options...
Hikigaya 37 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Brunoo Procure Direito... Se Ninguem Respondeu Ninguem Sabe Para de fazer flood... so se voce nao procurou direito para nao achar Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249176 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Brunnoo repetindo.. isso JA foi postado varias e varias vezes aprenda a procurar... existe uma ferramenta muito util ali emcima.. chamada de "Procura..." .. se vc clica em google e selecionar "forum" tu concerteza achara oq quer... u.U @SUJA pensei na ms coisa... o .dat ta uma bagunça... tpw.. arruma as outifts, magic effects, distance shoot ate eh facil.. agora arruma a parte de itens... auhauahu eh muita coisa e se mudar um tile de lugar por exemplo ja vai ter q mudar o map e pah... dai nem quis mais '-' good luck se for tentar kkk o/ Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249183 Compartilhar em outros sites More sharing options...
Nu77 81 Postado Abril 26, 2012 Share Postado Abril 26, 2012 @Slicer Sim, mais como eu estarei criando um novo mapa e refazendo os itens... E vai ser preciso fazer isso porque so de pokemons icone do svke com morto e vivo tem 502 fora os novos itens, eggs, hm e tm... é muita coisa e não tem espaço para coloca e espalhar pelo dat inteiro vai completar a bagunça que ja esta... Então é melhor perde esse tempo e arrumar para deixar perfeito que continua uma coisa inperfeita... é oque eu axo. Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249210 Compartilhar em outros sites More sharing options...
cacaiu 10 Postado Abril 26, 2012 Share Postado Abril 26, 2012 gente preciso da ajuda de voçes. meu dat editor nao tar dando pra add mais spr's quando vou adicionar uma nova sprite, ela fica por cima da outra e buga tudo. no meu spr ja te 65255 sprites. ai eu queria saber como posso remover algumas sprites antigas ou se existe algum metodo que almente a capacidade de um dat editor min ajuda aew dou rep + Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249257 Compartilhar em outros sites More sharing options...
MarcosFraga 34 Postado Abril 27, 2012 Share Postado Abril 27, 2012 (editado) Como disse antes estarei postando o Task System para PDA, não é meu o system eu simplismente peguei o Simple Task 2.0 do Vodkart e editei para pokemon, então não me de reputação pois o script é dele: Para reputalo vá ate o system que ele postou: http://www.xtibia.co...simple-task-20/ obs: Se o vodkart em algum momento quiser que eu retire o system eu estarei removendo o mais rápido possivel. Leia TUDO que eu irei escrever para não fazer perguntas inuteis e flodar mais ainda o tópico. Começando: Em Data/Lib crie um arquivo.lua e renomei para: SimpletaskLib.lua e cole isso dentro: tasktabble = { ["bulbasaur"] = {storage_start = 200201, storage = 91001,count = 10,exp = 1000,reward = {{2152,10}}}, ["ivysaur"] = {storage_start = 200202, storage = 91002,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["venusaur"] = {storage_start = 200203, storage = 91003,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11441,1}}}, ["charmander"] = {storage_start = 200204, storage = 91004,count = 10,exp = 1000,reward = {{2152,10}}}, ["charmeleon"] = {storage_start = 200205, storage = 91005,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["charizard"] = {storage_start = 200206, storage = 91006,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11447,1}}}, ["squirtle"] = {storage_start = 200207, storage = 91007,count = 10,exp = 1000,reward = {{2152,10}}}, ["wartortle"] = {storage_start = 200208, storage = 91008,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["blastoise"] = {storage_start = 200209, storage = 91009,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11442,1}}}, ["caterpie"] = {storage_start = 200210, storage = 91010,count = 10,exp = 1000,reward = {{2152,10}}}, ["metapod"] = {storage_start = 200211, storage = 91011,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["butterfree"] = {storage_start = 200212, storage = 91012,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11443,1}}}, ["weedle"] = {storage_start = 200213, storage = 91013,count = 10,exp = 1000,reward = {{2152,10}}}, ["kakuna"] = {storage_start = 200214, storage = 91014,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["beedrill"] = {storage_start = 200215, storage = 91015,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11448,1}}}, ["pidgey"] = {storage_start = 200216, storage = 91016,count = 10,exp = 1000,reward = {{2152,10}}}, ["pidgeotto"] = {storage_start = 200217, storage = 91017,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["pidgeot"] = {storage_start = 200218, storage = 91018,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11453,1}}}, ["rattata"] = {storage_start = 200219, storage = 91019,count = 10,exp = 1000,reward = {{2152,10}}}, ["raticate"] = {storage_start = 200220, storage = 91020,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["spearow"] = {storage_start = 200221, storage = 91021,count = 10,exp = 1000,reward = {{2152,10}}}, ["fearow"] = {storage_start = 200222, storage = 91022,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["ekans"] = {storage_start = 200223, storage = 91023,count = 10,exp = 1000,reward = {{2152,10}}}, ["arbok"] = {storage_start = 200224, storage = 91024,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["pikachu"] = {storage_start = 200225, storage = 91025,count = 10,exp = 1000,reward = {{2152,10}}}, ["raichu"] = {storage_start = 200226, storage = 91026,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["sandshrew"] = {storage_start = 200227, storage = 91027,count = 10,exp = 1000,reward = {{2152,10}}}, ["sandslash"] = {storage_start = 200228, storage = 91028,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["nidoran female"] = {storage_start = 200229, storage = 91029,count = 10,exp = 1000,reward = {{2152,10}}}, ["nidorina"] = {storage_start = 200230, storage = 91030,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["nidoqueen"] = {storage_start = 200231, storage = 91031,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11451,1}}}, ["nidoran male"] = {storage_start = 200232, storage = 91032,count = 10,exp = 1000,reward = {{2152,10}}}, ["nidorino"] = {storage_start = 200233, storage = 91033,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["nidoking"] = {storage_start = 200234, storage = 91034,count = 30,exp = 3000,reward = {{2152,10},{2160,20},{11451,1},{11445,1},{11443,1}}}, ["clefairy"] = {storage_start = 200235, storage = 91035,count = 10,exp = 1000,reward = {{2152,10}}}, ["clefable"] = {storage_start = 200236, storage = 91036,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["vulpix"] = {storage_start = 200237, storage = 91037,count = 10,exp = 1000,reward = {{2152,10}}}, ["ninetales"] = {storage_start = 200238, storage = 91038,count = 20,exp = 2000,reward = {{2152,10},{2160,20}}}, ["jigglypuff"] = {storage_start = 200239, storage = 91039,count = 10,exp = 1000,reward = {{2152,10}}} } function CheckTask(cid) for k, v in pairs(tasktabble) do if getPlayerStorageValue(cid,v.storage_start) >= 1 then return true end end return false end function finisheAllTask(cid) local x = true for k, v in pairs(tasktabble) do if tonumber(getPlayerStorageValue(cid,v.storage)) then x = false end end if x == true then local b = getGlobalStorageValue(63004) if b == -1 then b = 1 end if b < 11 then setGlobalStorageValue(63004,b+1) doBroadcastMessage('[Task Mission Complete] '..getCreatureName(cid)..' was the '..b..'° to finish the task!.') doPlayerAddPremiumDays(cid, 0) doItemSetAttribute(doPlayerAddItem(cid, 7369), "name", "trophy of the 10 firsts finish all task") end end end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, quant) -- by mkalo local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end function getItemsFromList(items) -- by vodka local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[2] .. ' ' .. getItemNameById(items[1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function doAddItemsFromList(cid,items) -- by vodka if table.maxn(items) > 0 then for i = 1, table.maxn(items) do local count = items[2] while count > 0 do if isItemStackable(items[1]) then doPlayerAddItemStacking(cid, items[1], 1) else doPlayerAddItem(cid, items[1],1) end count = count - 1 end end end end function pairsByKeys(t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 local iter = function () i = i + 1 if a == nil then return nil else return a, t[a] end end return iter end Depois em Data/creaturescripts/scripts: crie um arquivo.lua e renomei para: taskcount.lua e cole isso dentro: function onKill(cid, target) if(isMonster(target) == TRUE) then local n = getCreatureName(target) local name_monster = tasktabble[string.lower(n)] if(name_monster and getPlayerStorageValue(cid,name_monster.storage_start) >= 1) then local contagem = getPlayerStorageValue(cid, name_monster.storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then return true end if contagem > name_monster.count then return true end setPlayerStorageValue(cid, name_monster.storage, contagem+1) if contagem == name_monster.count then doPlayerSendTextMessage(cid, 18, "Congratulations! You finished the task of "..n) end end end return TRUE end Depois vá em data/creaturescripts e abra o arquivo creaturescripts.xml e adicione essa linha: <event type="kill" name="task_count" script="taskcount.lua"/> Depois vá em data/creaturescript/script/login.lua e procure por registerCreatureEvent(cid, "WatchTv") e adicione um nova linha em baixo escrito: registerCreatureEvent(cid, "task_count") Agora vá em data/Talkactions/script e crie um arquivo.lua com o nome de: task_complete.lua e cole isso dentro: function onSay(cid, words, param) local str = "" str = str .. "Task Completed :\n\n" for k, v in pairsByKeys(tasktabble) do local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end str = str..k.." = ".. (not tonumber(contagem) and "["..contagem.."]" or "["..((contagem)-1).."/"..v.count.."]") .."\n" end str = str .. "" return doShowTextDialog(cid, 8983, str) end Depois em data/talkactions abra o arquivo talkactions.xml e adicione: <talkaction words="!task" script="task_complete.lua"/> Parte do npc: data/npc/scripts crie um arquivo com o nome de simple_task.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 if (msgcontains(msg, 'task') or msgcontains(msg, 'TASK'))then npcHandler:say("Me diga o nome do monstro que voce deseja fazer a task!Para saber quais diga !task", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then local msg = string.lower(msg) if tasktabble[msg] then if CheckTask(cid) ~= true then local contagem = getPlayerStorageValue(cid, tasktabble[msg].storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then npcHandler:say('Desculpe, mas você já terminou a task do '..msg, cid) return true end setPlayerStorageValue(cid, tasktabble[msg].storage_start, 1) npcHandler:say("Parabens, agora voce esta participando da missao task do "..msg..", prescisa matar "..string.sub(((contagem)-1)-tasktabble[msg].count, 2).." "..msg, cid) talkState[talkUser] = 0 else npcHandler:say('Desculpe, mas voce ja faz parte de uma task!', cid) talkState[talkUser] = 0 end else npcHandler:say('digite o nome correto da missao task!', cid) end elseif (msgcontains(msg, 'receber') or msgcontains(msg, 'RECEBER')) then if CheckTask(cid) then for k, v in pairs(tasktabble) do if getPlayerStorageValue(cid,v.storage_start) >= 1 then local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then npcHandler:say('você so pode receber os items uma unica vez!', cid) return true end if (((contagem)-1) >= v.count) then doPlayerAddExp(cid, v.exp) doAddItemsFromList(cid,v.reward) setPlayerStorageValue(cid, v.storage, "Finished") setPlayerStorageValue(cid, v.storage_start, 0) npcHandler:say('Obrigado pela sua ajuda, voce recebeu: '..getItemsFromList(v.reward)..' por ter completado a task do '..k, cid) finisheAllTask(cid) else npcHandler:say('Desculpe,mas voce so matou '..((contagem)-1)..' de '..v.count..' '..k, cid) end end end else npcHandler:say("voce nao esta em nenhuma missao task", cid) end elseif (msgcontains(msg, 'sair') or msgcontains(msg, 'SAIR')) then if CheckTask(cid) then talkState[talkUser] = 2 for k, v in pairs(tasktabble) do if getPlayerStorageValue(cid,v.storage_start) >= 1 then local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end npcHandler:say('você esta participando de uma missao task do '..k..' e ja tem '..((contagem)-1)..' '..k..' mortos, deseja mesmo sair?', cid) end end else npcHandler:say("voce nao esta em nenhuma missao task", cid) end elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then for k, v in pairs(tasktabble) do if getPlayerStorageValue(cid,v.storage_start) >= 1 then setPlayerStorageValue(cid, v.storage_start, 0) end end npcHandler:say("Voce foi retirado da task com sucesso!", cid) elseif msg == "no" then selfSay("Tudo bem entao", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Para finalizar em data/npc crie um arquivo .xml com o nome de Ludger.xml e adicione isso dentro: <?xml version="1.0"?> <npc name="Ludger" script="data/npc/scripts/simple_task.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. quer fazer uma {task}? ou {sair} de uma? tambem pode {receber} premios se terminou ela!" /> </parameters> </npc> Bom terminando isso o script está feito agora estarei explicando como edita-lo tendo como base o padrão do Vodkart: Você vai em Lib/SimpletaskLib.lua lá tem uma tabela chamada tasktabble que funciona da seguinte maneira: ["nome do pokemon"] -- aqui você coloca o nome do pokemon que deverá ser morto storage_start -- n mexa, é para checar se ele está com a task storage -- é o valor da storage para fazer a contagem. obs: não edite count -- é o total de pokemons que tem que matar exp -- é quanto ele vai ganhar de exp ao terminar a task do monstro reward -- é a lista dos items que ele vai ganhar ao terminar a task do monstro Explicando ná prática: ["bulbasaur"] = {storage_start = 200201, storage = 91001,count = 10,exp = 1000,reward = {{2152,10}}}, Bulbasaur - nome do pokemon \o/ storage_start = 200201,storage = 91001 Não mecha pois são as storages de checagem de task e da contagem da mesma. Count = 10 - Quantidade de bulbas que deverá ser morto. Exp = 1000 - Bom se você não sabe oque significa não deveria nem estár aqui. reward = {{2152,10}}}, - é o premio após terminar a task 2152 id do item 10 quantidade do item Você notará que eu fiz o seguinte: 1º evolução - 1000 de exp, 10 pokemons, 10 notas verdes escuras. 2º evolução - 2000 de exp, 20 pokemons, 10 notas verdes escuras , 10 notas azuis. 3º evolução - 3000 de exp, 30 pokemon, 10 notas verdes escuras , 10 notas azuis e uma stone da spécie do pokemon. Bom eu fiz isso para ter um padrão e poder postar a vocês fiquem avontade a editar oque quiserem. Mais algumas coisas: O npc foi retirado os acentos pois dava erros aqui sei la por que rsrs, se você quiser editar as falas do npc basta abrir o data/npc/script simple_task.lua e editar. Para saber quais task o player pode fazer ele tem que dizer !task ( tem uma imagem para você melhor intender no link do começo) Para falar com o npc é hi task nome da task ex: bulbasaur e pronto basta ir matar. Se você matar oque o npc pedio basta ir até ele e dizer. hi receber No script do vodkart eu retirei os dias premiums que ele adicionava aos 10 primeiros que completasem uma task no servidor e o troféu que tambem vinha no meu não veio então teste você mesmo. Para saber quantos pokemons faltam basta tambem dizer !task pois la mostra a contagem das tasks. Só á como fazer uma task por vez e tambem 1 vez só cada task. Se você ler no SimpletaskLib.lua e olhar o Nidoking verá o premio da seguinte forma: {{2152,10},{2160,20},{11451,1},{11445,1},{11443,1}}}, eu coloquei varios para vocês saberem como ficaria com mais de 3 itens. Para adicionar mais pokemons basta seguir a ultima linha de pokemons: ["jigglypuff"] = {storage_start = 200239, storage = 91039,count = 10,exp = 1000,reward = {{2152,10}}} Lembre-se se você ira adicionar mais pokemons o ultimo que é o jigglypuff deverá ter uma "," no final ficando: ["jigglypuff"] = {storage_start = 200239, storage = 91039,count = 10,exp = 1000,reward = {{2152,10}}}, E o novo pokemon devera ser feito o seguinte: ["novopokemon"] = {storage_start = 200240, storage = 91040,count = 10,exp = 1000,reward = {{2152,10}}} Repare a storage_start = 200240, storage = 91040 aumentaro 1 numero para mais pokemons continue a aumenta-la toda vez que quiser adicionar um novo pokemon e NÃO ESQUEÇA A ULTIMA LINHA DE POKEMON NÃO TEM VIRGULA Vlw galerá ta ae o system sei que é grande sinto muito foi o que deu pra fazer \o/ espero poder tirar duvidas se vocês tiverem. OBS: Testado no PDA do começo do tópico com o client do começo do tópico (o do icone do pikachu) CRÉDITOS: Vodkart & Demonbholder Se faltou algo que eu esqueçi de mensionar olhem no link que eu mandei do system do vodkart e se não acharem lá me pergutem Abraços. Editado Abril 27, 2012 por SoulOroshie Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249301 Compartilhar em outros sites More sharing options...
fernandofw 2 Postado Abril 27, 2012 Share Postado Abril 27, 2012 Alguem poderia me dizer como arrumo para poder amontoar items, tipo juntar 100 stones juntas, queria saber como faz isso com stones, no meu so da pra ser 1 por vez me ajudem por favor Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/423/#findComment-1249322 Compartilhar em outros sites More sharing options...
Posts Recomendados