Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Bom jente, preciso de um sistema " antigo ", seria ele o Fossil System, que faz reviver Omanyte, Kabuto e Aerodactyl, Voce precisaria então dos fosseis deles.

Link para o post
Compartilhar em outros sites
  • 1 month later...
  • 4 weeks later...

data/npc/script : crie um arquivo .lua com o nome do poke, aqui no caso eo kabuto

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

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then
return false
end


local function givePokemon(cid)
local pokemon = "Kabuto"
local gender = getRandomGenderByName(pokemon)
local btype = "ultra"
local happy = 220

if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
   item = doCreateItemEx(11829)
else
    item = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, 11829, 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)
end
doPlayerRemoveItem(cid, 11445, 100)   --aki tira as stone
doPlayerRemoveItem(cid, 12579, 1)      --aki tira o fossil
selfSay("So there is it! Take this pokemon, I think he will be better with you!", cid)
setPlayerStorageValue(cid, 189673, 2)   --storage da quest
end

rock = 11445    --id da stone
old = 12579         --id do fossil.. 

if msgcontains(string.lower(msg), 'help') or msgcontains(string.lower(msg), 'ajuda') then
    selfSay("Hum... I need some itens to mys researches... Can you bring to me a Dome fossil and 100 Rock Stones?", cid)
    talkState[talkUser] = 1
elseif (msgcontains(string.lower(msg), 'yes') or msgcontains(string.lower(msg), 'sim')) and talkState[talkUser] == 1 then
    if getPlayerStorageValue(cid, 189673) <= 0 then
       selfSay("Ok then go and bring this itens to me and maybe we can revive a old and rare Pokemon!!", cid)
       setPlayerStorageValue(cid, 189673, 1)
       talkState[talkUser] = 0
       return true
    elseif getPlayerStorageValue(cid, 189673) == 1 then
       if getPlayerItemCount(cid, rock) >= 100 and getPlayerItemCount(cid, old) >= 1 then   --ta pedindo 100stone e 1 fossil...
          selfSay("Wow then you got the items! Let me see if I could relive that pokemon!", cid)
          addEvent(givePokemon, 2000, cid)
          talkState[talkUser] = 0
          return true
       else
          selfSay("You don't have my itens yet... Come back when you get them!!", cid)
          talkState[talkUser] = 0
          return true
       end
    elseif getPlayerStorageValue(cid, 189673) == 2 then                        --no caso soh da pra fazer isso 1x por char...
       selfSay("Hummm.. You already help me, don't you? Thanks again.. but now i can't talk with you...", cid)
       talkState[talkUser] = 0
       return true
    end     
end

return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

em npc copie um qualqur e cole dentro: 

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

<npc name="Professora Adriane" script="kabuto.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="1442" head="116" body="119" legs="114" feet="114" corpse="2212"/>

<parameters>
	<parameter key="message_greet" value="Welcome |PLAYERNAME|, i need some {help} with mys researches... Can you help me?"/>
</parameters>
</npc>

outfit ali seria melhor trocar pra uma conhecida

 

~~não sei fazer em spoiler desculpa, isso funcionou no meu pda e no meu ot que estou usando agr, espero que funcione ai tbm

Editado por Marcelolol (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  Em 19/02/2015 em 23:40, Marcelolol disse:

data/npc/script : crie um arquivo .lua com o nome do poke, aqui no caso eo kabuto

  Mostrar conteúdo oculto

em npc copie um qualqur e cole dentro: 

  Mostrar conteúdo oculto

outfit ali seria melhor trocar pra uma conhecida

 

~~não sei fazer em spoiler desculpa, isso funcionou no meu pda e no meu ot que estou usando agr, espero que funcione ai tbm

Expand   Mostrar mais  

Para usar spoiler, basta escrever Spoiler entre conchetes "[]", ex:

[.Spoiler] conteúdo [./Spoiler]

Ficará assim:

 

  Mostrar conteúdo oculto

conteúdo

Atenciosamente, David Araujo

Meu Conteúdo

 

Fui útil? Gostou? 
Faça uma doação.

 
 
 

"É errando que se erra."

"Gambiarras resolvem instantemente, porém podem complicar em problemas futuros."

"Cada dia vivido é um aprendizado."

Link para o post
Compartilhar em outros sites
  • 4 weeks later...

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum:

Hidden Content

    Give reaction to this post to see the hidden content.

Este tópico foi movido:

De: "OTServScriptingActions e TalkActions"

Para: "OTServSuporte OTServSuporte de Servidores Derivados"

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96842
    Tópicos
    519598
    Posts
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo