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
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
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
Project Pokémon Mysterion OpenSoures 2016.
Em breve, mais informações!
slicer se sabe fazer ? esse npc ?
nome errado kk mals stylos
Posso saber porque não iria funcionar? Copiei um NPC de um Centurion v4 que tenho aqui, apenas editei...
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 (:
Project Pokémon Mysterion OpenSoures 2016.
Em breve, mais informações!
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...
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
uso sem level
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 ...
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
vlw resolvido
sanado, movido
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
"O fracasso é a oportunidade de se começar de novo inteligentemente"