Postado Maio 18, 2015 10 anos Bom dia, tenho um npc no meu servidor, (Capitão que leva pra PEGLEG) e eu gostaria de retirar a necessidade de fazer a quest para acessar a area de pegleg e nargor! Alguém poderia me ajudar?? 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 local player = Player(cid) if(msgcontains(msg, "peg leg")) then if(getPlayerStorageValue(cid, 28901) == 4) then npcHandler:say("Ohhhh. So... <lowers his voice> you know who sent you so I sail you to you know where. <wink> <wink> It will cost 50 gold to cover my expenses. Is it that what you wish?", cid) npcHandler.topic[cid] = 1 else npcHandler:say("Sorry, my old ears can't hear you.", cid) npcHandler.topic[cid] = 0 end elseif(msgcontains(msg, "passage")) then if isPlayer(cid) then npcHandler:say("<sigh> I knew someone else would claim all the treasure someday. But at least it will be you and not some greedy and selfish person. For a small fee of 200 gold pieces I will sail you to your rendezvous with fate. Do we have a deal?", cid) npcHandler.topic[cid] = 2 elseif(getPlayerStorageValue(cid, 28901) == 4) then npcHandler:say("I have to admit this leaves me a bit puzzled.", cid) npcHandler.topic[cid] = 0 end elseif(msgcontains(msg, "yes")) then if(npcHandler.topic[cid] == 1) then if player:getMoney() >= 50 then player:removeMoney(50) npcHandler:say("And there we go!", cid) doTeleportThing(cid, {x = 32346, y = 32625, z = 7}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough money.", cid) npcHandler.topic[cid] = 0 end elseif(npcHandler.topic[cid] == 2) then if player:getMoney() >= 200 then player:removeMoney(200) npcHandler:say("And there we go!", cid) doTeleportThing(cid, {x = 32131, y = 32913, z = 7}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough money.", cid) npcHandler.topic[cid] = 0 end end end return true end npcHandler:setMessage(MESSAGE_GREET, "Greetings, daring adventurer. If you need a {passage}, let me know.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Oh well.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Esse é o script do npc! Obrihado!
Postado Maio 18, 2015 10 anos Se der algum problema, me avise . Captain Waverider.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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local player = Player(cid) if(msgcontains(msg, "peg leg")) then npcHandler:say("Ohhhh. So... <lowers his voice> you know who sent you so I sail you to you know where. <wink> <wink> It will cost 50 gold to cover my expenses. Is it that what you wish?", cid) npcHandler.topic[cid] = 1 elseif(msgcontains(msg, "passage")) then if isPlayer(cid) then npcHandler:say("<sigh> I knew someone else would claim all the treasure someday. But at least it will be you and not some greedy and selfish person. For a small fee of 200 gold pieces I will sail you to your rendezvous with fate. Do we have a deal?", cid) npcHandler.topic[cid] = 2 end elseif(msgcontains(msg, "yes")) then if(npcHandler.topic[cid] == 1) then if player:getMoney() >= 50 then player:removeMoney(50) npcHandler:say("And there we go!", cid) doTeleportThing(cid, {x = 32346, y = 32625, z = 7}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough money.", cid) npcHandler.topic[cid] = 0 end elseif(npcHandler.topic[cid] == 2) then if player:getMoney() >= 200 then player:removeMoney(200) npcHandler:say("And there we go!", cid) doTeleportThing(cid, {x = 32131, y = 32913, z = 7}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough money.", cid) npcHandler.topic[cid] = 0 end end end return true end npcHandler:setMessage(MESSAGE_GREET, "Greetings, daring adventurer. If you need a {passage}, let me know.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Oh well.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) ➥ Regras | Seções OTServ | Seções BOT
Postado Maio 18, 2015 10 anos Autor Vc é pika Wakon REP+zão pra vc! Poderia me ajudar com outros 2 npcs? Queria que o Barco de Liberty Bay levasse direto pra GOROMA, sem ser por sorte, que fosse igual pra outras cidades! e o barco de goroma, queria que retirasse a quest, podendo voltar direto! NPC LB! 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 and Port Hope.", TALKTYPE_SAY) end end npcHandler:onThink() end local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if msgcontains(msg, 'thais') then npcHandler:say('Do you seek a passage to Thais?', cid) npcHandler.topic[cid] = 1 elseif npcHandler.topic[cid] == 1 then if msgcontains(msg, 'yes') then npcHandler:say("I have to warn you - we might get into a tropical storm on that route. I'm not sure if my ship will withstand it. Do you really want to travel to Thais?",cid) npcHandler.topic[cid] = 2 end elseif msgcontains(msg, 'goroma') then if player:getStorageValue(55700) == 2 then npcHandler:say('Ugh. You really want to go back to Goroma? I\'ll surely have to repair my ship afterwards, so I won\'t charge. Okay?', cid) npcHandler.topic[cid] = 3 end elseif msgcontains(msg, 'shutdown') then npcHandler:say('Ugh. You really want to go back to Shutdown? I\'ll surely have to repair my ship afterwards, so I won\'t charge. Okay?', cid) npcHandler.topic[cid] = 4 elseif msgcontains(msg, 'yes') then if npcHandler.topic[cid] == 2 then local player = Player(cid) if math.random(8) == 1 then player:teleportTo(Position(32161, 32558, 6), false) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler:say('Set the sails!', cid) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 else player:teleportTo(Position(32310, 32210, 6), false) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler:say('Set the sails!', cid) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 end elseif npcHandler.topic[cid] == 3 then player:teleportTo(Position(32161, 32558, 6), false) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler.topic[cid] = 0 elseif npcHandler.topic[cid] == 4 then npcHandler:say('Noob filho da puta vaza daqui, corno viado.', cid) npcHandler.topic[cid] = 0 end end return true end 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}, {Yakahar} or {Port Hope}?'}) keywordHandler:addKeyword({'passage'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where do you want to go? To {Edron}, {Thais}, {Venore}, {Darashia}, {Ankrahmun}, {Yakahar} or {Port Hope}?'}) 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()) NPC GOROMA 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, 'wood') or msgcontains(msg, 'ship') or msgcontains(msg, 'wreck') or msgcontains(msg, 'passage') or msgcontains(msg, 'liberty bay') then if(getPlayerStorageValue(cid, 55700) < 1) then npcHandler:say('I would love to bring you back to Liberty Bay, but as you can see, my ship is ruined. I also hurt my leg and can barely move. Can you help me?', cid) npcHandler.topic[cid] = 1 elseif(getPlayerStorageValue(cid, 55700) == 1) then npcHandler:say("Have you brought 30 gold coins so that I can repair the ship? ", cid) npcHandler.topic[cid] = 3 elseif(getPlayerStorageValue(cid, 55700) == 2) then npcHandler:say("Do you want to travel back to Liberty Bay?", cid) npcHandler.topic[cid] = 4 end elseif msgcontains(msg, "yes") then if npcHandler.topic[cid] == 1 then selfSay("Thank you. Luckily, the damage my ship has taken looks more severe than it is, so I will only need a few wooden boards. ...", cid) selfSay("I saw some lousy trolls running away with some parts of the ship. It might be a good idea to follow them and check if they have some more gold. ...", cid) npcHandler:say("We will need 30 gold coins, no more, no less. Did you understand everything?", cid) npcHandler.topic[cid] = 2 elseif npcHandler.topic[cid] == 2 then npcHandler:say("Good! Please return once you have gathered 30 gold coins.", cid) setPlayerStorageValue(cid, 55700, 1) setPlayerStorageValue(cid, 29105, 1) -- Quest Log Default setPlayerStorageValue(cid, 29109, 1) -- Quest Log npcHandler.topic[cid] = 0 elseif npcHandler.topic[cid] == 3 then if(getPlayerItemCount(cid, 2148) >= 30) then doPlayerRemoveItem(cid, 2148, 30) npcHandler:say("Excellent! Now we can leave this godforsaken place. Thank you for your help. Should you ever want to return to this island, ask me for a passage to Goroma.", cid) setPlayerStorageValue(cid, 55700, 2) setPlayerStorageValue(cid, 29109, 2) -- Quest Log npcHandler.topic[cid] = 0 else npcHandler:say("You don't have it...", cid) end elseif npcHandler.topic[cid] == 4 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()) Me ajuda cara!! Editado Maio 18, 2015 10 anos por Droox (veja o histórico de edições)
Postado Maio 18, 2015 10 anos Solução Jack Fate LB: 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()) Jack FateGoroma: 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()) ➥ Regras | Seções OTServ | Seções BOT
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.