Postado Julho 4, 2013 11 anos Post o script boat_mystic.lua que se encontra na pasta data/npc/scripts Spoiler local config = { delrey = getPlayerCarValue(cid, DELREY), cigarro = getPlayerCancer(cid, DERBY), prostituta = getPlayerAIDS(cid, cracuda), tresOitao = getPlayerRevorvi(cid, 38) } if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS") end
Postado Julho 5, 2013 11 anos Autor 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 npcHandler:addModule(FocusModule:new()) SE TE AJUDEI CLICA EM , NÃO CUSTA NADA Atenciosamente xPollo Da Play No Reggaezin Ai Boy http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
Postado Julho 5, 2013 11 anos No arquivo do npc XML substitua por esse <?xml version="1.0"?> <npc name="Cacaiu" script="data/npc/scripts/boat_mystic.lua" access="3" walkinterval="0" floorchange="0"> <look type="1562" head="20" body="30" legs="40" feet="50"/> <parameters> <parameter key="message_greet" value="Blz |PLAYERNAME|. Quer ir para onde Saffron, Novo Continente, Nova City, City Um, City Dois, City Tres?" /> <parameter key="message_farewell" value="Bye bye!"/> </parameters> </npc> E no script boat_mystic.lua substitua por esse 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 travelNode = keywordHandler:addKeyword({'saffron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wanna go to saffron, are you sure?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 100, destination = {x=1053, y=1053, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'}) local travelNode = keywordHandler:addKeyword({'novo continente'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wanna go to the novo continente, are you sure?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 100, destination = {x=1253, y=249, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'}) local travelNode = keywordHandler:addKeyword({'nova city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wanna go to nova city, are you sure?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 100, destination = {x=1471, y=234, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'}) local travelNode = keywordHandler:addKeyword({'city um'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wanna go to city um, are you sure?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 100, destination = {x=1825, y=843, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'}) local travelNode = keywordHandler:addKeyword({'city dois'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wanna go to city dois, are you sure?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 100, destination = {x=1676, y=890, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'}) local travelNode = keywordHandler:addKeyword({'city tres'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wanna go to city tres, are you sure?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 100, destination = {x=1784, y=1335, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'}) Não testado. Dúvidas? Me avise. Att. Giovani Rodrigo Spoiler local config = { delrey = getPlayerCarValue(cid, DELREY), cigarro = getPlayerCancer(cid, DERBY), prostituta = getPlayerAIDS(cid, cracuda), tresOitao = getPlayerRevorvi(cid, 38) } if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS") end
Postado Julho 6, 2013 11 anos Autor @GiovaniRodrigoCara eu fis certinho igual você falo e agora quando eu falo com ele ele não responde nada. Eu falo "hi" não acontece nada ajuda aew plis. SE TE AJUDEI CLICA EM , NÃO CUSTA NADA Atenciosamente xPollo Da Play No Reggaezin Ai Boy http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
Postado Março 7, 2015 10 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Geral" Para: "OTServ → Suporte OTServ → Suporte de Scripts" Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
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.