Postado Agosto 13, 2017 7 anos Descrição: NPC Simples do Tibia Global que transporta para Cormaya/Farmine. Nome do Npc: Brodrosch Função: Transporte Transporta para: Cormaya Farmine Preços: 210 Gp. para Cormaya 160 Gp. Para Farmine Brodrosch.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start 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 -- OTServ event handling functions end -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cormaya'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a ride to Cormaya for 160 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost =160, destination = {x=33311, y=31989, z=15} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'You shouldn\'t miss the experience.'}) local travelNode = keywordHandler:addKeyword({'farmine'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a ride to Farmine for 210 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost =210, destination = {x=33025, y=31553, z=10} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'You shouldn\'t miss the experience.'}) npcHandler:addModule(FocusModule:new()) Brodrosch.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Brodrosch" script="data/npc/scripts/Brodrosch.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="66" head="0" body="0" legs="0" feet="0" addons="0"/> <voices> <voice text="Ask me for a passage..." interval2="100" margin="1" yell="no"/> </voices> <parameters> <parameter key="message_farewell" value="Good bye." /> <parameter key="message_walkaway" value="Good bye then." /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="passage;" /> <parameter key="keyword_reply1" value="Do you want me take you to {Cormaya} or {Farmine}?" /> <parameter key="message_greet" value="Welcome, |PLAYERNAME|! May earth protect you on the rocky grounds. If you need a {passage}, I can help you."/> </parameters> </npc>
Postado Agosto 14, 2017 7 anos Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP. Spoiler Congratulations, your content has been approved! Thank you for your contribution, we of Tibia King we are grateful. Your content will help many other users, you received +1 REP.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.