Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''npc''.

  • 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

  1. Ola galera, cabei de fazer um npc de travel que move o player por uma rota determinada no mapa editor! Peguei como base a ideia dos novos npcs de travel da pxg... Vamos la então... 1* Vão na pasta lib/ e criem um arquivo la com o nome Travel.lua, e coloquem isso dentro... 2* Vão na pasta npc/ e criem o arquivo .xml do npc... Vou deixar um exemplo aki... 3* Vão na pasta npc/scripts/ e criem um arquivo la com o nome Water Travel.lua e colem isso dentro... Pronto, agora vamos as configurações... Configuraçoes: 1* Aki vocês configuram as posições dos npcs e as posições iniciais e finais da rota q o player vai seguir: 2* Aki vocês configuram a outfit q o player vai ganhar quando começar o travel, podendo ser outfit de moto, carro, kaike e afins: local outfit = getPlayerSex(cid) == 0 and {lookType = 1440} or {lookType = 1439} --outfit q o player vai ganhar, a 1* eh female e a 2* eh male 3* Caso não usem um servidor de pokemon, podem tirar essa parte... 4* Essa é a imagem de como vocês tem q configurar as rotas: Para fazer as rotas usem a ferramenta 'No-Logout' do mapa editor... lembrando que as posições finais tambem tem que ter o piso no-logout! Podem fazer a rota como quiserem, mas por favor, nao tentem 'forçar' o script. Importante: O npc tem q tar imóvel, ele n pode se mover da posição que foi colocada na tabela no script Water Travel.lua! Importante: Esse script foi inicialmente feito para travels na agua, mas eu testei aki e da pra fazer rotas na terra normalmente! Importante: Quem for usar num servidor pokemon olhem o spoiler abaixo: Espero que gostem, qualquer duvida ou bug podem postar aki, Vlw!
  2. Hail Xtibianos! Desenvolvi esse sistema pois achei legal o npc fazer isso. O que o sistema faz? Ele seta o focus do npc em um player quando o player se aproxima dele e espera por 5 segundos. Se o player não "falar" com o npc, o npc ignora ele (não foca mais o player). Mas o player pode "falar" com o npc quando quiser (não interfere em nada nesse sistema). Em npchandler.lua: Procure: Adicione dentro da tabela: Procure: Antes da função: Adicione: Procure: Dentro do escopo de: Adicione: Pronto. Adicionado.
  3. Dale! suave? deixo aqui um npc que fiz agora para meu servidor... Como fala no titulo, ele cobra uma certa quantia de dinheiro ou item, para dar uma informação, só configure certinho. É bem simples mas pode ajudar alguém Lembrando que está testado e funcionando 100% Vá em data/npc e crie um arquivo XML com o nome info e cole isso dentro... Salve e feche... Agora em data/npc/scripts crie um arquivo LUA com o nome info e cole dentro... Bom, é só isso espero ajudar alguém, se ajudei deixa o REP! Aí pra fortalecer a amizade LEMBRANDO QUE DENTO DO ARQUIVO ESTÁ A EXPLICAÇÃO.
  4. Tom.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Tom" script="data/npc/scripts/Rookgaard/Tom.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="144" head="113" body="115" legs="115" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="Hey there, |PLAYERNAME|. I'm Tom the tanner. If you have fresh corpses, leather or paws, trade with me."/> <parameter key="message_farewell" value="Good bye."/> <parameter key="message_walkaway" value="D'oh?"/> <parameter key="message_idletimeout" value="D'oh?"/> <parameter key="message_sendtrade" value="Sure, check what I buy."/> <parameter key="module_shop" value="1"/> <parameter key="shop_sellable" value="bear paw,5896,10;dead rabbit,3119,2;dead rat,2813,2;dead wolf,2826,5;minotaur leather,5878,12;dead spider,2848,3;wolf paw,5897,7;"/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="Oracle;Seymour;Cipfried;Tom;tanner;corpse;monster;sewer;troll;orc;Amber;Rookgaard;main;mainland;Obi;Dixi;Lily;Al Dee;wares;job;merchants;Lee'Delle;weapon;shield;Willie;Billy;Norma;" /> <parameter key="keyword_reply1" value="It's in the academy, just above {Seymour}. Go there once you are level 8 to leave this place." /> <parameter key="keyword_reply2" value="He sticks his nose too much in books." /> <parameter key="keyword_reply3" value="I'm not what you'd call a 'believer'." /> <parameter key="keyword_reply4" value="Yep." /> <parameter key="keyword_reply5" value="That's my job. It can be dirty at times but it provides enough income for my living." /> <parameter key="keyword_reply6" value="I'm buying fresh {corpses} of rats, rabbits and wolves. I don't buy half-decayed ones. If you have any for sale, {trade} with me." /> <parameter key="keyword_reply7" value="Good monsters to start with are rats. They live in the {sewers} under the village of {Rookgaard}." /> <parameter key="keyword_reply8" value="The nearest sewer entrance is just to the right of this building." /> <parameter key="keyword_reply9" value="Troll leather stinks. Can't use it." /> <parameter key="keyword_reply10" value="I don't buy orcs. Their skin is too scratchy." /> <parameter key="keyword_reply11" value="Now that's an interesting woman." /> <parameter key="keyword_reply12" value="This island has its own problems, but all in all it's a decent place to live." /> <parameter key="keyword_reply13" value="You can go there once you are level 8 and have talked to the {oracle}." /> <parameter key="keyword_reply14" value="You can go there once you are level 8 and have talked to the {oracle}." /> <parameter key="keyword_reply15" value="He is such a hypocrite." /> <parameter key="keyword_reply16" value="She buys my fine leather clothes." /> <parameter key="keyword_reply17" value="She always comes and preaches about how one should not wear animal skin." /> <parameter key="keyword_reply18" value="He's an apple polisher." /> <parameter key="keyword_reply19" value="I'm buying fresh {corpses} of rats, rabbits and wolves. I don't buy half-decayed ones. If you have any for sale, {trade} with me." /> <parameter key="keyword_reply20" value="I'm the local {tanner}. I buy fresh animal {corpses}, tan them, and convert them into fine leather clothes which I then sell to {merchants}." /> <parameter key="keyword_reply21" value="{Dixi} and {Lee'Delle} sell my leather clothes in their shops." /> <parameter key="keyword_reply22" value="Her nose is a little high in the air, I think. She never shakes my hand." /> <parameter key="keyword_reply23" value="Nope, sorry, don't sell that. Ask {Obi} or {Lee'Delle}." /> <parameter key="keyword_reply24" value="Nope, sorry, don't sell that. Ask {Dixi} or {Lee'Delle}." /> <parameter key="keyword_reply25" value="I kinda like him. At least he says what he thinks." /> <parameter key="keyword_reply26" value="He's a better cook than his cousin {Willie}, actually." /> <parameter key="keyword_reply27" value="I like her beer." /> </parameters> </npc> Tom.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState,price = {},0 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 shopModule = ShopModule:new() npcHandler:addModule(shopModule) 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,'human') then selfSay('Are you crazy?!', cid) npcHandler:releaseFocus(cid) end return true end function thinkCallback() talk = math.random(1,200) if talk == 1 then doCreatureSay(getNpcCid(), "Oh yeah, I'm also interested in wolf paws and bear paws.", TALKTYPE_YELL) elseif talk == 2 then doCreatureSay(getNpcCid(), "Also buying minotaur leather.", TALKTYPE_YELL) elseif talk == 3 then doCreatureSay(getNpcCid(), "Buying fresh corpses of rats, rabbits and wolves.", TALKTYPE_YELL) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  5. Bom galera, não vou enrola, é um item que cria um npc na posicao que vc definir, seria util para wodbo. function onUse(cid, item, frompos, item2, topos) local texto = 'Você invocou shenlong.' --msg ao usar item position = {x= 1487, y= 667, z= 7} --pos onde cria npc if getPlayerStorageValue(cid, 336659) >= 1 then doPlayerSendTextMessage(cid, 27, "Você ja invocou shenlong.") --msg ao tentar usar de novo item return true end if item.itemid == 7840 then --item q remove doRemoveItem(item.uid, 1) doSendMagicEffect(frompos, 13) doPlayerSendTextMessage(cid, 22, texto) doCreateNpc("Baiano", position) --npc q cria setPlayerStorageValue(cid, 336659, 1) end end é isso obg
  6. Hug0

    NPC Ferreiro

    Aew galera blz? Eu utilizo o servidor The OTX Server Global - Version: (3.10) e queria fazer um npc que tivesse as seguintes características. Ele em tese vai ser um npc ferreiro só que no script dele eu quero que ele receba uma arma X (ex: shiny blade) e refine a mesma, mais tendo a chance de falhar esse processo exemplo Ele vai pegar a arma mais itens de refinamento e deixar ela +1 no caso ele teria 90% de chance se acertar. E ele poderia refinar os itens ate +7 sendo que na ultima so teria 10% de chance. Caso desse erro a arma voltaria para o +0 no caso a arma original.. Sei que tem scrips de upgrade porem nessa versão que utilizo nenhum funcionou, e testei mais de 10 scripts diferentes. Não apresentam erros no distro mais tbm não fazem a função para qual foram feitos.
  7. Segue a imagem: Problema resolvido! Caso alguém tenha o mesmo problema modifiquei o Default.lua ficando assim:
  8. Lee'Delle.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Lee Delle" script="data/npc/scripts/Rookgaard/LeeDelle.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="140" head="78" body="123" legs="130" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="Hello, hello, |PLAYERNAME|! Please come in, look, and buy!"/> <parameter key="message_farewell" value="Bye, bye, |PLAYERNAME|."/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="help;stuff;wares;offert;weapons;shield;armors;helmets;equipment;job;name;time;tibia;sell;mission;quest;dungeon;monsters;thais;" /> <parameter key="keyword_reply1" value="I am already helping you by selling stuff." /> <parameter key="keyword_reply2" value="I sell equipment of all kinds. Just ask me about the type of wares you are interested in." /> <parameter key="keyword_reply3" value="I sell weapons, shields, armor, helmets, and equipment. For what do you want to ask?" /> <parameter key="keyword_reply4" value="I sell weapons, shields, armor, helmets, and equipment. For what do you want to ask?" /> <parameter key="keyword_reply5" value="I sell spears, rapiers, sabres, daggers, hand axes, axes, and short swords. Just tell me what you want to buy." /> <parameter key="keyword_reply6" value="I sell wooden shields and studded shields. Just tell me what you want to buy." /> <parameter key="keyword_reply7" value="I sell jackets, coats, doublets, leather armor, and leather legs. Just tell me what you want to buy." /> <parameter key="keyword_reply8" value="I sell leather helmets, studded helmets, and chain helmets. Just tell me what you want to buy." /> <parameter key="keyword_reply9" value="I sell torches, bags, scrolls, shovels, picks, backpacks, sickles, scythes, ropes, fishing rods and sixpacks of worms. Just tell me what you want to buy." /> <parameter key="keyword_reply10" value="I am a merchant, so what can I do for you?" /> <parameter key="keyword_reply11" value="My name is Lee'Delle. Do you want to buy something?" /> <parameter key="keyword_reply12" value="I am so sorry, I have no watches to sell. Do you want to buy something else?" /> <parameter key="keyword_reply13" value="The continent is even more exciting than this isle!" /> <parameter key="keyword_reply14" value="I sell much. Have a look at the blackboards for my wares or just ask." /> <parameter key="keyword_reply15" value="I really love flowers. Sadly my favourites, honey flowers are very rare on this isle. If you can find me one, I'll give you a little reward." /> <parameter key="keyword_reply16" value="I really love flowers. Sadly my favourites, honey flowers are very rare on this isle. If you can find me one, I'll give you a little reward." /> <parameter key="keyword_reply17" value="be carefull down there. Make sure you bought enough torches and a rope or you might get lost." /> <parameter key="keyword_reply18" value="There are plenty of them. Buy here the equipment to kill them and sell their loot afterwards!" /> <parameter key="keyword_reply19" value="Thais is the capital of the thaian empire." /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="axe,2386,18;chain helmet,2458,49;coat,2651,7;dagger,2379,4;doublet,2485,14;fihing rod,2580,140;hand axe,2380,7;jacket,2650,9;leather armor,2467,22;leather helmet,2461,11;leather legs,2649,9;rapier,2384,13;rope,2120,45;sabre,2385,22;scroll,1949,5;scythe,2550,10;short sword,2406,26;shovel,2554,9;sickle,2405,7;spear,2389,9;studded helmet,2482,58;studded shield,2526,47;torch,2050,2;wooden shield,2512,13;"/> <parameter key="shop_sellable" value="axe,2386,7;bone club,2449,5;brass helmet,2460,22;brass shield,2511,25;chain armor,2464,40;chain helmet,2458,12;copper shield,2530,50;dagger,2379,2;doublet,2485,3;fishing rod,2580,30;hand axe,2380,4;hatchet,2388,25;katana,2412,35;leather armor,2467,5;leather helmet,2461,3;leather legs,2649,2;leather boots,2643,2;legion helmet,2480,22;mace,2398,30;machete,2420,6;plate shield,2510,40;rapier,2384,5;rope,2120,8;sabre,2385,12;scythe,2550,3;short sword,2406,10;shovel,2554,2;sickle,2405,2;spear,2389,3;studded armor,2484,25;studded club,2448,2;studded helmet,2482,20;studded legs,2468,15;studded shield,2526,16;sword,2376,25;viking helmet,2473,25;wooden shield,2512,3;"/> </parameters> </npc> LeeDelle.lua 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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) 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, 'honey') or msgcontains(msg, 'flower') then if(doPlayerRemoveItem(cid,2103,1) == true)then npcHandler:say('Oh, thank you so much! Please take this piece of armor as reward.', cid) doPlayerAddItem(cid,2468,1) else npcHandler:say('Honey flowers are my favourites', cid) end else npcHandler:say('sorry but I do not know what they wanted.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  9. Olá bom dia, se alguém puder me ajudar ficaria muito grato! Porfavor alguém consegue disponibilizar um script de npc que altere PvP do player? Vou explicar, a pessoa cria o char e já chega sendo npvp, portanto na cidade terá um npc em que ele possa se alterar pra pvp, gostaria que o player que não tivesse PvP ficasse com a caveirinha verde do lado do char e o PvP fica normal (podendo pegar caveirinha branca, red, black. Também gostaria se for possível adicionar tempo para pode trocar novamente, tipo 24 horas. Se alguém puder uma luz porfavor, desde já agradeço. Server global 12.51 tfs 1.3
  10. No Face

    Script de um NPC

    Boa Noite pessoal, eu sou Administrador de um PokeTibia e eu resolvi entrar para ver o que estava acontecendo, ao entrar no jogo me reportaram um erro de um NPC, a função dele é pedir itens para o jogador, e ao entregar os itens ele automaticamente some e o portal aparece, ele retorna ao mesmo lugar depois de 15 minutos para que outro player possa fazer o mesmo. Porém o erro dele, causou efeito contrário, ao invés do NPC estar no lugar, o que aparece é o portal e ao entrar nesse portal o jogador é teleportado automaticamente para o templo, ou seja, ao invés do NPC estar lá, aparece apenas o portal, e não há como ir para a hunt/cave por que o NPC não está lá para recolher os itens. Alguém poderia me ajudar com isso? Eu consegui o cargo de ADM a 4 dias e por isso não sei muito bem o que fazer para resolver esse problema.
  11. Dermot.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Dermot" script="data/npc/scripts/Fibula/Dermot.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="57" body="68" legs="38" feet="114" addons="0"/> <parameters> <parameter key="message_greet" value="Hello, traveller |PLAYERNAME|. How can I help you?"/> <parameter key="message_farewell" value="See you again."/> <parameter key="message_needmoremoney" value="You need more money."/> <parameter key="message_sendtrade" value="...."/> <parameter key="message_onbuy" value="thank you."/> <parameter key="message_decline" value="No problem..."/> <parameter key="message_walkaway" value="Yeah, get lost." /> <parameter key="message_onsendtrade" value="Yeah, buy something." /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;magistrate;name;time;fibula;dungeon;monsters;" /> <parameter key="keyword_reply1" value="I am the magistrate of this isle." /> <parameter key="keyword_reply2" value="Thats me." /> <parameter key="keyword_reply3" value="I am Dermot, the magistrate of this isle." /> <parameter key="keyword_reply4" value="Time is not important on Fibula." /> <parameter key="keyword_reply5" value="You are at Fibula. This isle is not very dangerous. Just the wolves bother outside the village." /> <parameter key="keyword_reply6" value="Oh, my god. In the dungeon of Fibula are a lot of monsters. That's why we have sealed it with a solid door." /> <parameter key="keyword_reply7" value="Oh, my god. In the dungeon of Fibula are a lot of monsters. That's why we have sealed it with a solid door." /> <parameter key="keyword_reply8" value="" /> </parameters> </npc> Dermot.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 talkState,talkUser = {}, 0 function creatureSayCallback(cid, type, msg) if not(npcHandler:isFocused(cid)) then return false end local msg = string.lower(msg) talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'door') or msgcontains(msg, 'key'))then npcHandler:say("Do you want to buy the dungeon key for 2000 gold?", cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1)then if(msgcontains(msg, 'yes'))then if(getPlayerMoney(cid) >= 2000)then local key = doCreateItemEx(2087) doItemSetAttribute(key, "aid", 3940) doPlayerAddItemEx(cid, key) doPlayerRemoveMoney(cid, 2000) npcHandler:say("Now you own the hot key.",cid) else npcHandler:say("Hmm, I need 2000 gold piece.",cid) end else npcHandler:say("Hmm, maybe next time.",cid) end talkState[talkUser] = 0 else npcHandler:say('...?',cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  12. Simon the Beggar.xml <?xml version="1.0"?> <npc name="Simon the Beggar" script="data/npc/scripts/Fibula/beggar.lua" walkinterval="2000"> <health now="200" max="200" /> <look type="153" head="116" body="123" legs="123" feet="40" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. I am a poor man. Please {help} me." /> <parameter key="message_farewell" value="Have a nice day." /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;beggar;gold;name;Simon;Tibia;dermot;village;Fibula;Dungeon;Timur;jetty;ship;monster;giant spider;" /> <parameter key="keyword_reply1" value="I have no job. I am a {beggar}." /> <parameter key="keyword_reply2" value="I have no {gold} and no {job}, so I am a beggar." /> <parameter key="keyword_reply3" value="I need gold. I love gold. I need {help}!" /> <parameter key="keyword_reply4" value="My name is {Simon}. I am a very poor man." /> <parameter key="keyword_reply5" value="I am Simon. The poorest human all over the continent." /> <parameter key="keyword_reply6" value="Hehe, do you have a shovel? I can sell you a shovel if you want to return to Tibia." /> <parameter key="keyword_reply7" value="The magistrate of the village. I heard he is selling something for the Fibula {Dungeon}." /> <parameter key="keyword_reply8" value="To the north is the village {Fibula}. A very small village." /> <parameter key="keyword_reply9" value="I hate Fibula. Too many wolves are here." /> <parameter key="keyword_reply10" value="I heard a lot about the Fibula Dungeon. But I never was there." /> <parameter key="keyword_reply11" value="I hate Timur. He is too expensive. But sometimes I find maces and hatchets. Timur is buying these items." /> <parameter key="keyword_reply12" value="I hate this jetty. I have never seen a ship here." /> <parameter key="keyword_reply13" value="There is a large sea-monster outside. I think there is no gritty captain to sail in this quarter." /> <parameter key="keyword_reply14" value="The strongest monster I know is the giant spider." /> <parameter key="keyword_reply15" value="I know that terrible monster. It killed the fishers on the isle on north." /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="shovel,2554,50;" /> </parameters> </npc> Beggar.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 talkState,talkUser = {}, 0 local function say(npc,text,cid,talk) if not(npcHandler:isFocused(cid)) then return false end if talk and not(talkState[talkUser] == talk) then return false end doCreatureSay(npc,text,TALKTYPE_PRIVATE_NP,cid) end local function changeTalk(talk) talkState[talkUser] = talk end function creatureSayCallback(cid, type, msg) if not(npcHandler:isFocused(cid)) then return false end local msg = string.lower(msg) talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'help'))then npcHandler:say("I need gold. Can you spend me 100 gold pieces?", cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1)then if(msgcontains(msg, 'yes'))then if(getPlayerMoney(cid) >= 100)then doPlayerRemoveMoney(cid, 100) npcHandler:say("Thank you very much. Can you spare 500 more gold pieces for me? I will give you a nice hint.",cid) talkState[talkUser] = 11 else npcHandler:say("Hmm, I need 100 gold piece.",cid) talkState[talkUser] = 0 end else npcHandler:say("Hmm, maybe next time.",cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 11)then if(msgcontains(msg, 'yes'))then if(getPlayerMoney(cid) >= 500)then doPlayerRemoveMoney(cid, 500) npcHandler:say("That's great! I have stolen something from Dermot. You can buy it for 200 gold. Do you want to buy it?",cid) talkState[talkUser] = 12 else npcHandler:say("Hmm, I need 500 gold piece.",cid) talkState[talkUser] = 0 end else npcHandler:say("Hmm, maybe next time.",cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 12)then if(msgcontains(msg, 'yes'))then if(getPlayerMoney(cid) >= 200)then local key = doCreateItemEx(2087) doItemSetAttribute(key, "aid", 3940) doPlayerAddItemEx(cid, key) doPlayerRemoveMoney(cid, 200) npcHandler:say("Now you own the hot key.",cid) else npcHandler:say("Hmm, I need 200 gold piece.",cid) end else npcHandler:say("Hmm, maybe next time.",cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'outfit') or msgcontains(msg, 'beard'))then npcHandler:say("Haha, that beard is - well, not fake, but there's a trick behind it. I noticed people tend to be more generous towards a poor gramps. Want to know my trick?", cid) talkState[talkUser] = 2 elseif(talkState[talkUser] == 2 and msgcontains(msg, 'yes'))then if(getPlayerSex(cid) == PLAYERSEX_MALE)then npcHandler:say("I can mix a secret potion which will increase your facial hair growth enormeously. I call it 'Instabeard'. However, it requires certain ingredients. ...",cid) addEvent(say,8000,getNpcCid(),"... For the small fee of 20000 gold pieces I will help you mix this potion. Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...",cid,2) addEvent(say,14000,getNpcCid(),"... Do we have a deal?",cid,2) addEvent(changeTalk,14000,21) else npcHandler:say("I can mix a secret potion which increases facial hair growth enormeously. I call it 'Instabeard'. However, I fear it works only for men. ...",cid) addEvent(say,8000,getNpcCid(),"... Even if it worked on girls, I'd rather not be responsible for you ruining your pretty face. I have an idea though. If you help me brew one of these potions, I sell something nice to you. ...",cid,2) addEvent(say,14000,getNpcCid(),"... I still have a pretty gipsy dress and a pearl necklace somewhere, which you could wear instead of this ragged skirt. For the small fee of 20000 gold pieces, it'd be yours. ...",cid,2) addEvent(say,20000,getNpcCid(),"... You only have to bring me {100 pieces of ape fur}, so I can brew the potion. Do we have a deal?",cid,2) addEvent(changeTalk,20000,21) end elseif(talkState[talkUser] == 21 and msgcontains(msg, 'yes'))then npcHandler:say("Great! Come back to me once you have the {100 pieces of ape fur} and I'll do my part of the deal.",cid) talkState[talkUser] = 0 elseif(msgcontains(msg, "100 pieces of ape fur") or msgcontains(msg, "100 ape fur"))then if(getPlayerItemCount(cid,5883) >= 100)then npcHandler:say("Have you brought me the 100 pieces of ape fur and 20.000 gold pieces?",cid) talkState[talkUser] = 22 else npcHandler:say("Ah! you dont have all items.", cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 22 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5883) >= 100 and getPlayerMoney(cid) >= 20000)then doPlayerRemoveItem(cid,2743,30, true) doPlayerRemoveMoney(cid, 20000) if(getPlayerSex(cid) == PLAYERSEX_MALE)then doPlayerAddOutfit(cid,153,1) npcHandler:say("Ahh! Very good. I will start mixing the potion immediately.", cid) addEvent(say,10000,getNpcCid(),"... Hmm, I'm not done yet with your potion. But here, let me sprinkle a few drops of my own potion on your face... there you go. Now you just have to wait.",cid) else doPlayerAddOutfit(cid,157,2) npcHandler:say(" Ahh! Very good. I will start mixing the potion immediately and sell it to some poor foo- eh, man. Goodbye", cid) end talkState[talkUser] = 23 else npcHandler:say("Ah! you dont have all items or all money.", cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 23)then if(msgcontains(msg, 'beard') or msgcontains(msg, 'addon') and getPlayerSex(cid) == PLAYERSEX_MALE)then npcHandler:say("Aha! I can see it! Now that you've waited patiently without shaving, your beard is perfect! All thanks to my, err, potion. Yes. Goodbye!", cid) elseif(msgcontains(msg, 'Gypsy Dress') and getPlayerSex(cid) == PLAYERSEX_FEMALE)then npcHandler:say("Oh, I'm sorry... I almost forgot! Okay, okay... here is your promised dress. I'm sure it will look so much better on you than on me- I mean, my, err, sister.", cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'staff'))then if(getPlayerItemCount(cid,6107) < 1)then doPlayerSetStorageValue(cid,1052,1) --1052 npcHandler:say("I can give you the staff in case you find it and bring me my lost staff.", cid) else doPlayerRemoveItem(cid,6107,1, true) if(getPlayerSex(cid) == PLAYERSEX_MALE)then doPlayerAddOutfit(cid,153,2) else doPlayerAddOutfit(cid,157,1) end npcHandler:say("Thank you for recovering my lost staff. take yours as a reward.", cid) end else npcHandler:say('...?',cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  13. Poccnn

    Thais - Lubo

    Lubo.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Lubo" script="data/npc/scripts/Thais/Lubo.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="57" body="122" legs="126" feet="94" addons="3"/> <parameters> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="basket,1989,6;bottle,4839,3;bucket,2005,4,0;candelabrum,2041,8;closed trap,2578,280;crowbar,2416,260;cup,2013,3,0;fishing rod,2580,150;machete,2420,35;pick,2553,50;present,1990,10;backpack,1988,25;rope,2120,50;scyhe,2550,50;shovel,2554,50;torch,2050,2;worm,3976,1;" /> <parameter key="shop_sellable" value="crowbar,2416,75;closed trap,2578,50;fishing rod,2580,40;machete,2420,6;pick,2553,15;rope,2120,15;scythe,2550,10;shovel,2554,8;wooden hammer,2556,15;" /> <parameter key="message_greet" value="Welcome to my adventurer shop, |PLAYERNAME|! What do you need?"/> <parameter key="message_farewell" value="Come back soon!"/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;equipment;maps;magic;name;weapon;mountain;magician;crunor;flower guys;accident;stable;buy;sell;wares;dog;inn;pet;finger;cottage;" /> <parameter key="keyword_reply1" value="I am selling equipment for adventurers. Do you need anything?" /> <parameter key="keyword_reply2" value="I sell torches, fishing rods, ropes, water hoses, backpacks, apples, and maps." /> <parameter key="keyword_reply3" value="Oh! I'm sorry, I sold the last one just five minutes ago." /> <parameter key="keyword_reply4" value="There's a lot of magic flowing in the mountain to the north." /> <parameter key="keyword_reply5" value="I am Lubo, the owner of this shop." /> <parameter key="keyword_reply6" value="If you want to buy weapons, you'll have to go to a town or city." /> <parameter key="keyword_reply7" value="It is said that once there lived a great magician on the top of this mountain." /> <parameter key="keyword_reply8" value="I don't remember his name, but it's said that his banner was the black eye." /> <parameter key="keyword_reply9" value="Ah yes, I remember my grandfather talking about that name. This house used to be an inn a long time ago. My family bought it from some of these flower guys." /> <parameter key="keyword_reply10" value="Oh, I mean druids of course. They sold the cottage to my family after some of them died in an accident or something like that." /> <parameter key="keyword_reply11" value="As far as I can remember the story, a pet escaped its stable behind the inn. It got somehow involved with powerful magic at a ritual and was transformed in some way." /> <parameter key="keyword_reply12" value="My grandpa told me, in the old days there were some behind this cottage. Nothing big though, just small ones, for chicken or rabbits." /> <parameter key="keyword_reply13" value="I sell torches, fishing rods, worms, ropes, water hoses, backpacks, apples, and maps." /> <parameter key="keyword_reply14" value="I sell torches, fishing rods, worms, ropes, water hoses, backpacks, apples, and maps." /> <parameter key="keyword_reply15" value="I sell torches, fishing rods, worms, ropes, water hoses, backpacks, apples, and maps." /> <parameter key="keyword_reply17" value="This is Ruffy my dog, please don't do him any harm." /> <parameter key="keyword_reply18" value="Frodo runs a nice inn in the near town Thais." /> <parameter key="keyword_reply19" value="There are some strange stories about a magicians pet names. Ask Hoggle about it." /> <parameter key="keyword_reply20" value="Oh, you sure mean this old story about the mage Dago, who lost two fingers when he conjured a dragon." /> <parameter key="keyword_reply21" value="Ah yes, I remember my grandfather talking about that name. This house used to be an inn a long time ago. My family bought it from some of these flower guys." /> </parameters> </npc> Lubo.lua 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 local function say(npc,text, cid) doCreatureSay(npc,text,TALKTYPE_PRIVATE_NP,cid) 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 local msg = string.lower(msg) if(msgcontains(msg, 'time'))then npcHandler:say("It is exactly "..getTibianTime()..".", cid) elseif(msgcontains(msg, 'outfit') or msgcontains(msg, 'addon'))then npcHandler:say("Sorry, the backpack I wear is not for sale. It's handmade from rare {minotaur leather}.", cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1 and msgcontains(msg, 'minotaur leather'))then npcHandler:say("Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?",cid) talkState[talkUser] = 11 elseif(talkState[talkUser] == 11 and msgcontains(msg, 'yes'))then npcHandler:say("Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though... so good luck!",cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'backpack'))then npcHandler:say("Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", cid) talkState[talkUser] = 2 elseif(talkState[talkUser] == 2 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5878) >= 100)then npcHandler:say("Great! Alright, I need a while to finish this backpack for you. Please, wait a minute...",cid) addEvent(say,6000,getNpcCid(),"... a little more... I'm almost finishing...",cid) addEvent(say,20000,getNpcCid(),"... Your backpack is finished. Here you go, I hope you like it.",cid) doPlayerRemoveItem(cid,5878,100, true) if(getPlayerSex(cid) == PLAYERSEX_FEMALE)then doPlayerAddOutfit(cid,136,1) else doPlayerAddOutfit(cid,128,1) end else npcHandler:say("Sorry, you dont have all items.",cid) end talkState[talkUser] = 0 else npcHandler:say('...?',cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  14. Poccnn

    Thais - Hanna

    Hanna.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Hanna" script="data/npc/scripts/Thais/Hanna.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="136" head="115" body="103" legs="0" feet="115" addons="2"/> <parameters> <parameter key="message_greet" value="Welcome, welcome! Have a seat! just ask me for a trade!"/> <parameter key="message_farewell" value="Come back soon!"/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="name;Tibia;monster;" /> <parameter key="keyword_reply1" value="Well, my name is Hanna." /> <parameter key="keyword_reply2" value="This is the world we live in, oh-oh-oh, and these are the hands we're given, oh-oh... oh, I'm sorry, I got carried away!" /> <parameter key="keyword_reply3" value="Ah, the monsters are far away. Let's party now!" /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="black pearl,2144,560;bronze goblet,5807,2000;golden amulet,2130,6600;golden goblet,5805,5000;ruby necklace,2133,3560;silver goblet,5806,3000;small amethyst,2150,400;small diamond,2145,600;small emerald,2149,500;small ruby,2147,500;small sapphire,2146,500;wedding ring,2121,990;white pearl,2143,320;" /> <parameter key="shop_sellable" value="black pearl,2144,280;small amethyst,2150,200;small diamond,2145,300;small emerald,2149,250;small enchanted amethyst,7762,200;small enchanted emerald,7761,250;small enchanted ruby,7760,250;small enchanted sapphire,7759,250;small ruby,2147,250;small sapphire2146,250;wedding ring,2121,100;white pearl,2143,160;" /> </parameters> </npc> Hanna.lua 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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = msg:lower() if(msgcontains(msg, 'time'))then npcHandler:say("It is exactly "..getTibianTime()..".", cid) elseif(msgcontains(msg, 'outfit') or msgcontains(msg, 'addon'))then npcHandler:say("Pretty, isn't it? My friend Amber taught me how to make it, but I could help you with one if you like. What do you say?.", cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1 and msgcontains(msg, 'yes'))then npcHandler:say("Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers... and 50 honeycombs as glue. That's it, come back to me once you gathered it!",cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'hat'))then npcHandler:say("Oh, you're back already? Did you bring a legion helmet, 100 chicken feathers and 50 honeycombs?", cid) talkState[talkUser] = 2 elseif(talkState[talkUser] == 2 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1)then npcHandler:say("Great job! That must have taken a lot of work. Okay, you put it like this... then glue like this... here!",cid) doPlayerRemoveItem(cid,5890,100, true) doPlayerRemoveItem(cid,5902,50, true) doPlayerRemoveItem(cid,2480,1, true) if(getPlayerSex(cid) == PLAYERSEX_FEMALE)then doPlayerAddOutfit(cid,136,2) else doPlayerAddOutfit(cid,128,2) end else npcHandler:say("Sorry, you dont have all items.",cid) end talkState[talkUser] = 0 else npcHandler:say('...?',cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  15. Poccnn

    Thais - Elane

    Elane.xml <?xml version="1.0"?> <npc name="Elane" script="data/npc/scripts/Thais/Elane.lua" walkinterval="2000"> <health now="200" max="200" /> <look type="137" head="113" body="100" legs="119" feet="119" addons="3"/> <parameters> <parameter key="message_greet" value="Welcome to the paladins' guild, |PLAYERNAME|! How can I {help} you?" /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="" /> <parameter key="shop_sellable" value="sniper gloves,5875,2000" /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="name;help;job;Paladins;warriors;magicians;missile;news;members;advantages;spells;general;army;excalibug;Ferumbras;time;crossbow;Baxter;Bozo;McRonalds;Eclesius;Elane;Frodo;Galuna;Gorn;Gregor;Harkath Bloodblade;king tibianus;Lugri;Lynda;Marvik;Muriel;Oswald;Quentin;Sam;" /> <parameter key="keyword_reply1" value="My name is Elane. I am the famous leader of the {Paladins}." /> <parameter key="keyword_reply2" value="I am the leader of the {Paladins}. I help our members." /> <parameter key="keyword_reply3" value="I am the leader of the {Paladins}. I help our members." /> <parameter key="keyword_reply4" value="Paladins are great {warriors} and {magicians}. Besides that we are excellent missile fighters. Many people in Tibia want to join us." /> <parameter key="keyword_reply5" value="Of course, we aren't as strong as {knights}, but no {druid} or {sorcerer} will ever defeat a paladin with a sword." /> <parameter key="keyword_reply6" value="There are many magic spells and runes paladins can use." /> <parameter key="keyword_reply7" value="Paladins are the best missile fighters in Tibia!" /> <parameter key="keyword_reply8" value="I am a paladin, not a storyteller." /> <parameter key="keyword_reply9" value="Every paladin profits from his vocation. It has many advantages to be a paladin." /> <parameter key="keyword_reply10" value="We will help you to improve your skills. Besides I offer spells for paladins." /> <parameter key="keyword_reply11" value="Sorry, I don't teach spells." /> <parameter key="keyword_reply12" value="Harkath Bloodblade is the royal general." /> <parameter key="keyword_reply13" value="Some paladins serve in the kings army." /> <parameter key="keyword_reply14" value="A weapon of myth. I don't believe that this weapon exists." /> <parameter key="keyword_reply15" value="Someday I will slay that bastard!" /> <parameter key="keyword_reply16" value="Oops. I have forgotten my watch." /> <parameter key="keyword_reply17" value="I really wonder what was on this fool's mind when he stole my crossbow. What a huge disappointment." /> <parameter key="keyword_reply18" value="He has some potential." /> <parameter key="keyword_reply19" value="How spineless do you have to be to become a jester?" /> <parameter key="keyword_reply20" value="The McRonalds are simple farmers." /> <parameter key="keyword_reply21" value="He must have been skilled before he became the way he is now. Such a pity." /> <parameter key="keyword_reply22" value="yes?" /> <parameter key="keyword_reply23" value="The alcohol he sells shrouds the mind and the eye." /> <parameter key="keyword_reply24" value="One of the most important members of our guild. She makes all the bows and arrows we need." /> <parameter key="keyword_reply25" value="He sells a lot of useful equipment." /> <parameter key="keyword_reply26" value="He and his guildfellows lack the grace of a true warrior." /> <parameter key="keyword_reply27" value="A fine warrior and a skilled general." /> <parameter key="keyword_reply28" value="King Tibianus is a wise ruler." /> <parameter key="keyword_reply29" value="A follower of evil that will get what he deserves one day." /> <parameter key="keyword_reply30" value="Mhm, a little too nice for my taste. Still, it's amazing how she endures all those men stalking her, especially this creepy Oswald." /> <parameter key="keyword_reply31" value="A skilled healer, that's for sure." /> <parameter key="keyword_reply32" value="Just another arrogant sorcerer." /> <parameter key="keyword_reply33" value="If there wouldn't be higher powers to protect him..." /> <parameter key="keyword_reply34" value="A humble monk and a wise man." /> <parameter key="keyword_reply35" value="Strong man. But a little shy." /> </parameters> </npc> Elane.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 talkState,talkUser = {}, 0 local function say(npc,text,cid,talk) if not(npcHandler:isFocused(cid)) then return false end if talk and not(talkState[talkUser] == talk) then return false end doCreatureSay(npc,text,TALKTYPE_PRIVATE_NP,cid) end local function changeTalk(talk) talkState[talkUser] = talk end function creatureSayCallback(cid, type, msg) if not(npcHandler:isFocused(cid)) then return false end local msg = string.lower(msg) talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'outfit'))then npcHandler:say("Oh, my winged tiara? Those are traditionally awarded after having completed a difficult task for our guild, only to female aspirants though. Male warriors will receive a hooded cloak.", cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1 and msgcontains(msg, 'task'))then npcHandler:say("So you are saying that you would like to prove that you deserve to wear such a hooded cloak?",cid) talkState[talkUser] = 11 elseif(talkState[talkUser] == 11)then if(msgcontains(msg, 'yes'))then doPlayerSetStorageValue(cid,1835,1) --1835 npcHandler:say("Alright, I will give you a chance. Pay close attention to what I'm going to tell you now. ...",cid) addEvent(say,6000,getNpcCid(),"... Recently, one of our members moved to Liberty Bay out of nowhere, talking about some strange cult. That is not the problem, but he took my favourite crossbow with him. ...",cid,11) addEvent(say,14000,getNpcCid(),"... Please find my crossbow. It has my name engraved on it and is very special to me. ...",cid,11) addEvent(say,18000,getNpcCid(),"... Secondly, we need a lot of leather for new quivers. 100 pieces of lizard leather and 100 pieces of red dragon leather should suffice. ...",cid,11) addEvent(say,24000,getNpcCid(),"... Third, since we are giving out tiaras, we are always in need of enchanted chicken wings. Please bring me 5, that would help us tremendously. ...",cid,11) addEvent(say,30000,getNpcCid(),"... Lastly, for our arrow heads we need a lot of steel. Best would be one piece of royal steel, one piece of draconian steel and one piece of hell steel. ...",cid,11) addEvent(say,40000,getNpcCid(),"... Did you understand everything I told you and are willing to handle this task?",cid,11) addEvent(changeTalk,40000,12) else npcHandler:say("ok.",cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 12)then if(msgcontains(msg, 'yes'))then npcHandler:say("That's the spirit! I hope you will find my crossbow, "..getCreatureName(cid)..".",cid) else npcHandler:say("Hmm, maybe next time.",cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'crossbow'))then npcHandler:say("I'm so excited! Have you really found my crossbow?", cid) talkState[talkUser] = 2 elseif(talkState[talkUser] == 2 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5947) >= 1)then npcHandler:say("Yeah! I could kiss you right here and there! Besides, you're a handsome one. Please bring me 100 pieces of lizard {leather} and 100 pieces of red dragon {leather} now!",cid) talkState[talkUser] = 21 else npcHandler:say("That's the spirit! I hope you will find my crossbow, "..getCreatureName(cid)..".",cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 21 and msgcontains(msg, 'leather'))then npcHandler:say("Did you bring me 100 pieces of lizard leather and 100 pieces of red dragon leather?",cid) talkState[talkUser] = 22 elseif(talkState[talkUser] == 22 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5876) >= 100 and getPlayerItemCount(cid,5948) >= 100)then npcHandler:say("Good work, "..getCreatureName(cid).."! That is enough leather for a lot of sturdy quivers. Now, please bring me 5 enchanted {chicken wings}.",cid) talkState[talkUser] = 23 else npcHandler:say("Ah! you dont have all items.", cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 23 and msgcontains(msg, 'chicken wings'))then npcHandler:say("Were you able to get hold of 5 enchanted chicken wings?",cid) talkState[talkUser] = 24 elseif(talkState[talkUser] == 24 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5891) >= 5)then npcHandler:say("Great! Now we can create a few more Tiaras. If only they weren't that expensive... Well anyway, please obtain one piece of royal steel, draconian steel and hell steel each.",cid) talkState[talkUser] = 25 else npcHandler:say("Ah! you dont have all items.", cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 25 and msgcontains(msg, 'steel'))then npcHandler:say("Ah, have you brought one piece of royal steel, draconian steel and hell steel each?",cid) talkState[talkUser] = 26 elseif(talkState[talkUser] == 26 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5888) >= 1 and getPlayerItemCount(cid,5889) >= 1 and getPlayerItemCount(cid,5891) >= 5 and getPlayerItemCount(cid,5876) >= 100 and getPlayerItemCount(cid,5948) >= 100 and getPlayerItemCount(cid,5947) >= 1)then doPlayerRemoveItem(cid,5887,1, true) doPlayerRemoveItem(cid,5888,1, true) doPlayerRemoveItem(cid,5889,1, true) doPlayerRemoveItem(cid,5891,5, true) doPlayerRemoveItem(cid,5876,100, true) doPlayerRemoveItem(cid,5948,100, true) doPlayerRemoveItem(cid,5947,1, true) if(getPlayerSex(cid) == PLAYERSEX_MALE)then doPlayerAddOutfit(cid,129,1) else doPlayerAddOutfit(cid,137,1) end npcHandler:say("Wow, I'm impressed, "..getCreatureName(cid)..". Your really are a valuable member of our paladin guild. I shall grant you your reward now. Wear it proudly!",cid) else npcHandler:say("Ah! you dont have all items.", cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'sniper gloves'))then if(isPremium(Cid))then npcHandler:say("You found sniper gloves?! Incredible! Listen, if you give them to me, I will grant you the right to wear the sniper gloves accessory. How about it?", cid) else npcHandler:say("You found sniper gloves?! Incredible! I would love to grant you the sniper gloves accessory, but I can only do that for premium warriors. However, I would pay you 2000 gold pieces for them. How about it?", cid) end talkState[talkUser] = 3 elseif(talkState[talkUser] == 3 and msgcontains(msg, 'yes'))then if(getPlayerItemCount(cid,5875) >= 1)then doPlayerRemoveItem(cid,5875,1, true) if(isPremium(cid))then npcHandler:say("Great! I hereby grant you the right to wear the sniper gloves as accessory. Congratulations!",cid) if(getPlayerSex(cid) == PLAYERSEX_MALE)then doPlayerAddOutfit(cid,129,2) else doPlayerAddOutfit(cid,137,2) end else doPlayerAddMoney(cid, 2000) npcHandler:say("Congratulations!",cid) end else npcHandler:say("sorry, you dont have a sniper gloves.", cid) end talkState[talkUser] = 0 else npcHandler:say('...?',cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  16. Seymour.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Seymour" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="116" body="69" legs="87" feet="20" addons="0"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. Welcome to the Academy of Rookgaard. May I sign you up as a {student}?" /> <parameter key="message_farewell" value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!" /> <parameter key="message_walkaway" value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!" /> <parameter key="message_idletimeout" value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!" /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="Billy;Norma;Willie;job;name;Sir;information;lesson;this;Rookgaard;village;island;Thais;Tibia;temple;shop;farm;dungeon;Main;fight;skill;level;equip;premium;potion;antidote;food;weapon;armor;shield;rope;shovel;torch;legs;helmet;shoe;trade;citizen;merchant;king;monster;rat;sewer;troll;money;loot;corpse;Obi;Dixi;Amber;Norma;Willie;Billy;Lily;Lee'Delle;Hyacinth;Tom;academy;train;library;bank;deposit;The Oracle;oracle;vocation;knight;paladin;druid;sorcerer;" /> <parameter key="keyword_reply1" value="Billy is {Willie}\'s cousin, but he has his farm on the {premium} side of the village." /> <parameter key="keyword_reply2" value="Norma has recently opened a bar here meaning she sells drinks and snacks. Nothing of importance to you, young student." /> <parameter key="keyword_reply3" value="Willie is a fine farmer, although he is short-tempered. He sells and buys {food}." /> <parameter key="keyword_reply4" value="I'm the master of this fine {academy}, giving {lessons} to my students." /> <parameter key="keyword_reply5" value="My name is Seymour, but for you I am 'Sir' Seymour." /> <parameter key="keyword_reply6" value="At least you know how to address a man of my importance." /> <parameter key="keyword_reply7" value="Well, I could give you valuable {lessons} or some general {hints} about the game, or a small {quest} if you're interested." /> <parameter key="keyword_reply8" value="Oh, which lesson did you want to attend again? Was it {Rookgaard}, {fighting}, {equipment}, {citizens}, the {academy} or the {oracle}?" /> <parameter key="keyword_reply9" value="Yes, you got it. Ask me for a {lesson} anytime.?" /> <parameter key="keyword_reply10" value="Rookgaard is the name of this {village} as well as of the whole {island}. It belongs to the kingdom of {Thais}, in our world which is called {Tibia}." /> <parameter key="keyword_reply11" value="The most important places in this village are the {temple}, the different {shops}, the {academy} and the {bridges}." /> <parameter key="keyword_reply12" value="The island is separated into a {premium} side and a non-premium side. On both sides you will find {dungeons}, but the premium side tends to be a little less crowded with other players." /> <parameter key="keyword_reply13" value="The city of Thais is reigned by King Tibianus. Of course, there are many other cities but you will learn about them later." /> <parameter key="keyword_reply14" value="The world of Tibia is very large with tons of places to explore. Vast deserts, Caribbean islands, deep jungles, green meadows and jagged mountains await you!" /> <parameter key="keyword_reply15" value="The temple is the place to go when you are very low on {health} or poisoned. Ask {Cipfried} for a heal - he usually notices emergencies by himself." /> <parameter key="keyword_reply16" value="We have a {weapon} and an {armor} shop south of the academy. {Equipment} such as {ropes} are sold to the north-west. {Potions} can be bought to the south. And then there are the {farms}." /> <parameter key="keyword_reply17" value="The farms are west of here. You can buy and sell {food} there which you need to regain {health}." /> <parameter key="keyword_reply18" value="You should not descend into dungeons without proper {equipment}. Once you are all prepared, ask the bridge {guards} for suitable {monsters}." /> <parameter key="keyword_reply19" value="You can leave for mainland once you are level 8. To do so talk to the {oracle}." /> <parameter key="keyword_reply20" value="You have to fight {monsters} to train your {skills} and {level}. If you lose {health}, eat {food} to regain it or use a {potion}." /> <parameter key="keyword_reply21" value="The more you fight with a weapon, the better will be your skill handling this weapon. Don't worry about that right now though, this will become important once you have a {vocation}." /> <parameter key="keyword_reply22" value="Once you gained enough experience for a level, you will advance. This means - among other things - more {health} points, a faster walking speed and more strength to carry things." /> <parameter key="keyword_reply23" value="Don't go hunting without proper equipment. You need at least a suitable {weapon}, {armor}, {shield}, {rope} and {shovel}. A {torch} is also good as well as {legs}, a {helmet} and {shoes}." /> <parameter key="keyword_reply24" value="Paying for your Tibia account will turn it into a premium account. This means access to more areas and functions of the game as well as other neat features." /> <parameter key="keyword_reply25" value="Use a small health potion in case of emergencies to fill up around 75 health points. You can buy them at {Lily}'s shop. She also has {antidote} potions." /> <parameter key="keyword_reply26" value="Some monsters poison you. To heal poison, use an antidote potion on yourself. Buy them at {Lily}'s store." /> <parameter key="keyword_reply27" value="Many monsters, such as rabbits or deer, are excellent food providers. You can also buy food from {Willie} or {Billy}, the farmers." /> <parameter key="keyword_reply28" value="The starter weapon, a club, won't get you far. You should earn some {money} and buy a better weapon such as a sabre from {Obi}'s or {Lee'Delle}'s shop. Simply ask for a {trade}." /> <parameter key="keyword_reply29" value="The starter armor, a coat, does not protect you well. First of all, earn some money and try to get a sturdy leather armor from {Dixi}'s or {Lee'Delle}'s shop. Simply ask for a {trade}." /> <parameter key="keyword_reply30" value="I fear you have to buy your first shield by yourself. A wooden shield from {Dixi} or {Lee'Delle} is a good choice." /> <parameter key="keyword_reply31" value="You definitely need a rope to progress in dungeons, else you might end up stuck. Buy one from {Al Dee} or {Lee'Delle}." /> <parameter key="keyword_reply32" value="A shovel is needed to dig some {dungeon} entrances open. 'Use' it on a loose stone pile to make a hole large enough to enter." /> <parameter key="keyword_reply33" value="A torch will provide you with light in dark {dungeons}. 'Use' it to light it. You can buy them from {Al Dee} or {Lee'Delle}." /> <parameter key="keyword_reply34" value="Leather legs might be a good basic protection. You can buy them from {Dixi} or {Lee'Delle}. Or, once you are strong enough, hunt {trolls}. They sometimes carry them in their {loot}." /> <parameter key="keyword_reply35" value="A sturdy leather helmet is a good choice for a beginner. You can either buy it from {Dixi} and {Lee'Delle}, or, once you are strong enough, {loot} them from {trolls}." /> <parameter key="keyword_reply36" value="Leather boots are basic shoes which will protect you well. You can either buy them from {Dixi} and {Lee'Delle}, or, once you are strong enough, {loot} them from {trolls}." /> <parameter key="keyword_reply37" value="I personally don't have anything to trade, but you can ask {merchants} for a trade. That will open a window where you can see their offers and the things they buy from you." /> <parameter key="keyword_reply38" value="Most of the citizens here are {merchants}. You can give me the name of any non-player character and I will tell you something about him or her." /> <parameter key="keyword_reply39" value="Merchants buy and sell goods. Just ask them for a {trade} to see what they offer or buy from you." /> <parameter key="keyword_reply40" value="Hail to King Tibianus! Long live our king! Not that he cares for an old veteran who is stuck on this godforsaken island..." /> <parameter key="keyword_reply41" value="Good monsters to start hunting are {rats}. They live in the {sewers} below the village." /> <parameter key="keyword_reply42" value="To attack a rat, simply click on it in your battle list. Make sure that you have proper {equipment}, though! Also, I give you 2 gold coins for each {dead rat}." /> <parameter key="keyword_reply43" value="One entrance to the sewers is south of this {academy}. Look for a sewer grate, then use it to climb down." /> <parameter key="keyword_reply44" value="Trolls are quite nasty monsters which you shouldn't face before level 3 or 4 depending on your {equipment}. Ask the bridge {guards} for their locations!" /> <parameter key="keyword_reply45" value="Make money by killing {monsters} and picking up their {loot}. You can sell many of the things they carry." /> <parameter key="keyword_reply46" value="Once a monster is dead, you can select 'Open' on the {corpse} to check what's inside. Sometimes they carry {money} or other items which you can sell to {merchants}." /> <parameter key="keyword_reply47" value="You can even sell some corpses! For example, you can sell fresh dead rats to {Tom} the tanner or me. He also buys other dead creatures, just ask him for a {trade}." /> <parameter key="keyword_reply48" value="Obi sells and buys {weapons}. You can find his shop south of the academy." /> <parameter key="keyword_reply49" value="Dixi sells and buys {armors}, {shields}, {helmets} and {legs}. You can find her shop south of the academy, just go up the stairs in {Obi}'s shop." /> <parameter key="keyword_reply50" value="A traveller from the {main} continent. I wonder what brought her here. No one comes here of his own free will." /> <parameter key="keyword_reply51" value="Norma has recently opened a bar here meaning she sells drinks and snacks. Nothing of importance to you, young student." /> <parameter key="keyword_reply52" value="Willie is a fine farmer, although he is short-tempered. He sells and buys {food}." /> <parameter key="keyword_reply53" value="Billy is {Willie}'s cousin, but he has his farm on the {premium} side of the village." /> <parameter key="keyword_reply54" value="In the southern part of town, Lily sells {potions} which might come in handy once you are deep in a dungeon and need {health}." /> <parameter key="keyword_reply55" value="Lee'Delle's shop is in the western part of town, on the {premium} side. She sells everything cheaper." /> <parameter key="keyword_reply56" value="A mysterious druid who lives somewhere in the wilderness. He sells small health {potions} just like {Lily}." /> <parameter key="keyword_reply57" value="Tom the tanner buys fresh {corpses}, minotaur leather and paws. Always good to make some {money} if you can carry the corpses there fast enough." /> <parameter key="keyword_reply58" value="The academy is the building you are standing in. We have a {library}, a {training} centre, a {bank} and the room of the {oracle}." /> <parameter key="keyword_reply59" value="When you have the time, please visit our training centre downstairs. 'Look' at the blackboards to read some important advice. Oh, you need a {key} for that!" /> <parameter key="keyword_reply60" value="There are many books in the bookcases around you, unless some naughty kids stole them again. Read them for more and detailed information." /> <parameter key="keyword_reply61" value="In a bank you can deposit your earned gold coins safely. Just go downstairs to {Paulie} and ask him to {deposit} your money." /> <parameter key="keyword_reply62" value="Yes, depositing your money will keep it safe, so it is a good idea to store it in the bank. Of course, you can always withdraw it again." /> <parameter key="keyword_reply63" value="The oracle is a mysterious being just upstairs. It will bring you to the {Island of Destiny} to choose your {vocation} once you are level 8." /> <parameter key="keyword_reply64" value="The oracle is a mysterious being just upstairs. It will bring you to the {Island of Destiny} to choose your {vocation} once you are level 8." /> <parameter key="keyword_reply65" value="There are four vocations: {knights}, {paladins}, {sorcerers} and {druids}. You can choose your vocation once you are level 8 and have talked to the {oracle}." /> <parameter key="keyword_reply66" value="Knights are strong melee fighters. You will learn all about them once you are level 8 and reached the Island of {Destiny}." /> <parameter key="keyword_reply67" value="Paladins are swift distance fighters. You will learn all about them once you are level 8 and reached the Island of {Destiny}." /> <parameter key="keyword_reply68" value="Druids are nature magic users and great healers. You will learn all about them once you are level 8 and reached the Island of {Destiny}." /> <parameter key="keyword_reply69" value="Sorcerers are talented elemental magicians. You will learn all about them once you are level 8 and reached the Island of {Destiny}." /> </parameters> </npc> Seymour.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local Topic = {} local count = {} local destiny = {"Hmmm, let me look at you. You got that intelligent sparkle in your eyes and you'd love to handle great power - that must be a future sorcerer!","Hmmm, let me look at you. You have an aura of great wisdom and may have healing hands as well as a sense for the powers of nature - I think you're a natural born druid!","Hmmm, let me look at you. Such a lean and swift fighter you are - I can imagine you really well with a bow - I think you'd make a tremendous paladin!","Hmmm, let me look at you. Strong and sturdy, with a determined look in your eyes - no doubt the knight profession would be suited for you!"} 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 greetCallback(cid) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid Topic[talkUser] = 1 count[talkUser] = 0 return true end function thinkCallback(cid) local rand = math.random(250) if rand == 1 then selfSay("Get some training in the academy!") elseif rand == 2 then selfSay("Feeling lost? Ask me for help!") elseif rand == 3 then selfSay("Newcomers - visit me! I'll answer your questions!") end return true 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, "how") and msgcontains(msg, "are") and msgcontains(msg, "you") then npcHandler:say("Well, the {king} doesn't send troops anymore, the {academy} is dreadfully low on money, and the end of the world is pretty nigh. Apart from that I'm reasonably fine, I suppose.", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "fuck") then npcHandler:say("For this remark I will wash your mouth with soap, young " .. (getPlayerSex(cid) == 0 and "lady!" or "man!"), cid) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_YELLOW_RINGS) Topic[talkUser] = 0 elseif (msgcontains(msg, "yes") or msgcontains(msg, "student")) and Topic[talkUser] == 1 then npcHandler:say("Brilliant! We need fine adventurers like you! If you are ready to learn, just ask me for a {lesson}. You can always ask for the differently coloured words - such as {this} one - to continue the lesson.", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "al") and msgcontains(msg, "dee") then npcHandler:say("Al Dee has a general {equipment} store in the north-western part of the village. He sells useful stuff such as {ropes}.", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "island") and msgcontains(msg, "destiny") then npcHandler:say("This is an island with {vocation} teachers. You can learn all about the different vocations there once you are level 8.", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "hint") then if getPlayerStorageValue(cid, 6079) == -1 then setPlayerStorageValue(cid, 6079, 1) end local str = getPlayerStorageValue(cid, 6079) npcHandler:say(hints[str], cid) setPlayerStorageValue(cid, 6079, str == 28 and 0 or str + 1) Topic[talkUser] = 0 elseif msgcontains(msg, "mission") or msgcontains(msg, "quest") then npcHandler:say(getPlayerLevel(cid) < 4 and "You are pretty inexperienced. I think killing rats is a suitable challenge for you. For each fresh {dead rat} I will give you two shiny coins of gold." or "Well I would like to send our king a little present, but I do not have a suitable box. If you find a nice box, please bring it to me.", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "destiny") then if getPlayerStorageValue(cid, 6080) <= 0 then npcHandler:say("Shall I try and take a guess at your destiny?", cid) Topic[talkUser] = 5 else local destiny = {[1] = "Well, like I told you before, I really think you got that spirit of a sorcerer in you. But of course it's completely up to you!", [2] = "Well, like I told you before, I really think you got that spirit of a druid in you. But of course it's completely up to you!", [3] = "Well, like I told you before, I really think you got that spirit of a paladin in you. But of course it's completely up to you!", [4] = "Well, like I told you before, I really think you got that spirit of a knight in you. But of course it's completely up to you!"} npcHandler:say("" .. destiny[getPlayerStorageValue(cid,6080)] .. "", cid) end elseif msgcontains(msg, "dead") and msgcontains(msg, "rat") then if getCount(msg) ~= -1 and 1 < getCount(msg) then count[cid] = getCount(msg) npcHandler:say("Have you brought " .. count[cid] .. " dead rats to me to pick up your reward?", cid) else count[cid] = 1 npcHandler:say("Have you brought a dead rat to me to pick up your reward?", cid) end Topic[talkUser] = 2 elseif msgcontains(msg, "yes") and Topic[talkUser] == 5 then local rand = math.random(4) npcHandler:say(destiny[rand], cid) setPlayerStorageValue(cid, 6080, rand) Topic[talkUser] = 0 elseif Topic[talkUser] == 2 and msgcontains(msg, "yes") then if getPlayerItemCount(cid, 2813) >= count[cid] then npcHandler:say("Thank you! Here is your reward.", cid) doPlayerRemoveItem(cid, 2813, count[cid]) doPlayerAddMoney(cid, count[cid] * 2) else npcHandler:say(count[cid] > 1 and "HEY! You do not have so many!" or "HEY! You don't have one! Stop playing tricks on fooling me or I will give you some extra work!", cid) end Topic[talkUser] = 0 elseif Topic[talkUser] == 2 then npcHandler:say("Go and find some rats to kill!", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "time") then npcHandler:say("It's "..getTibianTime()..", so you are late. Hurry!", cid) Topic[talkUser] = 0 elseif Topic[talkUser] == 1 then npcHandler:say("Only nonsense on your mind, eh?", cid) Topic[talkUser] = 0 elseif msgcontains(msg, "key") then npcHandler:say("Do you want to buy the Key to Adventure for 5 gold coins?", cid) Topic[talkUser] = 4 elseif Topic[talkUser] == 4 then if msgcontains(msg, "yes") then if getPlayerMoney(cid) >= 5 then npcHandler:say("Here you are.", cid) doPlayerRemoveMoney(cid, 5) local key = doCreateItemEx(2088, 1) doSetItemActionId(key, 4600) doPlayerAddItemEx(cid, key, 1) else npcHandler:say("You don't have enough money.", cid) end elseif msgcontains(msg, "no") then npcHandler:say("As you wish.", cid) else npcHandler:say("Only nonsense on your mind, eh?", cid) end Topic[talkUser] = 0 elseif msgcontains(msg, "present box") then npcHandler:say("Do you have a suitable present box for me?", cid) Topic[talkUser] = 3 elseif Topic[talkUser] == 3 then if msgcontains(msg, "yes") then if getPlayerItemCount(cid, 1990) >= 1 then npcHandler:say("THANK YOU! Here is a helmet that will serve you well.", cid) doPlayerRemoveItem(cid, 1990, 1) doPlayerAddItem(cid, 2480, 1) else npcHandler:say("HEY! You don't have one! Stop playing tricks on me or I'll give you some extra work!", cid) end else npcHandler:say("HEY! You don't have one! Stop playing tricks on me or I will give some extra work!", cid) end Topic[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  17. Lily.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Lily" script="data/npc/scripts/Rookgaard/Lily.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="138" head="78" body="119" legs="105" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="Welcome |PLAYERNAME|! You look a little stressed today. If you like to view my offers of potions, just ask me for a trade. In case you're looking for the marketplace and dungeons, just follow the path to the east!/> <parameter key="message_farewell" value="Take care, |PLAYERNAME|."/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="monsters;job;name;Lily;mainland;druid;tibia;Hyacinth;Crunor;" /> <parameter key="keyword_reply1" value="Sadly, our little village of Rookgaard is invaded by monsters. From the dungeons they creep to the surface and attack the city. We always need adventurers helping us to fight them." /> <parameter key="keyword_reply2" value="I'm a druid, bound to the spirit of nature. My potions will help you if you feel bad. I also buy blueberries and cookies. Just ask me for a trade." /> <parameter key="keyword_reply3" value="My name is Lily, like the flower. It also stands for purity, just like my potions are!" /> <parameter key="keyword_reply4" value="Yes?" /> <parameter key="keyword_reply5" value="The main continent is huge! The gods of Tibia created everything from great seas, deep jungles and large deserts." /> <parameter key="keyword_reply6" value="Being a druid is a wonderful profession. You control the forces of nature and can heal others." /> <parameter key="keyword_reply7" value="Tibia is our beautiful world, created by the gods. Being a druid, I'm a worshipper of Crunor." /> <parameter key="keyword_reply8" value="Hyacinth also sells small health potions. He lives outside the village, in a hidden place." /> <parameter key="keyword_reply9" value="Crunor is the great lord of trees and the creator of all plants. Despite what some people believe, he didn't create the monsters, though." /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="antidote potion,8474,50;small health potion,8704,20;"/> <parameter key="shop_sellable" value="cookie,2687,1;empty potion flask,7636,5;vial,2006,5;"/> </parameters> </npc> Lily.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local tipo,count,item,price,more 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 shopModule = ShopModule:new() npcHandler:addModule(shopModule) function tibiaTime(min, sec) suffix = '' varh = (min*60+sec)/150 tibH = math.floor(varh) tibM = math.floor(60*(varh-tibH)) if tonumber(tibH) > 11 then tibH = tonumber(tibH) - 12 suffix = ' pm' else suffix = ' am' end if tibH == 0 then tibH = 12 end if (tibH < 10) then tibH = '0'..tibH end if (tibM < 10) then tibM = '0'..tibM end return (tibH..':'..tibM..suffix) end function creatureSayCallback(cid, type, msg) tipo,count,item = msg:trade() if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'time') then npcHandler:say("It is about "..tibiaTime(os.date('%M'), os.date('%S'))..". But does it really matter? Don't rush yourself and enjoy all these little moments.", cid) elseif msgcontains(msg, 'blueberry')then npcHandler:say("how many blueberry do you have?", cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1)then if(count >= 5)then npcHandler:say('I pay '..math.proxInteger(count/5)..' gps on '..count..' blueberry. accepted?', cid) talkState[talkUser] = 2 elseif(count > 100)then npcHandler:say('Tell me counter equal or less than 100.', cid) else npcHandler:say('I pay 1 gp for every 5 blueberry.', cid) end elseif(talkState[talkUser] == 2)then if msgcontains(msg, 'yes') then if(doPlayerRemoveItem(cid,2677,count) == true)then npcHandler:say('thank you very much!',cid) doPlayerAddMoney(cid,math.proxInteger(count/5)) else npcHandler:say('Hummm...',cid) end else npcHandler:say('Sorry for my bad offer.',cid) end talkState[talkUser] = 0 elseif not(foodSayString(msg))then npcHandler:say('sorry but I do not know what they wanted.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  18. Amber.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Amber" script="data/npc/scripts/Rookgaard/Amber.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="136" head="58" body="113" legs="113" feet="95" addons="1"/> <parameters> <parameter key="message_greet" value="Oh hello, nice to see you |PLAYERNAME| Are you here to hear some stories of my {adventures} or do you need {help}"/> <parameter key="message_farewell" value="See you later, |PLAYERNAME|."/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="How are you;job;adventure;sea;explore;tibia;time;dungeon;sewer;king;rookgaard;academy;help;information;destiny;thais;main;castle;magic;weapon;monsters;orcs;cyclops;minotaur;dragon;premium;bank;food;tools;rope;shovel;torch;raft;mission;quest;Al Dee;Amber;Billy;Cipfried;Dallheim;Dixi;Hyacinth;Lily;Loui;Norma;Obi;Paulie;Santiago;Seymour;The Oracle;Tom;Willie;Zerbrus;Zirella" /> <parameter key="keyword_reply1" value="I'm recovering from a sea passage." /> <parameter key="keyword_reply2" value="I'm an explorer who seeks adventures." /> <parameter key="keyword_reply3" value=" I fought fierce monsters, climbed the highest mountains, explored the deepest dungeons and crossed the sea on a raft." /> <parameter key="keyword_reply4" value="My voyage on the sea was exhausting. The weather was bad, the waves high and my raft quite simple. There's a certain excitement to it, though." /> <parameter key="keyword_reply5" value="I've been almost everywhere in Tibia." /> <parameter key="keyword_reply6" value="I'm trying to explore each spot of Tibia, and one day I'll have seen it all." /> <parameter key="keyword_reply7" value="Sorry, I lost my watch in a storm." /> <parameter key="keyword_reply8" value="I had no time to explore the dungeons of this isle yet, but I've seen two big caves in the East, and there is a ruined tower to the north-west. Oh, and there're the sewers" /> <parameter key="keyword_reply9" value="I like sewers. I made my very first battle experience in the sewers below Thais. The small sewer system of Rookgaard has some nasty rats to fight." /> <parameter key="keyword_reply10" value="King Tibianus is the ruler of Thais. The island of Rookgaard belongs to his kingdom." /> <parameter key="keyword_reply11" value="It's a nice little island on which you can learn how to fight. I can see it in your eyes - you want to become a famous adventurer and explorer just like me!" /> <parameter key="keyword_reply12" value="A fine institution, but it needs definitely more funds from the king." /> <parameter key="keyword_reply13" value="Well, I can give you general hints or tell you about my adventures and many other topics. Oh, and if you are bored, I might have a small quest for you." /> <parameter key="keyword_reply14" value="Well, I can give you general hints or tell you about my adventures and many other topics. Oh, and if you are bored, I might have a small quest for you." /> <parameter key="keyword_reply15" value="You will find your destiny. I'm sure it's something big and important." /> <parameter key="keyword_reply16" value="A fine city, but the king has some problems enforcing the law." /> <parameter key="keyword_reply17" value="You'll be surprised once you leave this island. The world outside there is gigantic." /> <parameter key="keyword_reply18" value="If you travel to Thais, you really should visit the marvellous castle there." /> <parameter key="keyword_reply19" value="Spells are only taught in the guildhalls of the mainland." /> <parameter key="keyword_reply20" value="The best weapons on this isle are just toothpicks, compared with the weapons warriors of the mainland wield." /> <parameter key="keyword_reply21" value="Oh, I fought orcs, cyclopses, minotaurs, even dragons, and many other creatures." /> <parameter key="keyword_reply22" value="Not the nicest guys you can encounter. I had some clashes with them and finally ended up being their prisoner for a few months." /> <parameter key="keyword_reply23" value="I don't like the way they look at you. Their eye seems to pierce right through you. Creepy!" /> <parameter key="keyword_reply24" value="They are nasty monsters, particularly as they have distance fighters and mages in their clans. My backpack is handmade from minotaur leather." /> <parameter key="keyword_reply25" value="Their breath is so hot! I had to cut my hair after my last encounter with a dragon because the ends were all burnt. That's what you gotta deal with as a female adventurer!" /> <parameter key="keyword_reply26" value="I wouldn't want to miss being a premium adventurer. Everything is so much easier!" /> <parameter key="keyword_reply27" value="I have almost no money with me anyway, so no need to deposit any at the bank." /> <parameter key="keyword_reply28" value="My favourite dish is salmon. Oh please, bring me some." /> <parameter key="keyword_reply29" value="The most important tools you need are a rope, a shovel and maybe a torch." /> <parameter key="keyword_reply30" value="One day I fell into a hole without having a rope. I was yelling for help for three whole days! Eventually a fisherman passed by and pulled me out with his own rope, lucky me." /> <parameter key="keyword_reply31" value="Sometimes I have the strong urge to use it to knock someone out." /> <parameter key="keyword_reply32" value="You know, on mainland you will be able to cast magic spells which provide you with light. You won't really need torches anymore." /> <parameter key="keyword_reply33" value="I left my raft at the south-eastern shore. I forgot my private notebook on it. If you could return it to me, I would be very grateful." /> <parameter key="keyword_reply34" value="I left my raft at the south-eastern shore. I forgot my private notebook on it. If you could return it to me, I would be very grateful." /> <parameter key="keyword_reply35" value="I left my raft at the south-eastern shore. I forgot my private notebook on it. If you could return it to me, I would be very grateful." /> <parameter key="keyword_reply36" value="I don't have much to say about him. I think he sells tools." /> <parameter key="keyword_reply37" value="Did you know my name is also the name of a gem?" /> <parameter key="keyword_reply38" value="He brought me some of his famous rat stew. I really didn't want to insult him, but I simply can't eat something like that. So I told him I'm a vegetarian and I only eat fish." /> <parameter key="keyword_reply39" value="A gentle person. You should visit him if you have questions or need healing." /> <parameter key="keyword_reply40" value="An extraordinary warrior. He's the first and last line of defence of Rookgaard." /> <parameter key="keyword_reply41" value="I don't really know her, but she seems to be a nice girl." /> <parameter key="keyword_reply42" value="Hyacinth is a great healer. He lives somewhere hidden on this isle." /> <parameter key="keyword_reply43" value="Hm, I think I haven't met her yet." /> <parameter key="keyword_reply44" value="Never seen him around." /> <parameter key="keyword_reply45" value="She has changed a lot since I last saw her." /> <parameter key="keyword_reply46" value="He's a funny little man." /> <parameter key="keyword_reply47" value="No, I didn't go to the bank yet." /> <parameter key="keyword_reply48" value="He promised to repair my raft." /> <parameter key="keyword_reply49" value="I think this poor guy was a bad choice as head of the academy." /> <parameter key="keyword_reply50" value="The oracle is said to show you your destiny once you are level 8." /> <parameter key="keyword_reply51" value="To me he seems a bit rude, but maybe that's just my impression." /> <parameter key="keyword_reply52" value="He's funny in his own way." /> <parameter key="keyword_reply53" value="An extraordinary warrior. He's the first and last line of defence of Rookgaard." /> <parameter key="keyword_reply54" value="She seriously asked me if she could have the remains of my raft as fire wood! Can you imagine that??" /> </parameters> </npc> Amber.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local orcish = { ["Charach"] = "Hi", ["Futchi"] = "Bye", ["Mok"] = "Yes", ["Burp"] = "No", ["Ikem goshak"] = "Offer", ["Goshak"] = "Buy", ["Porak"] = "Weapon", ["Bata"] = "Armor or Helmet", ["Dora"] = "Shield", ["Burka Bata"] = "Sword", ["Charcha"] = "Sabre", ["Hakhak"] = "Hatchet", ["Burka"] = "Short Sword", ["Batuk"] = "Bow", ["Pixo"] = "Arrows", ["Tulak Bora"] = "Studded Armor", ["Aka Bora"] = "Leather Armor", ["Donga"] = "Brass Shield", ["Grofa"] = "Studded Helmet", ["Humak"] = "Human", ["Minotaur"] = "Minotaur", ["Ork"] = "Orcs", ["Arash"] = "Have", ["Ba"] = "Which", ["Bana"] = "Slave", ["Bata"] = "Long/Longer", ["Batash"] = "Here", ["Booz"] = "More", ["Buta"] = "Damn(ed)/Stupid", ["Ferut"] = "Come", ["Gort"] = "People", ["Ikem"] = "I/me", ["Karak"] = "Dominate", ["Karakim"] = "Dominate", ["Karek"] = "Dominate", ["Kiskesh"] = "All", ["Klamuk"] = "Paleskin", ["Maruk"] = "You/Your", ["Mora"] = "Before", ["Omark"] = "Must", ["Ouk"] = "We", ["Pashak"] = "Sell", ["Ta"] = "That/It", ["Taka"] = "What", ["Tefar"] = "Want", ["Ul"] = "For/To", ["Utash"] = "Gosh", ["Nixda"] = "Money", } 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 shopModule = ShopModule:new() npcHandler:addModule(shopModule) 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, 'orcish') or msgcontains(msg, 'prisoner') then npcHandler:say("I speak some Orcish words, not many though, just a few basics like 'yes' and 'no'.", cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'salmon') then npcHandler:say("Yeah! If you give me some salmon, I'll tell you another Orcish word. Okay?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, 'notebook') then npcHandler:say("Do you bring me my notebook?", cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'addon') then if(getPlayerStorageValue(cid, 91361) > 1 and getPlayerStorageValue(cid, 91361) < os.time())then npcHandler:say("Just in time! Your backpack is finished. Here you go, I hope you like it..", cid) doPlayerAddOutfit(cid,136,1) doPlayerAddOutfit(cid,128,1) doPlayerSetStorageValue(cid, 91361, 1) elseif(getPlayerStorageValue(cid, 91361) > os.time())then npcHandler:say("it is not ready yet.", cid) elseif(getPlayerStorageValue(cid, 91361) == 1)then npcHandler:say("You already have a accessory like mine.", cid) else npcHandler:say("Ah, you noticed my new accessory? Sorry, this one is not for sale. It's handmade from rare {minotaur leather}.", cid) end elseif msgcontains(msg, 'minotaur leather') then npcHandler:say("Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?", cid) talkState[talkUser] = 4 elseif msgcontains(msg, 'backpack') then npcHandler:say("Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", cid) talkState[talkUser] = 5 elseif(talkState[talkUser] == 1)then if(msgcontains(msg,'yes'))then npcHandler:say("It's 'mok' in Orcish. I tell you more if you bring me some food.", cid) else npcHandler:say("In Orcish that's 'burp'. I tell you more if you bring me some food.",cid) end talkState[talkUser] = 0 elseif(talkState[talkUser] == 2)then if(msgcontains(msg,'yes'))then if(doPlayerRemoveItem(cid,2668,1))then for k,v in pairs(orcish[math.random(1,orcish.len())]) do npcHandler:say(k.." means "..v, cid) break end else npcHandler:say("You don't have any salmon!", cid) end else npcHandler:say("Ok, then I won't tell you another Orcish word.",cid) end talkState[talkUser] = 0 elseif(talkState[talkUser] == 3)then if(msgcontains(msg,'yes'))then if(doPlayerRemoveItem(cid,1972,1))then npcHandler:say("thank you.", cid) else npcHandler:say("Mhm, whatever you have there, it is not my notebook.", cid) end else npcHandler:say("Too bad.",cid) end talkState[talkUser] = 0 elseif(talkState[talkUser] == 4)then if(msgcontains(msg,'yes'))then npcHandler:say("Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though... so good luck!", cid) else npcHandler:say("Ok.",cid) end talkState[talkUser] = 0 elseif(talkState[talkUser] == 5)then if(msgcontains(msg,'yes'))then if(doPlayerRemoveItem(cid,5878,100))then npcHandler:say("Great! Alright, I need a while to finish this backpack for you. Come ask me later, okay?.", cid) setPlayerStorageValue(cid, 91361,os.time()+(60*60*2)) else npcHandler:say("I need 100 minotaur leather.", cid) end else npcHandler:say("Too bad.",cid) end talkState[talkUser] = 0 elseif not(foodSayString(msg))then npcHandler:say('sorry but I do not know what they wanted.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  19. Al Dee.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Al Dee" script="data/npc/scripts/Rookgaard/Al Dee.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="58" body="77" legs="88" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="Hello, hello, |PLAYERNAME|! Please come in, look, and buy! I'm a specialist for all sorts of tools. Just ask me for a trade to see my offers! You can also ask me for general hints about the game. You can also ask me about each citizen of the isle."/> <parameter key="message_farewell" value="Bye, bye |PLAYERNAME|."/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="How are you;tools;offer;trade;gold;backpack;rope;shovel;weapon;armor;shield;food;potion;cookis;fishing;cooking;fish;torch;worms;bone;help;job;name;time;premium;king;sell;wares;stuff;dungeon;sewers;vital;rats;monsters;merchants;tibia;rookgaard;mainland;profession;island of destiny;thais;academy;bank;temple;citizen;Al Dee;Amber;Billy;Cipfried;Dallheim;Dixi;Hyacinth;Lily;Loui;Norma;Obi;Paulie;Santiago;Seymour;The Oracle;Tom;Willie;Zerbrus;Zirella;" /> <parameter key="keyword_reply1" value="I'm fine. I'm so glad to have you here as my customer." /> <parameter key="keyword_reply2" value="As an adventurer, you should always have at least a backpack, a rope, a shovel, a weapon, an armor and a shield." /> <parameter key="keyword_reply3" value="Just ask me for a trade to see my offers." /> <parameter key="keyword_reply4" value="Take a look in the trade window to your right." /> <parameter key="keyword_reply5" value="Well, no gold, no deal. Earn gold by fighting monsters and picking up the things they carry. Sell it to merchants to make profit!" /> <parameter key="keyword_reply6" value="I am a merchant. What can I do for you?" /> <parameter key="keyword_reply7" value="I am a merchant. What can I do for you?" /> <parameter key="keyword_reply8" value="I am a merchant. What can I do for you?" /> <parameter key="keyword_reply9" value="Oh, I'm sorry, but I don't deal with weapons. That's Obi's or Lee'Delle's business. I could offer you a pick in exchange for a small axe if you should happen to own one." /> <parameter key="keyword_reply10" value="Armor and shields can be bought at Dixi's or at Lee'Delle's. Dixi runs that shop near Obi's." /> <parameter key="keyword_reply11" value="Armor and shields can be bought at Dixi's or at Lee'Delle's. Dixi runs that shop near Obi's." /> <parameter key="keyword_reply12" value="Hmm, the best address to look for food might be Willie or Billy. Norma also has some snacks for sale." /> <parameter key="keyword_reply13" value="Sorry, I don't sell potions. You should visit Lily for that." /> <parameter key="keyword_reply14" value="I sell fishing rods and worms if you want to fish. Simply ask me for a trade." /> <parameter key="keyword_reply15" value="I sell fishing rods and worms if you want to fish. Simply ask me for a trade." /> <parameter key="keyword_reply16" value="I you want to find someone who may want to buy your cookies, you should meet Lily." /> <parameter key="keyword_reply17" value="No thanks. I don't like fish." /> <parameter key="keyword_reply18" value="No thank you. I can already overstock the market with torches." /> <parameter key="keyword_reply19" value="I have enough worms myself and don't want any more. Use them for fishing." /> <parameter key="keyword_reply20" value="You better put that bone back there where you dug it out." /> <parameter key="keyword_reply21" value="If you need general equipment, just ask me for a trade. I can also provide you with some general hints about the game." /> <parameter key="keyword_reply22" value=" I'm a merchant. Just ask me for a trade to see my offers." /> <parameter key="keyword_reply23" value="My name is Al Dee, but you can call me Al. Can I interest you in a trade?" /> <parameter key="keyword_reply24" value="It's about 0:00 am. I'm so sorry, I have no watches to sell. Do you want to buy something else?" /> <parameter key="keyword_reply25" value="As a premium adventurer you have many advantages. You really should check them out!" /> <parameter key="keyword_reply26" value="The king encouraged salesmen to travel here, but only I dared to take the risk, and a risk it was!" /> <parameter key="keyword_reply27" value="Just ask me for a trade to see what I buy from you." /> <parameter key="keyword_reply28" value="Just ask me for a trade to see my offers." /> <parameter key="keyword_reply29" value="Just ask me for a trade to see my offers." /> <parameter key="keyword_reply30" value=" If you want to explore the dungeons such as the sewers, you have to equip yourself with the vital stuff I am selling. It's vital in the deepest sense of the word." /> <parameter key="keyword_reply31" value="Oh, our sewer system is very primitive - it's so primitive that it's overrun by rats. But the stuff I sell is safe from them. Just ask me for a trade to see it!" /> <parameter key="keyword_reply32" value="Well, vital means - necessary for you to survive!" /> <parameter key="keyword_reply33" value="Rats plague our sewers. You can sell fresh rat corpses to Seymour or Tom the tanner." /> <parameter key="keyword_reply34" value="If you want to challenge monsters in the dungeons, you need some weapons and armor from the local merchants." /> <parameter key="keyword_reply35" value="To view the offers of a merchant, simply talk to him or her and ask for a trade. They will gladly show you their offers and also the things they buy from you." /> <parameter key="keyword_reply36" value="One day I will return to the continent as a rich, a very rich man!" /> <parameter key="keyword_reply37" value="On the island of Rookgaard you can gather important experiences to prepare yourself for mainland." /> <parameter key="keyword_reply38" value="Have you ever wondered what that 'main' is people are talking about? Well, once you've reached level 8, you should talk to the oracle. You can choose a profession afterwards and explore much more of Tibia." /> <parameter key="keyword_reply39" value="You will learn everything you need to know about professions once you've reached the Island of Destiny." /> <parameter key="keyword_reply40" value="The Island of Destiny can be reached via the oracle once you are level 8. This trip will help you choose your profession!" /> <parameter key="keyword_reply41" value="Thais is a crowded town." /> <parameter key="keyword_reply42" value="The big building in the centre of Rookgaard. They have a library, a training centre, a bank and the room of the oracle. Seymour is the teacher there." /> <parameter key="keyword_reply43" value="A bank is quite useful. You can deposit your money safely there. This way you don't have to carry it around with you all the time. You could also invest your money in my wares!" /> <parameter key="keyword_reply44" value="The monk Cipfried takes care of our temple. He can heal you if you're badly injured or poisoned." /> <parameter key="keyword_reply45" value="If you tell me the name of a citizen, I'll tell you what I know about him or her." /> <parameter key="keyword_reply46" value="Yep, that's me. Smart of you to notice that!" /> <parameter key="keyword_reply47" value="She's currently recovering from her travels in the academy. It's always nice to chat with her!" /> <parameter key="keyword_reply48" value="This is a local farmer. If you need fresh food to regain your health, it's a good place to go. He's only trading with premium adventurers though." /> <parameter key="keyword_reply49" value="He is just an old monk. However, he can heal you if you are badly injured or poisoned." /> <parameter key="keyword_reply50" value="ome call him a hero. He protects the town from monsters." /> <parameter key="keyword_reply51" value="She's Obi's granddaughter and deals with armors and shields. Her shop is south west of town, close to the temple." /> <parameter key="keyword_reply52" value="He mostly stays by himself. He's a hermit outside of town - good luck finding him." /> <parameter key="keyword_reply53" value="She sells health potions and antidote potions. Also, she buys blueberries and cookies in case you find any." /> <parameter key="keyword_reply54" value="No idea who that is." /> <parameter key="keyword_reply55" value="She used to sell equipment, but I think she has opened a small bar now. Talks about changing her name to 'Mary' and such, strange girl." /> <parameter key="keyword_reply56" value="He sells weapons. His shop is south west of town, close to the temple." /> <parameter key="keyword_reply57" value="He's the local bank clerk." /> <parameter key="keyword_reply58" value="He dedicated his life to welcome newcomers to this island." /> <parameter key="keyword_reply59" value="Seymour is a teacher running the academy. He has many important information about Tibia." /> <parameter key="keyword_reply60" value="You can find the oracle on the top floor of the academy, just above Seymour. Go there when you are level 8." /> <parameter key="keyword_reply61" value="He's the local tanner. You could try selling fresh corpses or leather to him." /> <parameter key="keyword_reply62" value="This is a local farmer. If you need fresh food to regain your health, it's a good place to go. However, many monsters also carry food such as meat or cheese. Or you could simply pick blueberries." /> <parameter key="keyword_reply63" value="Some call him a hero. He protects the town from monsters." /> <parameter key="keyword_reply64" value="Poor old woman, her son Tom never visits her." /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="backpack,1988,10;bag,1987,4;fishing rod,2580,150;rope,2120,50;scroll,1949,5;scythe,2550,12;shovel,2554,10;torch,2050,2;worm,3976,1"/> <parameter key="shop_sellable" value="fishing rod,2580,30;shovel,2554,2;rope,2120,8"/> </parameters> </npc> Al Dee.lua 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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) 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, 'pick') or msgcontains(msg, 'small axe') then npcHandler:say('Picks are hard to come by. I trade them only in exchange for high quality small axes. Would you like to make that deal?', cid) talkState[talkUser] = 1 elseif(talkState[talkUser] == 1)then if(msgcontains(msg,'yes'))then local get = config[troca] if(doPlayerRemoveItem(cid,2559,1) == true)then npcHandler:say('Splendid! Here, take your pick.', cid) doPlayerAddItem(cid,2553,1) else npcHandler:say('Sorry, I am looking for a SMALL axe.', cid) end else npcHandler:say("Well, then don't.",cid) end talkState[talkUser] = 0 elseif not(foodSayString(msg))then npcHandler:say('sorry but I do not know what they wanted.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  20. Script feito por: Wakon. Objetivo Barco de Liberty Bay levando direto pra GOROMA, sem ser por sorte, igual aos barcos de outras cidades e barco de goroma, podendo voltar direto, sem precisar fazer quest. Tutorial \data\npc\scripts, abra Jack Fate.lua e substitua tudo por: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local lastSound = 0 function onThink() if lastSound < os.time() then lastSound = (os.time() + 5) if math.random(100) < 25 then Npc():say("Passages to Edron, Thais, Venore, Darashia, Ankrahmun, Yalahar, Port Hope and Goroma.", TALKTYPE_SAY) end end npcHandler:onThink() end local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end end local travelNode = keywordHandler:addKeyword({'thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Thais?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32310, y=32210, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'goroma'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Goroma?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32161, y=32558, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Edron?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=33173, y=31764, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Venore?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32954, y=32022, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Port Hope?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32527, y=32784, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Darashia?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=33289, y=32480, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'ankrahmun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Ankrahmun?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=33092, y=32883, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Yalahar?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32816, y=31272, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'}) keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where do you want to go? To Edron, Thais, Venore, Darashia, Ankrahmun, Yalahar, Port Hope or Goroma.?'}) keywordHandler:addKeyword({'passage'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where do you want to go? To Edron, Thais, Venore, Darashia, Ankrahmun, Yalahar, Port Hope or Goroma.?'}) keywordHandler:addKeyword({'name'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'My name is Jack Fate from the Royal Tibia Line.'}) keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I\'m the captain of this sailing ship.'}) keywordHandler:addKeyword({'captain'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I\'m the captain of this sailing ship.'}) keywordHandler:addKeyword({'liberty bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'That\'s where we are.'}) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Welcome on board, Sir |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. Recommend us if you were satisfied with our service.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye then.") npcHandler:addModule(FocusModule:new()) Agora abra Jack FateGoroma.lua e substitua tudo por: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 if msgcontains(msg, 'liberty bay') then npcHandler:say("Do you want to travel back to Liberty Bay?", cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg, "yes") then if npcHandler.topic[cid] == 1 then doTeleportThing(cid, {x=32285, y=32891, z=6}) doSendMagicEffect({x=32285, y=32891, z=6}, CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 end end return true end npcHandler:setMessage(MESSAGE_GREET, "Hello, Sir |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye then.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  21. thloko

    NPC Battle (Psoul)

    Preciso de ajuda com o sistema de NPC duel da base psoul. Consigo startar a luta normalmente, porém, nao consigo atacar o pokemon do npc. (Você nao pode atacar esta criatura) Mesma coisa acontece com os lideres de gym. Alguem ja teve esse problema ?
  22. Olá galera do XT, estou trazendo aqui, meu primeiro NPC, um NPC que teleporta se tiver o item X, tudo configurável! Vá em data/npcs/scripts e copia e cola um arquivo.lua renomeia ele para tp.lua e cola o seguinte código: 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 ------------#Configurações#---------------- local config = { tp1 = {x=100, y=100, z=7}, -- coordenadas pra onde ele irá ao falar aonde está "ir". tp2 = {x=100, y=100, z=7}, -- coordenadas pra onde ele irá ao falar aonde está "ir2". tp3 = {x=100, y=100, z=7}, -- coordenadas pra onde ele irá ao falar aonde está "ir3". item1 = 2160, -- id do item 1 item2 = 2148, -- id do item 2 item3 = 2158, -- id do item 3 qtd1 = 2, -- quantidade a ser removida do item 1 qtd2 = 5, -- quantidade a ser removida do item 2 qtd3 = 7, -- quantidade a ser removida do item 3 } ----------#Fim das configurações#---------- ------------#*#Início do NPC#*#-------------- if msgcontains(msg, 'ir1') then -- o que ele tem que falar. if doPlayerRemoveItem(cid, config.item1, config.qtd1) then doTeleportThing(cid, config.tp1) -- não mexa. else selfSay("Você não tem "..config.qtd1.." {"..getItemNameById(config.item1).."s}.", cid) -- msg que retorna caso ele não tenha o item. end elseif msgcontains(msg, 'ir2') then -- o que ele tem que falar. if doPlayerRemoveItem(cid, config.item2, config.qtd2) then doTeleportThing(cid, config.tp2) -- não mexa. else selfSay("Você não tem "..config.qtd2.." {"..getItemNameById(config.item2).."s}.", cid) -- msg que retorna caso ele não tenha o item. end elseif msgcontains(msg, 'ir3') then -- o que ele tem que falar. if doPlayerRemoveItem(cid, config.item3, config.qtd3) then doTeleportThing(cid, config.tp3) -- não mexa. else selfSay("Você não tem "..config.qtd3.." {"..getItemNameById(config.item3).."s}.", cid) -- msg que retorna caso ele não tenha o item. end end ------------#*#Fim do NPC#*#-------------- return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Feito isso, vá em data/npcs copia um arquivo.xml e renomeia ele para Teleport. Abra com o bloco de notas ou outro editor, e cole este arquivo: <?xml version="1.0" encoding="ISO-8859-1"?> <npc name="Gerson" script="data/npc/scripts/tp.lua" walkinterval="3000" floorchange="0"> <health now="100" max="100"/> <look type="367" head="0" body="38" legs="114" feet="94" addons="0"/> <parameters> <parameter key="message_greet" value="Eu posso levar você para {ir1}, {ir2}, {ir3}."/> <parameter key="message_farewell" value="Adeus!"/> <parameter key="message_walkaway" value="Que bons ventos o levem!"/> </parameters> </npc> Configurando o arquivo do npc: Tudo é feito aqui: ------------#Configurações#---------------- local config = { tp1 = {x=100, y=100, z=7}, -- coordenadas pra onde ele irá ao falar aonde está "ir". tp2 = {x=100, y=100, z=7}, -- coordenadas pra onde ele irá ao falar aonde está "ir2". tp3 = {x=100, y=100, z=7}, -- coordenadas pra onde ele irá ao falar aonde está "ir3". item1 = 2160, -- id do item 1 item2 = 2148, -- id do item 2 item3 = 2158, -- id do item 3 qtd1 = 2, -- quantidade a ser removida do item 1 qtd2 = 5, -- quantidade a ser removida do item 2 qtd3 = 7, -- quantidade a ser removida do item 3 } ----------#Fim das configurações#---------- Em tp1, tp2, tp3 coloque a posição de cada lugar que ele será mandado. Em item1, item2, item3 coloque o ID do item que você quer que seja removido para teleportar o jogador. Em qtd1, qtd2, qtd3 coloque apenas a quantidade a ser removida. Bom galera, este é meu primeiro script espero que gostem!! @Edit Hoje dei uma editada no NPC e removi 10 linhas. Gostaria que me dessem ideias de como melhorar este NPC, ou criar outros.
  23. Fala queridos, estarei compartilhando o npc de addon que ja é bem antigo, porém não achei em local nenhum atualizado, esse esta lindo de bonito, acredito que seja destinado a servidores baiak ou qualquer outro tipo de server. Ambos os NPC'S estão por gold, e as storages são em sequencia pra facilitar a vida. Os codigos estão em spoiler pra não pesar, mas caso queiram se adiantar no fim do post tem o link do github. Imagem meramente Ilustrativa: Script Do addon: Montarias Sempre que atualizar os addons e mounts no global estarei adicionando aos NPC'S. GITHUB Creditos Comedinha (scripts das montarias) Zbizu (acredito que tenha atualizado para 1.1) E ao criador do npc Varkhal, realmente não faço ideia de quem seja.
  24. È um sistema para poketibia que serio o Saffari totalmente automático. [+] O jogador não perde level(experience) ao morrer. [+] O jogador é teleportado quando acabar o tempo ou quando suas Saffari balls acabar! [+] Mostra o tempo restante num comando exclusivo !saffari time Pasta mods Saffari.xml <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Saffari" version="2.0" author="Vodkart" contact="none.com" enabled="yes"> <config name="saffari_func"><![CDATA[ config = { price = 5000, level = 50, need_premium = false, minutes = 60, saffari_positions = {enter = {x=152,y=51,z=5}, exit = {x=163,y=51,z=5}}, saffari_balls = {11445,30}, -- itemid e quantidade blocked_pokeballs = {2146, 2147, 11437, 11441, 11445}, -- pokeball, ultraball, greatball, masterball, safarriball storages = {874547,874548} -- start, time } 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 ]]></config> <event type="login" name="SaffariRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "SaffariDeath") return true end]]></event> <talkaction words="/saffari;!saffari" event="buffer"><![CDATA[ domodlib('saffari_func') param = string.lower(param) if getPlayerStorageValue(cid, config.storages[1]) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not in Saffari") return true end if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, enter !saffari time or !safari leave") return true elseif isInArray({"time","tempo"}, param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, (getPlayerStorageValue(cid, config.storages[2]) - os.time() > 0 and "Left "..timeString(getPlayerStorageValue(cid, config.storages[2]) - os.time()).."" or "Time is over. Please wait a moment.").."\nTo leave enter command: !saffari leave") return true elseif isInArray({"sair","leave"},param) then doTeleportThing(cid, config.saffari_positions.exit) setPlayerStorageValue(cid, config.storages[1], 0) setPlayerStorageValue(cid, config.storages[2], 0) doPlayerSendTextMessage(cid,22,'you left the saffari zone.') return true end ]]></talkaction> <globalevent name="SaffariCheck" interval="60" event="script"><![CDATA[ domodlib('saffari_func') function onThink(interval, lastExecution) local on = getPlayersOnline() if #on > 0 then for i = 1, #on do if getPlayerStorageValue(on[i], config.storages[1]) > 0 then if getPlayerItemCount(on[i], config.saffari_balls[1]) <= 0 or getPlayerStorageValue(on[i], config.storages[2]) - os.time() <= 0 then doTeleportThing(on[i], config.saffari_positions.exit) setPlayerStorageValue(on[i], config.storages[1], 0) setPlayerStorageValue(on[i], config.storages[2], 0) doPlayerSendTextMessage(on[i],22,'you left the saffari zone.') end end end end return true end ]]></globalevent> <event type="death" name="SaffariDeath" event="script"><![CDATA[ domodlib('saffari_func') function onDeath(cid, corpse, deathList) if isPlayer(cid) and getPlayerStorageValue(cid, config.storages[1]) >= 1 then setPlayerStorageValue(cid, config.storages[1], 0) setPlayerStorageValue(cid, config.storages[2], 0) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end return true end ]]></event> </mod> NPC Saffari Man.xml <?xml version="1.0"?> <npc name="Saffari Man" script="data/npc/scripts/saffari.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="Hello |PLAYERNAME|. You want to {enter} in the {saffari} zone!" /> </parameters> </npc> saffari.lua domodlib('saffari_func') 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,msg = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid,msg:lower() if isInArray({"saffari","enter","entrar"}, msg) then npcHandler:say('you can stay in the Saffari zone by '..config.minutes..' minutes, the price is '..config.price..' gp(s), You want enter? {yes}', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then for i = 1, #config.blocked_pokeballs do if getPlayerItemCount(cid, config.blocked_pokeballs[i]) >= 1 then npcHandler:say('Keep your '..getItemNameById(config.blocked_pokeballs[i])..'!', cid) return true end end if config.need_premium and not isPremium(cid) then npcHandler:say('Sorry, you need to be premium!', cid) return true elseif getPlayerLevel(cid) < config.level then npcHandler:say('Sorry, you must be at least level '..config.level..' to enter the Saffari zone!', cid) return true elseif not doPlayerRemoveMoney(cid, config.price) then npcHandler:say('Sorry, you do not have enough money!', cid) return true end doPlayerAddItem(cid, config.saffari_balls[1], config.saffari_balls[2]) selfSay("Thanks, you've been teleported to the Saffari zone and has "..config.minutes.." minutes, if you want to leave enter {!saffari leave}.", cid) doTeleportThing(cid, config.saffari_positions.enter) setPlayerStorageValue(cid, config.storages[1], 1) setPlayerStorageValue(cid, config.storages[2], os.time()+config.minutes*60) elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("then ok.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  25. olá galera do xtibia auguem poderia fazer esse npc para mim ? Player: Hi Npc: olá [PLAYERNAME] você deseja entrar em uma missão ? Player: Yes Npc: Eu gosto muito do pokemon clefable ele sempre foi o meu preferido desde que comecei a jogar pokemon mais nunca consegui captura-lo. sera que você pode captura-lo e trazelo para mim ? Player: Yes Npc: Muito Obrigado Boa sorte treinador ==================================== e depois que o treinador capturar o clefable e levar para o Npc Player:Hi Npc: Olá você de novo tem boas noticias ? conseguiu capturar meu querido clefable ? Player: Yes Npc: OOhh!! Muito obrigado .. Aqui está sua recompensa A recompensa pode ser 30% de experiencia Versão 8.54
×
×
  • Criar Novo...