page157 0 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 queria saber se tem como tipo fazer 1 npc q vende 1 pokebola com 1 shiny dragonite custando 5kk ? do mais rep se mi ajudaram menos hj pq hj eu nao posso dar mais rep Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/ Compartilhar em outros sites More sharing options...
Roksas 846 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 (editado) Vá em data/npc, crie um arquivo chamado Seller3.xml Cole isso dentro: <?xml version="1.0" encoding="UTF-8"?> <npc name="Shiny Seller" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="80" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="Shiny Dragonite,ID DA BALL,5000000"/> </parameters> </npc> Configurando: Amarelo: Nome do pokemon Vermelho: ID da ball do Shiny Dragonite Verde: o Preço, no caso 5kk Editado Fevereiro 2, 2013 por Roksas Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458188 Compartilhar em outros sites More sharing options...
StyloMaldoso 330 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 (editado) Roksas fosse você procuraria mais informaçoes de pokémon cara, isso que NUNCA ira funcionar. Editado Fevereiro 2, 2013 por StyloMaldoso Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458190 Compartilhar em outros sites More sharing options...
page157 0 Postado Fevereiro 2, 2013 Autor Share Postado Fevereiro 2, 2013 (editado) slicer se sabe fazer ? esse npc ? nome errado kk mals stylos Editado Fevereiro 2, 2013 por page157 Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458194 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 Posso saber porque não iria funcionar? Copiei um NPC de um Centurion v4 que tenho aqui, apenas editei... Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458204 Compartilhar em outros sites More sharing options...
StyloMaldoso 330 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 Cara acho que PODE até funcionar, PODE.. mais não vai takar as seguintes attribute na pokeball do poke. local name = getItemAttribute(pb, "poke") doItemSetAttribute(pb, "hp", 1) doItemSetAttribute(pb, "poke", "Shiny "..getItemAttribute(pb, "poke")) doItemSetAttribute(pb, "description", "Contains a Shiny "..getItemAttribute(pb, "poke")..".") abraços (: Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458212 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 roks pokemons nao sao soh um 'item' qlqr... precisa de atributos nas balls... doSetItemAttribute(item.uid, "poke", "Shiny Dragonite") esse eh soh o basico... tem varios outros... mano n conversamos por PM? ;/ @topic ta usando q serv base? com lvl? sem? ... de informçoes amigo... Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458213 Compartilhar em outros sites More sharing options...
page157 0 Postado Fevereiro 2, 2013 Autor Share Postado Fevereiro 2, 2013 uso sem level Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458220 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end 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 function buyPoke(cid, pokemon) if not pokes[pokemon] then return false end local gender = getRandomGenderByName(pokemon) local btype = "normal" local happy = 250 if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then item = doCreateItemEx(11826) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1) end doItemSetAttribute(item, "poke", pokemon) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "description", "Contains a "..pokemon..".") doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".") if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) selfSay("Your pokemon was sent to Pokemon Center!", cid) end return true end local msg = msg:lower() local pokemon = "Shiny Dragonite" local price = 5000000 * 100 --faz uns testes ae.. n me do bem com o sistema de money do tibia.. ------------------------------------------------------------------------------ if msgcontains(msg, 'sell') or msgcontains(msg, 'vender') then selfSay("I can sell to you a ".. pokemon .." for ".. (price/100) .."dls, do you want it?", cid) talkState[cid] = 1 return true elseif msgcontains(msg, "yes") or msgcontains(msg, "yes") and talkState[cid] == 1 then if doPlayerRemoveMoney(cid, price) == true then selfSay("Ok then, enjoy it!", cid) buyPoke(cid, pokemon) talkState[cid] = 0 else selfSay("You don't have that much money!", cid) talkState[cid] = 0 end end if (msgcontains(msg, "no") or msgcontains(msg, "nao")) then selfSay("Ok then, come back if you want something...", cid) talkState[cid] = 0 return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) e o .xml ... <?xml version="1.0" encoding="UTF-8"?> <npc name="NAME" script="NOME_SCRIPT.lua" walkinterval="3000" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="1155" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Welcome |PLAYERNAME|, i can {sell} somethings to you..."/> </parameters> </npc> nao esquece de mudar ali em NAME e NOME_SCRIPT.lua ... Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458240 Compartilhar em outros sites More sharing options...
page157 0 Postado Fevereiro 2, 2013 Autor Share Postado Fevereiro 2, 2013 vlw resolvido Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458248 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 2, 2013 Share Postado Fevereiro 2, 2013 sanado, movido Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1458252 Compartilhar em outros sites More sharing options...
Stigal 585 Postado Abril 20, 2018 Share Postado Abril 20, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/206402-encerrado-poketibia-npc/#findComment-1733471 Compartilhar em outros sites More sharing options...
Posts Recomendados