-
Total de itens
3611 -
Registro em
-
Última visita
-
Dias Ganhos
60
Tudo que Roksas postou
-
[Encerrado] [Duvida] Como exportar e importar spells
tópico respondeu ao GuhPk de Roksas em Tópicos Sem Resposta
Eu posso fazer para você se quiser! -
Tente substituir seu arquivo admin.xml na pasta data/XML por esse aqui, caso dê poste resultados, se não der poste resultados mesmo assim e tentarei resolver ^^admin.xml
-
[Encerrado] Erro com NPC pokemon centurion
tópico respondeu ao Doougzera de Roksas em Tópicos Sem Resposta
É um NPC? Me fala o nome dele! Eu tenho Centurion aqui, e então eu arrumo e te passo para você substituir! -
Muito legal, fica bão na ambientação! Gosti )
-
Aulas Básicas Com O Sr. Iunix: 3# Variáveis e Tipos de dados.
tópico respondeu ao iunix de Roksas em Tutoriais de Scripting
Espero que daí, saia mais 100 aulas haha. Muito bom cara, vai fazer sucesso ^^ -
Esse aqui é separado, mas é por itens se não me engano, que nem Global, veja se gosta se quiser posso adaptá-lo! ocal 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:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. Will you help me? If you do, I'll reward you with nice addons! Just say {addons} or {help} if you don't know what to do.") function playerBuyAddonNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.confirm ~= true) and (parameters.decline ~= true) then if(getPlayerPremiumDays(cid) == 1) and (parameters.premium == true) then npcHandler:say('Sorry, but this addon is only for premium players!', cid) npcHandler:resetNpc() return true end if not canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and parameters.outfit_female or parameters.outfit_male, 0) then npcHandler:say('You must obtain the outfit first.', cid) npcHandler:resetNpc() return true end if canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and parameters.outfit_female or parameters.outfit_male, parameters.addon) then npcHandler:say('You already have this addon!', cid) npcHandler:resetNpc() return true end local itemsTable = parameters.items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable[i] items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1]) if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (parameters.cost > 0) and table.maxn(parameters.items) then text = items_list .. ' and ' .. parameters.cost .. ' gp' elseif (parameters.cost > 0) then text = parameters.cost .. ' gp' elseif table.maxn(parameters.items) then text = items_list end npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid) return true elseif (parameters.confirm == true) then local addonNode = node:getParent() local addoninfo = addonNode:getParameters() local items_number = 0 if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] if (getPlayerItemCount(cid,item[1]) >= item[2]) then items_number = items_number + 1 end end end if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then doPlayerRemoveMoney(cid, addoninfo.cost) if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] doPlayerRemoveItem(cid,item[1],item[2]) end end doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon) doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon) npcHandler:say('Here you are.', cid) else npcHandler:say('You do not have the needed items or cash!', cid) end npcHandler:resetNpc() return true elseif (parameters.decline == true) then npcHandler:say('Not interested? Maybe other addon?', cid) npcHandler:resetNpc() return true end return false end local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true}) local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true}) -- citizen (done) local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,100}}, outfit_female = 136, outfit_male = 128, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5890,100}, {5902,50}, {2480,1}}, outfit_female = 136, outfit_male = 128, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- hunter (done) local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5947,1}, {5876,100}, {5948,100}, {5891,5}, {5887,1}, {5889,1}, {5888,1}}, outfit_female = 137, outfit_male = 129, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- knight (done) local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5892,1}}, outfit_female = 139, outfit_male = 131, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5893,100}, {5924,1}, {5885,1}, {5887,1}}, outfit_female = 139, outfit_male = 131, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- mage (done) local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{2182,1}, {2186,1}, {2185,1}, {8911,1}, {2181,1}, {2183,1}, {2190,1}, {2191,1}, {2188,1}, {8921,1}, {2189,1}, {2187,1}, {2392,30}, {5809,1}, {2193,20}}, outfit_female = 138, outfit_male = 130, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5903,1}}, outfit_female = 138, outfit_male = 130, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- summoner (done) local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,100}}, outfit_female = 141, outfit_male = 133, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5894,70}, {5911,20}, {5883,40}, {5922,35}, {5879,10}, {5881,60}, {5882,40}, {2392,3}, {5905,30}}, outfit_female = 141, outfit_male = 133, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- barbarian (done) local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5884,1}, {5885,1}, {5910,50}, {5911,50}, {5886,10}}, outfit_female = 147, outfit_male = 143, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5892,1}, {5893,50}, {5876,50}}, outfit_female = 147, outfit_male = 143, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- druid (done) local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5896,50}, {5897,50}}, outfit_female = 148, outfit_male = 144, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5906,51}, {2031,1}, {4869,1}, {5940,1}}, outfit_female = 148, outfit_male = 144, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nobleman (done) local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = true, cost = 150000, items = {}, outfit_female = 140, outfit_male = 132, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = true, cost = 150000, items = {}, outfit_female = 140, outfit_male = 132, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- oriental (done) local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5945,1}}, outfit_female = 150, outfit_male = 146, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5883,100}, {5895,100}, {5891,2}, {5912,100}}, outfit_female = 150, outfit_male = 146, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- warrior (done) local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5925,100}, {5899,100}, {5884,1}, {5919,1}}, outfit_female = 142, outfit_male = 134, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5887,1}}, outfit_female = 142, outfit_male = 134, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- wizard (done) local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{2536,1}, {2492,1}, {2488,1}, {2123,1}}, outfit_female = 149, outfit_male = 145, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5922,50}}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- assassin (done) local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5912,50}, {5910,50}, {5911,50}, {5913,50}, {5914,50}, {5909,50}, {5886,10}}, outfit_female = 156, outfit_male = 152, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5804,1}, {5930,10}}, outfit_female = 156, outfit_male = 152, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- beggar (done) local outfit_node = keywordHandler:addKeyword({'first beggar addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,50}, {5921,30}, {5913,20}, {5894,10}}, outfit_female = 157, outfit_male = 153, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second beggar addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5883,100}, {2160,2}, {6107,1}}, outfit_female = 157, outfit_male = 153, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- pirate (done) local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6098,100}, {6126,100}, {6097,100}}, outfit_female = 155, outfit_male = 151, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6101,1}, {6102,1}, {6100,1}, {6099,1}}, outfit_female = 155, outfit_male = 151, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- shaman (done) local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5810,5}, {3955,5}, {5015,1}}, outfit_female = 158, outfit_male = 154, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{3966,5}, {3967,5}}, outfit_female = 158, outfit_male = 154, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- norseman (done) local outfit_node = keywordHandler:addKeyword({'first norseman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{7290,5}}, outfit_female = 252, outfit_male = 251, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second norseman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{7290,10}}, outfit_female = 252, outfit_male = 251, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- jester (done)(custom) local outfit_node = keywordHandler:addKeyword({'first jester addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5912,50}, {5913,50}, {5914,50}, {5909,50}}, outfit_female = 270, outfit_male = 273, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second jester addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5912,50}, {5910,50}, {5911,50}, {5912,50}}, outfit_female = 270, outfit_male = 273, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- demonhunter (done)(custom) local outfit_node = keywordHandler:addKeyword({'first demonhunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5905,30}, {5906,40}, {5954,50}, {6500,50}, {2151,100}}, outfit_female = 288, outfit_male = 289, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second demonhunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5906,50}, {6500,200}, {2151,100}}, outfit_female = 288, outfit_male = 289, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nightmare (done)(custom) local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- brotherhood (done)(custom) local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 279, outfit_male = 278, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 279, outfit_male = 278, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- yalaharian (done)(custom) local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 1}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 2}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you citizen, hunter, knight, mage, nobleman, summoner, warrior, barbarian, druid, wizard, oriental, pirate, assassin, beggar, shaman, norseman, nighmare, jester, yalaharian and brotherhood addons.'}) keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.'}) npcHandler:addModule(FocusModule:new())
-
@SirUndead Conhece os Sistemas VIPS por ai? Então, esse é diferente. Não criei funções nem nada do tipo, ele é "Classic" como o próprio nome diz, usei as funções do Tibia mesmo, e o próprio sistema de Premium do Tibia! Mostrando até os dias restantes no Character List. @Topic Galera, em breve "ADAPTAÇÃO PARA 8.54!"
-
Não foi flood Dino. Flood seria falar coisas desnecessárias que não ajudem. Ele fez certo! Reportado.
-
Obrigado cara! Logo menos de 1 mês sai a Classic Premium v3. Só falta ideias haha. Obrigado msm ^^
-
Hm. Muito bom, seria legal colocar em Clients de Pokemon, ou Dbz. Parabéns cara ^^
-
Cara consegui, pelo menos aqui funcionou. Era só uma variável que precisava ser declarada como local ^^ Teste e poste resultados. -- Padre Marcelo ver 2.0 (by Conde Sapo) local focus1 = 0 local focus2 = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local talkstate = 0 cidade = "SpiderBay" --- Colocar aqui o nome da cidade que estah o PADRE dia = os.date("%d") mes = os.date("%m") ano = os.date("%Y") mesesChr = {"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"} mesBR = mesesChr[mes*1] Sex1 = 0 Sex2 = 1 function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(id, stackpos) if id == focus1 or id == focus2 then if id == focus1 then if Sex1 == 1 then ceremonyend('O noivo fugiu.') else ceremonyend('A noiva fugiu.') end else if Sex2 == 1 then ceremonyend('O noivo fugiu.') else ceremonyend('A noiva fugiu.') end end end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function ceremonyend(msg) focus1 = 0 focus2 = 0 talk_start = 0 talkstate = 0 selfSay(msg) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if talkstate == 1 then if cid == focus2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=2 doNpcSetCreatureFocus(focus1) selfSay('E você ' .. getCreatureName(focus1) .. '! Posso começar a cerimônia?') else ceremonyend('Volte quando estiver pront' .. Art2 .. '.') end end elseif talkstate == 2 then if cid == focus1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=3 else ceremonyend('Volte quando estiver pront' .. Art1 .. '.') end end elseif talkstate == 9 then if cid == focus1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=10 else ceremonyend('Volte quando estiver pront' .. Art1 .. '.') end end elseif talkstate == 11 then if cid == focus2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=12 else ceremonyend('Volte quando estiver pront' .. Art2 .. '.') end end end if msgcontains(msg, 'hi') and focus1 == 0 and getDistanceToCreature(cid) < 4 then -- Pessoa 1 no casamento doNpcSetCreatureFocus(cid) focus1 = cid talk_start = os.clock() Casado = getPlayerStorageValue(cid,2424) sex1 = getPlayerSex(cid) if sex1 == 1 then Art1 = "o" Art2 = "a" else Art1 = "a" Art2 = "o" end if Casado == -1 then selfSay('Oi, ' .. getCreatureName(cid) .. '! Eu sou um Padre, e posso te casar. Onde está '..Art2..' noiv'..Art2..'?!?') else selfSay('Você já é casad' .. Art1 .. '.') talkstate = 0 end end if msgcontains(msg, 'hi') and focus1 > 0 and focus2 == 0 and not(cid==focus1) and getDistanceToCreature(cid) < 4 then -- Pessoa 2 no casamento doNpcSetCreatureFocus(cid) Casado = getPlayerStorageValue(cid,2424) sex2 = getPlayerSex(cid) if sex2 == 1 then Art2 = "o" else Art2 = "a" end if Casado == -1 then if sex1 == sex2 then selfSay('Casamento homosexual ainda nao é permitido nesta paróquia.') else selfSay('Olá, ' .. getCreatureName(cid) .. '! Chegou '..Art2..'noiv'..Art2..'. Podemos começar?!?') focus2 = cid talk_start = os.clock() talkstate=1 end else selfSay('Você já é casad' .. Art2 .. '.') talkstate = 0 end end if msgcontains(msg, 'casar') and (focus1 == cid or focus2 == cid) then selfSay('Casamento é uma cerimônia sagrada. Oque Deus une, o homem não separa.') talk_start = os.clock() end if msgcontains(msg, 'divorcio') and (focus1 == cid or focus2 == cid) then setPlayerStorageValue(cid,2424,-1) ceremonyend('OK... Considere-se divorciad'..Art1..'.') end if string.find(msg, '(%a*)bye(%a*)') and (focus1 == cid or focus2 == cid) and getDistanceToCreature(cid) < 6 then ceremonyend('Vai com DEUS, ' .. getCreatureName(cid) .. '!') end end function onCreatureChangeOutfit(creature) end function onThink() if focus1 ~= 0 then -- Olha pro focus1 doNpcSetCreatureFocus(focus1) elseif focus2 ~= 0 then -- Olha pro focus2 doNpcSetCreatureFocus(focus2) else -- Fala uma fraze rand = math.random(1, 400) if rand == 1 then selfSay('Hic.') elseif rand == 2 then selfSay('AMÉM !') elseif rand == 3 then selfSay('Aleluia irmãos...') elseif rand == 4 then selfSay('Pode entrar...') elseif rand == 5 then selfSay('Domingo agora vai ter sermão.') end end if talkstate==3 and (os.clock() - talk_start) > 10 then selfSay('Estamos aqui reunidos na presença de Deus para unir essas duas pessoas,') talk_start = os.clock() talkstate=4 elseif talkstate==4 and (os.clock() - talk_start) > 6 then selfSay('nos sagrados votos do matrimônio.'); talk_start = os.clock() talkstate=5 elseif talkstate==5 and (os.clock() - talk_start) > 6 then selfSay('Se tiver alguem presente que conheça um motivo para evitar esse casamento,') talk_start = os.clock() talkstate=6 elseif talkstate==6 and (os.clock() - talk_start) > 8 then selfSay('que fale agora ou cale-se para sempre!'); talk_start = os.clock() talkstate=61 elseif talkstate==61 and (os.clock() - talk_start) > 6 then P1pos = getPlayerPosition(focus1) P2pos = getPlayerPosition(focus2) AtchinPos = {x=P1pos.x, y=P1pos.y+4, z=P1pos.z} CofPos = {x=P2pos.x-2, y=P2pos.y, z=P2pos.z} doSendAnimatedText(AtchinPos,"Atchin",5) doSendAnimatedText(CofPos,"Cof Cof",33) talkstate=62 elseif talkstate==62 and (os.clock() - talk_start) > 6 then AtchinPos = {x=P2pos.x+2, y=P1pos.y-1, z=P1pos.z} CofPos = {x=P2pos.x-1, y=P2pos.y+4, z=P2pos.z} doSendAnimatedText(AtchinPos,"Criii Criii",71) doSendAnimatedText(CofPos,"Psiuuu!",152) talkstate=7 elseif talkstate==7 and (os.clock() - talk_start) > 6 then selfSay('Comecemos então a cerimônia.'); talk_start = os.clock() talkstate=8 elseif talkstate==8 and (os.clock() - talk_start) > 6 then if sex1 == 1 then local parceiro1 = "Sua legítima esposa" else local parceiro1 = "Seu legítimo marido" end doNpcSetCreatureFocus(focus1) selfSay('Você ' .. getCreatureName(focus1) .. ' aceita ' .. getCreatureName(focus2) .. ' como '.. parceiro1 ..'?') talk_start = os.clock() talkstate=9 elseif talkstate==10 and (os.clock() - talk_start) > 6 then if fex2 == 1 then Parc = "sua legitima esposa" else Parc = "seu legitimo marido" end doNpcSetCreatureFocus(focus2) selfSay('Você ' .. getCreatureName(focus2) .. ' aceita ' .. getCreatureName(focus1) .. ' como '..parceiro1..'?') talk_start = os.clock() talkstate=11 elseif talkstate==12 and (os.clock() - talk_start) > 6 then ---- No anel DELE o nome DELA (e vice-versa) TextoCasorio = 'FÓRUM TIBIANO DE NOTAS E OFICIOS\n\nCertidão de Casamento\n-----------------\n\nEste Documento comprova o amor puro e verdadeiro entre \n' .. getPlayerName(focus1) .. ' e ' .. getPlayerName(focus2) .. '.\n\nCerimônia realizada por Padre Marcelo.\nTestemunhas presentes confirmam o enlace.\n\n'..cidade..', '..dia..' de '..mesBR..' de '..ano anel1 = doPlayerAddItem(focus1,2121,1) doSetItemSpecialDescription(anel1,getPlayerName(focus2) .. ' - ' .. os.date("%d/%m/%y")) certif1 = doPlayerAddItem(focus1,1953,1) doSetItemText(certif1,TextoCasorio) anel2 = doPlayerAddItem(focus2,2121,1) doSetItemSpecialDescription(anel2,getPlayerName(focus1) .. ' - ' .. os.date("%d/%m/%y")) certif2 = doPlayerAddItem(focus2,1953,1) doSetItemText(certif2,TextoCasorio) setPlayerStorageValue(focus1,2424,1) setPlayerStorageValue(focus2,2424,1) ceremonyend('Eu vos declaro Marido e Mulher. Pode beijar a noiva.') talk_start = os.clock() talkstate=0 end if (os.clock() - talk_start) > 100 then if focus1 > 0 or focus2 > 0 then ceremonyend('Cerimônia interrompida por indecisão.') end end end
-
Não foi nada. Muito obrigado! Espero que faça bom uso.
-
Muito obrigado!
-
É, eu vi. Mas pelo que eu saiba é isso mesmo cara. As sources baixadas estão erradas!
-
[8.54] Naruto Legend V2.0 - Novo Mapa com Teleports!
tópico respondeu ao Animal Pak de Roksas em OTServer Alternativo (ATS)
Muito bom parabéns! Prevejo sucesso ) -
dúvida [Encerrado] Bug do Narutibia ( Server 7.81 )
tópico respondeu ao marcelom8 de Roksas em Tópicos Sem Resposta
Peço-lhe para que use o NPC original. Descubri que não há solução para teu caso, o motivo: Não tem como adicionar novos comandos em Ots 7.81. Perdão! Aqui está o original, basta substituir: focus = 0 talk_start = 0 target = 0 following = false attacking = false talk_state = 20 cname = '' vocation = 0 mainlevel = 8 gstat = 0 -- guild status grank = '' -- guild rank gname = '' -- guild name pname = '' -- name of some other player maxnamelen = 30 maxranklen = 20 maxnicklen = 20 leaderlevel = 50 NONE = 0 INVITED = 1 MEMBER = 2 VICE = 3 leader = 4 allow_pattern = '^[a-zA-Z0-9 -]+$' function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Bye.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) cname = creatureGetName(cid) msg = string.lower(msg) posK = {x=388, y=117, z=7} posS = {x=388, y=117, z=7} posM = {x=799, y=420, z=7} if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then if getPlayerSex(cid) == 0 or getPlayerSex(cid) == 28 then selfSay('Oi! ' .. cname .. '! Quer se tornar Gennin, e começar o sonho de Naruto?') talk_state = 20 focus = cid talk_start = os.clock() else selfSay('Sorry, but you alredy chose your village. If not, talk to the Admin.') talk_state = 0 focus = cid end elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. cname .. '! Falo com você em um minuto.') elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Boa sorte, ' .. cname .. '!') talk_state = 20 focus = 0 talk_start = 0 elseif focus == cid then talk_start = os.clock() if talk_state == 20 then if msgcontains(msg, 'yes') then -- confirmando decisao level = getPlayerLevel(cname) if level >= mainlevel then selfSay('Olá, eu recruto shinobis para "konoha".') talk_state = 1 else selfSay('Você ainda não tem o aprendizado necessário da Academia...') talk_state = 20 end else -- selfSay('Você não tem level suficiente para escolher seu clã '.. mainlevel ..'.') talk_state = 20 end elseif talk_state == 1 then -- telling vilage talk_state = 2 if msgcontains(msg, 'konoha') then selfSay('Agora escolha seu clã. Uzumaki, Aburame, Hyuuga, Rock, Nara, Inuzuka, Haruno, Akimichi, Tenzou, Hatake, Yamanaka, Sai ou Shizune?') talk_state = 2 else selfSay('Sorry, this village does not exists...') vocation = 0 talk_state = 1 end elseif talk_state == 2 then -- telling vilage if msgcontains(msg, 'uzumaki') then selfSay('Quer mesmo se tornar a lenda? Quer mesmo se tornar o dominador do Kage Bunshin, fuuton, e rasengan?') talk_state = 4 elseif msgcontains(msg, 'aburame') then selfSay('Este clã controla os kikaichuus para ajuda-los em batalhas. Quer ser um aburame?') talk_state = 5 elseif msgcontains(msg, 'hyuuga') then selfSay('Este clã controla o poder do byakugan para ajuda-los em batalhas. Quer ser um hyuuga?') talk_state = 6 elseif msgcontains(msg, 'rock') then selfSay('Este clã usa o taijutsu em batalhas. Quer ser um rock?') talk_state = 7 elseif msgcontains(msg, 'nara') then selfSay('Este clã controla o poder das sombras para ajuda-los em batalhas. Quer ser um nara?') talk_state = 8 elseif msgcontains(msg, 'inuzuka') then selfSay('Este clã usa a força selvagem nas batalhas. Quer ser um inuzuka?') talk_state = 9 elseif msgcontains(msg, 'haruno') then selfSay('Este clã é medicinal, e usa a força do chakra nos punhos e pés . Quer ser uma Haruno?') talk_state = 10 elseif msgcontains(msg, 'akimichi') then selfSay('Este clã usa o poder das três pirulas, além de aumentar seu corpo para atacar. Quer ser um Akimichi?') talk_state = 11 elseif msgcontains(msg, 'tenzou') then selfSay('Este clã usa o elemento madeira para lutar. Quer ser um Tenzou?') talk_state = 12 elseif msgcontains(msg, 'hatake') then selfSay('Este clã é conhecido como os copiadores. Quer ser um Hatake?') talk_state = 13 elseif msgcontains(msg, 'sai') then selfSay('Este clã usa sua tinta para o combate. Quer ser um Sai?') talk_state = 15 elseif msgcontains(msg, 'shizune') then selfSay('Este clã usa veneno, medical e a tonton para o combate. Quer ser uma Shizune?') talk_state = 16 elseif msgcontains(msg, 'yamanaka') then selfSay('Este clã usa o poder da Flora. Quer ser uma Yamanaka?') talk_state = 17 else selfSay('Desculpa, mas esse clã não existe.') vocation = 0 talk_state = 2 end elseif talk_state == 4 then if msgcontains(msg, 'yes') and talk_state == 4 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,1003,1) learnSpell(cid,'kuchyose no jutsu',0) learnSpell(cid,'bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu two',0) learnSpell(cid,'kage bunshin no jutsu three',0) learnSpell(cid,'tajuu kage bunshin no jutsu',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'oodama rasengan',0) learnSpell(cid,'fuuton rasen-shuriken',0) learnSpell(cid,'senen goroshi',0) learnSpell(cid,'nature control',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'uzumaki naruto rendan',0) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 10') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 177') learnSpell(cid,'kuchyose no jutsu',0) learnSpell(cid,'bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu two',0) learnSpell(cid,'kage bunshin no jutsu three',0) learnSpell(cid,'tajuu kage bunshin no jutsu',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'oodama rasengan',0) learnSpell(cid,'fuuton rasen-shuriken',0) learnSpell(cid,'senen goroshi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'uzumaki naruto rendan',0) setPlayerMasterPos(cid, 388, 117, 7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 9') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 128') learnSpell(cid,'utevo lux',0) setPlayerMasterPos(cid, 388, 117, 7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 5 then if msgcontains(msg, 'yes') and talk_state == 5 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) learnSpell(cid,'call kinkai',0) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 6') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 180') learnSpell(cid,'chakra impulse',0) learnSpell(cid,'luz',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'kikaichuu no jutsu',0) learnSpell(cid,'kikai rastrear',0) learnSpell(cid,'kikai atack',0) learnSpell(cid,'mushikame no jutsu',0) learnSpell(cid,'create kikais',0) learnSpell(cid,'casulo kikai',0) learnSpell(cid,'mushikame invocate',0) learnSpell(cid,'kikaischuu no jutsu',0) learnSpell(cid,'kikai shield',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 5') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 23') learnSpell(cid,'chakra impulse',0) learnSpell(cid,'luz',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'kikaichuu no jutsu',0) learnSpell(cid,'kikai rastrear',0) learnSpell(cid,'kikai atack',0) learnSpell(cid,'mushikame no jutsu',0) learnSpell(cid,'casulo kikai',0) learnSpell(cid,'kikai shield',0) learnSpell(cid,'mushikame invocate',0) learnSpell(cid,'kikaischuu no jutsu',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 6 then if msgcontains(msg, 'yes') and talk_state == 6 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 4') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 137') learnSpell(cid,'juunken',0) learnSpell(cid,'2 pontos',0) learnSpell(cid,'4 pontos',0) learnSpell(cid,'8 pontos',0) learnSpell(cid,'16 pontos',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'32 pontos',0) learnSpell(cid,'64 pontos',0) learnSpell(cid,'256 pontos',0) learnSpell(cid,'byakugan',0) learnSpell(cid,'byakugan impulse',0) learnSpell(cid,'ativar byakugan',0) learnSpell(cid,'byakugan eyes',0) learnSpell(cid,'kaiten',0) learnSpell(cid,'hakke rokujuuyon shou',0) learnSpell(cid,'hakke hasangeki',0) learnSpell(cid,'hakke doujin',0) learnSpell(cid,'hakke sanjin',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 3') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 71') learnSpell(cid,'juunken',0) learnSpell(cid,'2 pontos',0) learnSpell(cid,'4 pontos',0) learnSpell(cid,'8 pontos',0) learnSpell(cid,'16 pontos',0) learnSpell(cid,'32 pontos',0) learnSpell(cid,'64 pontos',0) learnSpell(cid,'256 pontos',0) learnSpell(cid,'byakugan',0) learnSpell(cid,'byakugan impulse',0) learnSpell(cid,'ativar byakugan',0) learnSpell(cid,'byakugan eyes',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'kaiten',0) learnSpell(cid,'hakke rokujuuyon shou',0) learnSpell(cid,'hakke hasangeki',0) learnSpell(cid,'hakke doujin',0) learnSpell(cid,'hakke sanjin',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 7 then if msgcontains(msg, 'yes') and talk_state == 7 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 2') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 178') learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'konoha dai senpuu',0) learnSpell(cid,'konoha gouriki senpuu',0) learnSpell(cid,'omote renge',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'ura renge',0) learnSpell(cid,'lotus',0) learnSpell(cid,'samp',0) learnSpell(cid,'portao inicial',0) learnSpell(cid,'portao da energia',0) learnSpell(cid,'portao da vida',0) learnSpell(cid,'portao do ferimento',0) learnSpell(cid,'portao da floresta',0) learnSpell(cid,'portao da visao',0) learnSpell(cid,'portao da insanidade',0) learnSpell(cid,'portao da morte',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 11') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 130') learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'konoha dai senpuu',0) learnSpell(cid,'konoha gouriki senpuu',0) learnSpell(cid,'omote renge',0) learnSpell(cid,'ura renge',0) learnSpell(cid,'lotus',0) learnSpell(cid,'samp',0) learnSpell(cid,'portao inicial',0) learnSpell(cid,'portao da energia',0) learnSpell(cid,'portao da vida',0) learnSpell(cid,'portao do ferimento',0) learnSpell(cid,'portao da floresta',0) learnSpell(cid,'portao da visao',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'portao da insanidade',0) learnSpell(cid,'portao da morte',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 8 then if msgcontains(msg, 'yes') and talk_state == 8 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 8') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 181') learnSpell(cid,'kage nui',0) learnSpell(cid,'chunnin paralize',0) learnSpell(cid,'kagemane',0) learnSpell(cid,'kage barrer',0) learnSpell(cid,'fogen no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'kage fuchi no jutsu',0) learnSpell(cid,'ultimate kage nui',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 7') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 146') learnSpell(cid,'kage nui',0) learnSpell(cid,'kagemane',0) learnSpell(cid,'kage barrer',0) learnSpell(cid,'fogen no jutsu',0) learnSpell(cid,'kage fuchi no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'ultimate kage nui',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 9 then if msgcontains(msg, 'yes') and talk_state == 9 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 32') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 143') learnSpell(cid,'akamaru',0) learnSpell(cid,'tsuuga',0) learnSpell(cid,'gatsuuga',0) learnSpell(cid,'dynamic marking',0) learnSpell(cid,'gijuu ninpou-shikyaku no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'gijuu ninpou-juujin bunshin',0) learnSpell(cid,'garouga',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 33') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 143') learnSpell(cid,'akamaru',0) learnSpell(cid,'tsuuga',0) learnSpell(cid,'gatsuuga',0) learnSpell(cid,'dynamic marking',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'gijuu ninpou-shikyaku no jutsu',0) learnSpell(cid,'gijuu ninpou-juujin bunshin',0) learnSpell(cid,'garouga',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 10 then if msgcontains(msg, 'yes') and talk_state == 10 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 34') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 136') learnSpell(cid,'mega soco',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'mega chute',0) learnSpell(cid,'power rush',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 35') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 136') learnSpell(cid,'mega soco',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'mega chute',0) learnSpell(cid,'power rush',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 11 then if msgcontains(msg, 'yes') and talk_state == 11 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 39') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 109') learnSpell(cid,'pirula amarela',0) learnSpell(cid,'asas da divindade',0) learnSpell(cid,'tres pirulas',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'pirula verde',0) learnSpell(cid,'bubun baika no jutsu',0) learnSpell(cid,'bubun baika',0) learnSpell(cid,'chou baika no jutsu',0) learnSpell(cid,'pirula vermelha',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 40') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 109') learnSpell(cid,'pirula amarela',0) learnSpell(cid,'asas da divindade',0) learnSpell(cid,'tres pirulas',0) learnSpell(cid,'pirula verde',0) learnSpell(cid,'bubun baika',0) learnSpell(cid,'chou baika no jutsu',0) learnSpell(cid,'bubun baika no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'pirula vermelha',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 12 then if msgcontains(msg, 'yes') and talk_state == 12 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 60') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 70') learnSpell(cid,'mokuton impulse',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'mokuton no jutsu',0) learnSpell(cid,'mokuton shichuuka no jutsu',0) learnSpell(cid,'mokuton hijutsu jukai kousan',0) learnSpell(cid,'mokuton jubaku eisou',0) learnSpell(cid,'mokuton moku shouheki no jutsu',0) learnSpell(cid,'mokuton shichuurou no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 60') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 70') learnSpell(cid,'mokuton impulse',0) learnSpell(cid,'mokuton no jutsu',0) learnSpell(cid,'mokuton shichuuka no jutsu',0) learnSpell(cid,'mokuton hijutsu jukai kousan',0) learnSpell(cid,'mokuton jubaku eisou',0) learnSpell(cid,'mokuton moku shouheki no jutsu',0) learnSpell(cid,'mokuton shichuurou no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 13 then if msgcontains(msg, 'yes') and talk_state == 13 then setPlayerVocation(cid,1) buy(cid,2381,1,0) buy(cid,2390,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 35') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 2') learnSpell(cid,'raiton no jutsu',0) learnSpell(cid,'chidori',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'katon kasumi enbu no jutsu',0) learnSpell(cid,'raikiri',0) learnSpell(cid,'senbon chidori',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'mega soco',0) learnSpell(cid,'kunais explosion',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'ultimate raikiri',0) learnSpell(cid,'pakkun invocate',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 36') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 2') learnSpell(cid,'raiton no jutsu',0) learnSpell(cid,'chidori',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'katon kasumi enbu no jutsu',0) learnSpell(cid,'raikiri',0) learnSpell(cid,'senbon chidori',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'mega soco',0) learnSpell(cid,'kunais explosion',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'ultimate raikiri',0) learnSpell(cid,'pakkun invocate',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 15 then if msgcontains(msg, 'yes') and talk_state == 15 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 15') learnSpell(cid,'ninpou choujuu giga rat',0) learnSpell(cid,'protecao artistica',0) learnSpell(cid,'ninpou choujuu giga lion',0) learnSpell(cid,'tinta impulse',0) learnSpell(cid,'casulo artistico',0) learnSpell(cid,'explosao de tintas',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 15') learnSpell(cid,'ninpou choujuu giga rat',0) learnSpell(cid,'protecao artistica',0) learnSpell(cid,'ninpou choujuu giga lion',0) learnSpell(cid,'tinta impulse',0) learnSpell(cid,'casulo artistico',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'explosao de tintas',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 16 then if msgcontains(msg, 'yes') and talk_state == 16 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 172') learnSpell(cid,'faca de chakra',0) learnSpell(cid,'create senbon',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'tonton',0) learnSpell(cid,'veneno letal',0) learnSpell(cid,'facas de chakra',0) learnSpell(cid,'jutsu secreto da shizune',0) learnSpell(cid,'doku impulse',0) learnSpell(cid,'doku protect',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 172') learnSpell(cid,'faca de chakra',0) learnSpell(cid,'create senbon',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'tonton',0) learnSpell(cid,'veneno letal',0) learnSpell(cid,'facas de chakra',0) learnSpell(cid,'jutsu secreto da shizune',0) learnSpell(cid,'doku impulse',0) learnSpell(cid,'doku protect',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 17 then if msgcontains(msg, 'yes') and talk_state == 17 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 40') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 142') learnSpell(cid,'veneno da flora',0) learnSpell(cid,'transferencia de mente',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'protecao venenosa',0) learnSpell(cid,'casulo da flora',0) learnSpell(cid,'jutsu secreto dos yamanaka',0) learnSpell(cid,'kuchyose flora no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 41') selfSay('/makesay ' .. creatureGetName(cid) .. ',!ropa4859 142') learnSpell(cid,'veneno da flora',0) learnSpell(cid,'transferencia de mente',0) learnSpell(cid,'protecao venenosa',0) learnSpell(cid,'casulo da flora',0) learnSpell(cid,'jutsu secreto dos yamanaka',0) learnSpell(cid,'kuchyose flora no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if focus > 0 then x, y, z = creatureGetPosition(focus) myx, myy, myz = selfGetPosition() if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then selfTurn(0) end if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then selfTurn(2) end if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then selfTurn(1) end if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then selfTurn(3) end if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then selfTurn(1) end if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then selfTurn(3) end if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then selfTurn(2) end if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then selfTurn(0) end if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then selfTurn(1) end if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then selfTurn(3) end if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then selfTurn(2) end if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then selfTurn(0) end if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then selfTurn(1) end if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then selfTurn(3) end if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then selfTurn(2) end if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then selfTurn(0) end end if focus == 0 then randmove = math.random(1,50) if randmove == 1 then selfMove(0) end if randmove == 2 then selfMove(1) end if randmove == 3 then selfMove(2) end if randmove == 4 then selfMove(3) end end if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end end end -
Obrigado pelos elogios, mas acho que agora consigo mesmo. Eu descubri o erro, esta desclarando uma função não existente. Creio que agora vai ) -- Padre Marcelo ver 2.0 (by Conde Sapo) local focus1 = 0 local focus2 = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local talkstate = 0 cidade = "SpiderBay" --- Colocar aqui o nome da cidade que estah o PADRE dia = os.date("%d") mes = os.date("%m") ano = os.date("%Y") mesesChr = {"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"} mesBR = mesesChr[mes*1] Sex1 = 0 Sex2 = 0 function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(id, stackpos) if id == focus1 or id == focus2 then if id == focus1 then if Sex1 == 1 then ceremonyend('O noivo fugiu.') else ceremonyend('A noiva fugiu.') end else if Sex2 == 1 then ceremonyend('O noivo fugiu.') else ceremonyend('A noiva fugiu.') end end end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function ceremonyend(msg) focus1 = 0 focus2 = 0 talk_start = 0 talkstate = 0 selfSay(msg) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if talkstate == 1 then if cid == focus2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=2 doNpcSetCreatureFocus(focus1) selfSay('E você ' .. getCreatureName(focus1) .. '! Posso começar a cerimônia?') else ceremonyend('Volte quando estiver pront' .. Art2 .. '.') end end elseif talkstate == 2 then if cid == focus1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=3 else ceremonyend('Volte quando estiver pront' .. Art1 .. '.') end end elseif talkstate == 9 then if cid == focus1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=10 else ceremonyend('Volte quando estiver pront' .. Art1 .. '.') end end elseif talkstate == 11 then if cid == focus2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=12 else ceremonyend('Volte quando estiver pront' .. Art2 .. '.') end end end if msgcontains(msg, 'hi') and focus1 == 0 and getDistanceToCreature(cid) < 4 then -- Pessoa 1 no casamento doNpcSetCreatureFocus(cid) focus1 = cid talk_start = os.clock() Casado = getPlayerStorageValue(cid,2424) Sex1 = getPlayerSex(cid) if Sex1 == 1 then Art1 = "o" Art2 = "a" else Art1 = "a" Art2 = "o" end if Casado == -1 then selfSay('Oi, ' .. getCreatureName(cid) .. '! Eu sou um Padre, e posso te casar. Onde está '..Art2..' noiv'..Art2..'?!?') else selfSay('Você já é casad' .. Art1 .. '.') talkstate = 0 end end if msgcontains(msg, 'hi') and focus1 > 0 and focus2 == 0 and not(cid==focus1) and getDistanceToCreature(cid) < 4 then -- Pessoa 2 no casamento doNpcSetCreatureFocus(cid) Casado = getPlayerStorageValue(cid,2424) Sex2 = getPlayerSex(cid) if Sex2 == 1 then Art2 = "o" else Art2 = "a" end if Casado == -1 then if Sex1 == Sex2 then selfSay('Casamento homosexual ainda nao é permitido nesta paróquia.') else selfSay('Olá, ' .. getCreatureName(cid) .. '! Chegou '..Art2..'noiv'..Art2..'. Podemos começar?!?') focus2 = cid talk_start = os.clock() talkstate=1 end else selfSay('Você já é casad' .. Art2 .. '.') talkstate = 0 end end if msgcontains(msg, 'casar') and (focus1 == cid or focus2 == cid) then selfSay('Casamento é uma cerimônia sagrada. Oque Deus une, o homem não separa.') talk_start = os.clock() end if msgcontains(msg, 'divorcio') and (focus1 == cid or focus2 == cid) then setPlayerStorageValue(cid,2424,-1) ceremonyend('OK... Considere-se divorciad'..Art1..'.') end if string.find(msg, '(%a*)bye(%a*)') and (focus1 == cid or focus2 == cid) and getDistanceToCreature(cid) < 6 then ceremonyend('Vai com DEUS, ' .. getCreatureName(cid) .. '!') end end function onCreatureChangeOutfit(creature) end function onThink() if focus1 ~= 0 then -- Olha pro focus1 doNpcSetCreatureFocus(focus1) elseif focus2 ~= 0 then -- Olha pro focus2 doNpcSetCreatureFocus(focus2) else -- Fala uma fraze rand = math.random(1, 400) if rand == 1 then selfSay('Hic.') elseif rand == 2 then selfSay('AMÉM !') elseif rand == 3 then selfSay('Aleluia irmãos...') elseif rand == 4 then selfSay('Pode entrar...') elseif rand == 5 then selfSay('Domingo agora vai ter sermão.') end end if talkstate==3 and (os.clock() - talk_start) > 10 then selfSay('Estamos aqui reunidos na presença de Deus para unir essas duas pessoas,') talk_start = os.clock() talkstate=4 elseif talkstate==4 and (os.clock() - talk_start) > 6 then selfSay('nos sagrados votos do matrimônio.'); talk_start = os.clock() talkstate=5 elseif talkstate==5 and (os.clock() - talk_start) > 6 then selfSay('Se tiver alguem presente que conheça um motivo para evitar esse casamento,') talk_start = os.clock() talkstate=6 elseif talkstate==6 and (os.clock() - talk_start) > 8 then selfSay('que fale agora ou cale-se para sempre!'); talk_start = os.clock() talkstate=61 elseif talkstate==61 and (os.clock() - talk_start) > 6 then P1pos = getPlayerPosition(focus1) P2pos = getPlayerPosition(focus2) AtchinPos = {x=P1pos.x, y=P1pos.y+4, z=P1pos.z} CofPos = {x=P2pos.x-2, y=P2pos.y, z=P2pos.z} doSendAnimatedText(AtchinPos,"Atchin",5) doSendAnimatedText(CofPos,"Cof Cof",33) talkstate=62 elseif talkstate==62 and (os.clock() - talk_start) > 6 then AtchinPos = {x=P2pos.x+2, y=P1pos.y-1, z=P1pos.z} CofPos = {x=P2pos.x-1, y=P2pos.y+4, z=P2pos.z} doSendAnimatedText(AtchinPos,"Criii Criii",71) doSendAnimatedText(CofPos,"Psiuuu!",152) talkstate=7 elseif talkstate==7 and (os.clock() - talk_start) > 6 then selfSay('Comecemos então a cerimônia.'); talk_start = os.clock() talkstate=8 elseif talkstate==8 and (os.clock() - talk_start) > 6 then if Sex1 == 1 then Parc = "sua legitima esposa" else a Parc = "seu legitimo marido" end doNpcSetCreatureFocus(focus1) selfSay('Você ' .. getCreatureName(focus1) .. ' aceita ' .. getCreatureName(focus2) .. ' como ' .. Parc .. '?') talk_start = os.clock() talkstate=9 elseif talkstate==10 and (os.clock() - talk_start) > 6 then if Sex2 == 1 then Parc = "sua legitima esposa" else Parc = "seu legitimo marido" end doNpcSetCreatureFocus(focus2) selfSay('Você ' .. getCreatureName(focus2) .. ' aceita ' .. getCreatureName(focus1) .. ' como ' .. Parc .. '?') talk_start = os.clock() talkstate=11 elseif talkstate==12 and (os.clock() - talk_start) > 6 then ---- No anel DELE o nome DELA (e vice-versa) TextoCasorio = 'FÓRUM TIBIANO DE NOTAS E OFICIOS\n\nCertidão de Casamento\n-----------------\n\nEste Documento comprova o amor puro e verdadeiro entre \n' .. getPlayerName(focus1) .. ' e ' .. getPlayerName(focus2) .. '.\n\nCerimônia realizada por Padre Marcelo.\nTestemunhas presentes confirmam o enlace.\n\n'..cidade..', '..dia..' de '..mesBR..' de '..ano anel1 = doPlayerAddItem(focus1,2121,1) doSetItemSpecialDescription(anel1,getPlayerName(focus2) .. ' - ' .. os.date("%d/%m/%y")) certif1 = doPlayerAddItem(focus1,1953,1) doSetItemText(certif1,TextoCasorio) anel2 = doPlayerAddItem(focus2,2121,1) doSetItemSpecialDescription(anel2,getPlayerName(focus1) .. ' - ' .. os.date("%d/%m/%y")) certif2 = doPlayerAddItem(focus2,1953,1) doSetItemText(certif2,TextoCasorio) setPlayerStorageValue(focus1,2424,1) setPlayerStorageValue(focus2,2424,1) ceremonyend('Eu vos declaro Marido e Mulher. Pode beijar a noiva.') talk_start = os.clock() talkstate=0 end if (os.clock() - talk_start) > 100 then if focus1 > 0 or focus2 > 0 then ceremonyend('Cerimônia interrompida por indecisão.') end end end
-
dúvida [Encerrado] Bug do Narutibia ( Server 7.81 )
tópico respondeu ao marcelom8 de Roksas em Tópicos Sem Resposta
Mostre-me qual erro no Distro! @EDIT Não sei como faz para criar talkactions no 7.81. Acho que é mexendo nas sources ;s Se eu descobrir aonde fica as talkactions eu resolvo. Bastaria criar outro comando que eles não descobrissem ^^ -
Realmente, foi testado em 8.60. Desculpe, mas lhe garanto que pega em 9.6
-
Se eu não me engano você está usando sources erradas. E você utilizar Linux não? Se a resposta for negativa, então você baixou os para Linux e usa Windows.
-
Tente assim, espero que funcione: -- Padre Marcelo ver 2.0 (by Conde Sapo) local focus1 = 0 local focus2 = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local talkstate = 0 cidade = "SpiderBay" --- Colocar aqui o nome da cidade que estah o PADRE dia = os.date("%d") mes = os.date("%m") ano = os.date("%Y") mesesChr = {"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"} mesBR = mesesChr[mes*1] Sex1 = 0 Sex2 = 0 function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(id, stackpos) if id == focus1 or id == focus2 then if id == focus1 then if Sex1 == 1 then ceremonyend('O noivo fugiu.') else ceremonyend('A noiva fugiu.') end else if Sex2 == 1 then ceremonyend('O noivo fugiu.') else ceremonyend('A noiva fugiu.') end end end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function ceremonyend(msg) focus1 = 0 focus2 = 0 talk_start = 0 talkstate = 0 selfSay(msg) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if talkstate == 1 then if cid == focus2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=2 doNpcSetCreatureFocus(focus1) selfSay('E você ' .. creatureGetName(focus1) .. '! Posso começar a cerimônia?') else ceremonyend('Volte quando estiver pront' .. Art2 .. '.') end end elseif talkstate == 2 then if cid == focus1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=3 else ceremonyend('Volte quando estiver pront' .. Art1 .. '.') end end elseif talkstate == 9 then if cid == focus1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=10 else ceremonyend('Volte quando estiver pront' .. Art1 .. '.') end end elseif talkstate == 11 then if cid == focus2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then talkstate=12 else ceremonyend('Volte quando estiver pront' .. Art2 .. '.') end end end if msgcontains(msg, 'hi') and focus1 == 0 and getDistanceToCreature(cid) < 4 then -- Pessoa 1 no casamento doNpcSetCreatureFocus(cid) focus1 = cid talk_start = os.clock() Casado = getPlayerStorageValue(cid,2424) Sex1 = getPlayerSex(cid) if Sex1 == 1 then Art1 = "o" Art2 = "a" else Art1 = "a" Art2 = "o" end if Casado == -1 then selfSay('Oi, ' .. getCreatureName(cid) .. '! Eu sou um Padre, e posso te casar. Onde está '..Art2..' noiv'..Art2..'?!?') else selfSay('Você já é casad' .. Art1 .. '.') talkstate = 0 end end if msgcontains(msg, 'hi') and focus1 > 0 and focus2 == 0 and not(cid==focus1) and getDistanceToCreature(cid) < 4 then -- Pessoa 2 no casamento doNpcSetCreatureFocus(cid) Casado = getPlayerStorageValue(cid,2424) Sex2 = getPlayerSex(cid) if Sex2 == 1 then Art2 = "o" else Art2 = "a" end if Casado == -1 then if Sex1 == Sex2 then selfSay('Casamento homosexual ainda nao é permitido nesta paróquia.') else selfSay('Olá, ' .. creatureGetName(cid) .. '! Chegou '..Art2..'noiv'..Art2..'. Podemos começar?!?') focus2 = cid talk_start = os.clock() talkstate=1 end else selfSay('Você já é casad' .. Art2 .. '.') talkstate = 0 end end if msgcontains(msg, 'casar') and (focus1 == cid or focus2 == cid) then selfSay('Casamento é uma cerimônia sagrada. Oque Deus une, o homem não separa.') talk_start = os.clock() end if msgcontains(msg, 'divorcio') and (focus1 == cid or focus2 == cid) then setPlayerStorageValue(cid,2424,-1) ceremonyend('OK... Considere-se divorciad'..Art1..'.') end if string.find(msg, '(%a*)bye(%a*)') and (focus1 == cid or focus2 == cid) and getDistanceToCreature(cid) < 6 then ceremonyend('Vai com DEUS, ' .. creatureGetName(cid) .. '!') end end function onCreatureChangeOutfit(creature) end function onThink() if focus1 ~= 0 then -- Olha pro focus1 doNpcSetCreatureFocus(focus1) elseif focus2 ~= 0 then -- Olha pro focus2 doNpcSetCreatureFocus(focus2) else -- Fala uma fraze rand = math.random(1, 400) if rand == 1 then selfSay('Hic.') elseif rand == 2 then selfSay('AMÉM !') elseif rand == 3 then selfSay('Aleluia irmãos...') elseif rand == 4 then selfSay('Pode entrar...') elseif rand == 5 then selfSay('Domingo agora vai ter sermão.') end end if talkstate==3 and (os.clock() - talk_start) > 10 then selfSay('Estamos aqui reunidos na presença de Deus para unir essas duas pessoas,') talk_start = os.clock() talkstate=4 elseif talkstate==4 and (os.clock() - talk_start) > 6 then selfSay('nos sagrados votos do matrimônio.'); talk_start = os.clock() talkstate=5 elseif talkstate==5 and (os.clock() - talk_start) > 6 then selfSay('Se tiver alguem presente que conheça um motivo para evitar esse casamento,') talk_start = os.clock() talkstate=6 elseif talkstate==6 and (os.clock() - talk_start) > 8 then selfSay('que fale agora ou cale-se para sempre!'); talk_start = os.clock() talkstate=61 elseif talkstate==61 and (os.clock() - talk_start) > 6 then P1pos = getPlayerPosition(focus1) P2pos = getPlayerPosition(focus2) AtchinPos = {x=P1pos.x, y=P1pos.y+4, z=P1pos.z} CofPos = {x=P2pos.x-2, y=P2pos.y, z=P2pos.z} doSendAnimatedText(AtchinPos,"Atchin",5) doSendAnimatedText(CofPos,"Cof Cof",33) talkstate=62 elseif talkstate==62 and (os.clock() - talk_start) > 6 then AtchinPos = {x=P2pos.x+2, y=P1pos.y-1, z=P1pos.z} CofPos = {x=P2pos.x-1, y=P2pos.y+4, z=P2pos.z} doSendAnimatedText(AtchinPos,"Criii Criii",71) doSendAnimatedText(CofPos,"Psiuuu!",152) talkstate=7 elseif talkstate==7 and (os.clock() - talk_start) > 6 then selfSay('Comecemos então a cerimônia.'); talk_start = os.clock() talkstate=8 elseif talkstate==8 and (os.clock() - talk_start) > 6 then if Sex1 == 1 then Parc = "sua legitima esposa" else Parc = "seu legitimo marido" end doNpcSetCreatureFocus(focus1) selfSay('Você ' .. creatureGetName(focus1) .. ' aceita ' .. creatureGetName(focus2) .. ' como ' .. Parc .. '?') talk_start = os.clock() talkstate=9 elseif talkstate==10 and (os.clock() - talk_start) > 6 then if Sex2 == 1 then Parc = "sua legitima esposa" else Parc = "seu legitimo marido" end doNpcSetCreatureFocus(focus2) selfSay('Você ' .. creatureGetName(focus2) .. ' aceita ' .. creatureGetName(focus1) .. ' como ' .. Parc .. '?') talk_start = os.clock() talkstate=11 elseif talkstate==12 and (os.clock() - talk_start) > 6 then ---- No anel DELE o nome DELA (e vice-versa) TextoCasorio = 'FÓRUM TIBIANO DE NOTAS E OFICIOS\n\nCertidão de Casamento\n-----------------\n\nEste Documento comprova o amor puro e verdadeiro entre \n' .. getPlayerName(focus1) .. ' e ' .. getPlayerName(focus2) .. '.\n\nCerimônia realizada por Padre Marcelo.\nTestemunhas presentes confirmam o enlace.\n\n'..cidade..', '..dia..' de '..mesBR..' de '..ano anel1 = doPlayerAddItem(focus1,2121,1) doSetItemSpecialDescription(anel1,getPlayerName(focus2) .. ' - ' .. os.date("%d/%m/%y")) certif1 = doPlayerAddItem(focus1,1953,1) doSetItemText(certif1,TextoCasorio) anel2 = doPlayerAddItem(focus2,2121,1) doSetItemSpecialDescription(anel2,getPlayerName(focus1) .. ' - ' .. os.date("%d/%m/%y")) certif2 = doPlayerAddItem(focus2,1953,1) doSetItemText(certif2,TextoCasorio) setPlayerStorageValue(focus1,2424,1) setPlayerStorageValue(focus2,2424,1) ceremonyend('Eu vos declaro Marido e Mulher. Pode beijar a noiva.') talk_start = os.clock() talkstate=0 end if (os.clock() - talk_start) > 100 then if focus1 > 0 or focus2 > 0 then ceremonyend('Cerimônia interrompida por indecisão.') end end end
-
dúvida [Encerrado] Bug do Narutibia ( Server 7.81 )
tópico respondeu ao marcelom8 de Roksas em Tópicos Sem Resposta
Faça o seguinte, vá na pasta data/npcs/scripts, procure pelo arquivo Konoha Recruter, abra ele, apague tudo que estiver dentro e adicione isso: focus = 0 talk_start = 0 target = 0 following = false attacking = false talk_state = 20 cname = '' vocation = 0 mainlevel = 8 gstat = 0 -- guild status grank = '' -- guild rank gname = '' -- guild name pname = '' -- name of some other player maxnamelen = 30 maxranklen = 20 maxnicklen = 20 leaderlevel = 50 NONE = 0 INVITED = 1 MEMBER = 2 VICE = 3 leader = 4 allow_pattern = '^[a-zA-Z0-9 -]+$' function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Bye.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) cname = creatureGetName(cid) msg = string.lower(msg) posK = {x=388, y=117, z=7} posS = {x=388, y=117, z=7} posM = {x=799, y=420, z=7} if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then if getPlayerSex(cid) == 0 or getPlayerSex(cid) == 28 then selfSay('Oi! ' .. cname .. '! Quer se tornar Gennin, e começar o sonho de Naruto?') talk_state = 20 focus = cid talk_start = os.clock() else selfSay('Sorry, but you alredy chose your village. If not, talk to the Admin.') talk_state = 0 focus = cid end elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. cname .. '! Falo com você em um minuto.') elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Boa sorte, ' .. cname .. '!') talk_state = 20 focus = 0 talk_start = 0 elseif focus == cid then talk_start = os.clock() if talk_state == 20 then if msgcontains(msg, 'yes') then -- confirmando decisao level = getPlayerLevel(cname) if level >= mainlevel then selfSay('Olá, eu recruto shinobis para "konoha".') talk_state = 1 else selfSay('Você ainda não tem o aprendizado necessário da Academia...') talk_state = 20 end else -- selfSay('Você não tem level suficiente para escolher seu clã '.. mainlevel ..'.') talk_state = 20 end elseif talk_state == 1 then -- telling vilage talk_state = 2 if msgcontains(msg, 'konoha') then selfSay('Agora escolha seu clã. Uzumaki, Aburame, Hyuuga, Rock, Nara, Inuzuka, Haruno, Akimichi, Tenzou, Hatake, Yamanaka, Sai ou Shizune?') talk_state = 2 else selfSay('Sorry, this village does not exists...') vocation = 0 talk_state = 1 end elseif talk_state == 2 then -- telling vilage if msgcontains(msg, 'uzumaki') then selfSay('Quer mesmo se tornar a lenda? Quer mesmo se tornar o dominador do Kage Bunshin, fuuton, e rasengan?') talk_state = 4 elseif msgcontains(msg, 'aburame') then selfSay('Este clã controla os kikaichuus para ajuda-los em batalhas. Quer ser um aburame?') talk_state = 5 elseif msgcontains(msg, 'hyuuga') then selfSay('Este clã controla o poder do byakugan para ajuda-los em batalhas. Quer ser um hyuuga?') talk_state = 6 elseif msgcontains(msg, 'rock') then selfSay('Este clã usa o taijutsu em batalhas. Quer ser um rock?') talk_state = 7 elseif msgcontains(msg, 'nara') then selfSay('Este clã controla o poder das sombras para ajuda-los em batalhas. Quer ser um nara?') talk_state = 8 elseif msgcontains(msg, 'inuzuka') then selfSay('Este clã usa a força selvagem nas batalhas. Quer ser um inuzuka?') talk_state = 9 elseif msgcontains(msg, 'haruno') then selfSay('Este clã é medicinal, e usa a força do chakra nos punhos e pés . Quer ser uma Haruno?') talk_state = 10 elseif msgcontains(msg, 'akimichi') then selfSay('Este clã usa o poder das três pirulas, além de aumentar seu corpo para atacar. Quer ser um Akimichi?') talk_state = 11 elseif msgcontains(msg, 'tenzou') then selfSay('Este clã usa o elemento madeira para lutar. Quer ser um Tenzou?') talk_state = 12 elseif msgcontains(msg, 'hatake') then selfSay('Este clã é conhecido como os copiadores. Quer ser um Hatake?') talk_state = 13 elseif msgcontains(msg, 'sai') then selfSay('Este clã usa sua tinta para o combate. Quer ser um Sai?') talk_state = 15 elseif msgcontains(msg, 'shizune') then selfSay('Este clã usa veneno, medical e a tonton para o combate. Quer ser uma Shizune?') talk_state = 16 elseif msgcontains(msg, 'yamanaka') then selfSay('Este clã usa o poder da Flora. Quer ser uma Yamanaka?') talk_state = 17 else selfSay('Desculpa, mas esse clã não existe.') vocation = 0 talk_state = 2 end elseif talk_state == 4 then if msgcontains(msg, 'yes') and talk_state == 4 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,1003,1) learnSpell(cid,'kuchyose no jutsu',0) learnSpell(cid,'bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu two',0) learnSpell(cid,'kage bunshin no jutsu three',0) learnSpell(cid,'tajuu kage bunshin no jutsu',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'oodama rasengan',0) learnSpell(cid,'fuuton rasen-shuriken',0) learnSpell(cid,'senen goroshi',0) learnSpell(cid,'nature control',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'uzumaki naruto rendan',0) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 10') doCreatureChangeOutfit(cid, 177) learnSpell(cid,'kuchyose no jutsu',0) learnSpell(cid,'bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu',0) learnSpell(cid,'kage bunshin no jutsu two',0) learnSpell(cid,'kage bunshin no jutsu three',0) learnSpell(cid,'tajuu kage bunshin no jutsu',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'oodama rasengan',0) learnSpell(cid,'fuuton rasen-shuriken',0) learnSpell(cid,'senen goroshi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'uzumaki naruto rendan',0) setPlayerMasterPos(cid, 388, 117, 7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 9') doCreatureChangeOutfit(cid, 128) learnSpell(cid,'utevo lux',0) setPlayerMasterPos(cid, 388, 117, 7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 5 then if msgcontains(msg, 'yes') and talk_state == 5 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) learnSpell(cid,'call kinkai',0) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 6') doCreatureChangeOutfit(cid, 180) learnSpell(cid,'chakra impulse',0) learnSpell(cid,'luz',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'kikaichuu no jutsu',0) learnSpell(cid,'kikai rastrear',0) learnSpell(cid,'kikai atack',0) learnSpell(cid,'mushikame no jutsu',0) learnSpell(cid,'create kikais',0) learnSpell(cid,'casulo kikai',0) learnSpell(cid,'mushikame invocate',0) learnSpell(cid,'kikaischuu no jutsu',0) learnSpell(cid,'kikai shield',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 5') doCreatureChangeOutfit(cid, 23) learnSpell(cid,'chakra impulse',0) learnSpell(cid,'luz',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'kikaichuu no jutsu',0) learnSpell(cid,'kikai rastrear',0) learnSpell(cid,'kikai atack',0) learnSpell(cid,'mushikame no jutsu',0) learnSpell(cid,'casulo kikai',0) learnSpell(cid,'kikai shield',0) learnSpell(cid,'mushikame invocate',0) learnSpell(cid,'kikaischuu no jutsu',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 6 then if msgcontains(msg, 'yes') and talk_state == 6 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 4') doCreatureChangeOutfit(cid, 137) learnSpell(cid,'juunken',0) learnSpell(cid,'2 pontos',0) learnSpell(cid,'4 pontos',0) learnSpell(cid,'8 pontos',0) learnSpell(cid,'16 pontos',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'32 pontos',0) learnSpell(cid,'64 pontos',0) learnSpell(cid,'256 pontos',0) learnSpell(cid,'byakugan',0) learnSpell(cid,'byakugan impulse',0) learnSpell(cid,'ativar byakugan',0) learnSpell(cid,'byakugan eyes',0) learnSpell(cid,'kaiten',0) learnSpell(cid,'hakke rokujuuyon shou',0) learnSpell(cid,'hakke hasangeki',0) learnSpell(cid,'hakke doujin',0) learnSpell(cid,'hakke sanjin',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 3') doCreatureChangeOutfit(cid, 71) learnSpell(cid,'juunken',0) learnSpell(cid,'2 pontos',0) learnSpell(cid,'4 pontos',0) learnSpell(cid,'8 pontos',0) learnSpell(cid,'16 pontos',0) learnSpell(cid,'32 pontos',0) learnSpell(cid,'64 pontos',0) learnSpell(cid,'256 pontos',0) learnSpell(cid,'byakugan',0) learnSpell(cid,'byakugan impulse',0) learnSpell(cid,'ativar byakugan',0) learnSpell(cid,'byakugan eyes',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'kaiten',0) learnSpell(cid,'hakke rokujuuyon shou',0) learnSpell(cid,'hakke hasangeki',0) learnSpell(cid,'hakke doujin',0) learnSpell(cid,'hakke sanjin',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 7 then if msgcontains(msg, 'yes') and talk_state == 7 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 2') doCreatureChangeOutfit(cid, 178) learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'konoha dai senpuu',0) learnSpell(cid,'konoha gouriki senpuu',0) learnSpell(cid,'omote renge',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'ura renge',0) learnSpell(cid,'lotus',0) learnSpell(cid,'samp',0) learnSpell(cid,'portao inicial',0) learnSpell(cid,'portao da energia',0) learnSpell(cid,'portao da vida',0) learnSpell(cid,'portao do ferimento',0) learnSpell(cid,'portao da floresta',0) learnSpell(cid,'portao da visao',0) learnSpell(cid,'portao da insanidade',0) learnSpell(cid,'portao da morte',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 11') doCreatureChangeOutfit(cid, 130) learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'konoha dai senpuu',0) learnSpell(cid,'konoha gouriki senpuu',0) learnSpell(cid,'omote renge',0) learnSpell(cid,'ura renge',0) learnSpell(cid,'lotus',0) learnSpell(cid,'samp',0) learnSpell(cid,'portao inicial',0) learnSpell(cid,'portao da energia',0) learnSpell(cid,'portao da vida',0) learnSpell(cid,'portao do ferimento',0) learnSpell(cid,'portao da floresta',0) learnSpell(cid,'portao da visao',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'portao da insanidade',0) learnSpell(cid,'portao da morte',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 8 then if msgcontains(msg, 'yes') and talk_state == 8 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 8') doCreatureChangeOutfit(cid, 181) learnSpell(cid,'kage nui',0) learnSpell(cid,'chunnin paralize',0) learnSpell(cid,'kagemane',0) learnSpell(cid,'kage barrer',0) learnSpell(cid,'fogen no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'kage fuchi no jutsu',0) learnSpell(cid,'ultimate kage nui',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 7') doCreatureChangeOutfit(cid, 146) learnSpell(cid,'kage nui',0) learnSpell(cid,'kagemane',0) learnSpell(cid,'kage barrer',0) learnSpell(cid,'fogen no jutsu',0) learnSpell(cid,'kage fuchi no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'ultimate kage nui',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 9 then if msgcontains(msg, 'yes') and talk_state == 9 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 32') doCreatureChangeOutfit(cid, 143) learnSpell(cid,'akamaru',0) learnSpell(cid,'tsuuga',0) learnSpell(cid,'gatsuuga',0) learnSpell(cid,'dynamic marking',0) learnSpell(cid,'gijuu ninpou-shikyaku no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'gijuu ninpou-juujin bunshin',0) learnSpell(cid,'garouga',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 33') doCreatureChangeOutfit(cid, 143) learnSpell(cid,'akamaru',0) learnSpell(cid,'tsuuga',0) learnSpell(cid,'gatsuuga',0) learnSpell(cid,'dynamic marking',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'gijuu ninpou-shikyaku no jutsu',0) learnSpell(cid,'gijuu ninpou-juujin bunshin',0) learnSpell(cid,'garouga',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 10 then if msgcontains(msg, 'yes') and talk_state == 10 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 34') doCreatureChangeOutfit(cid, 136) learnSpell(cid,'mega soco',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'mega chute',0) learnSpell(cid,'power rush',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 35') doCreatureChangeOutfit(cid, 136) learnSpell(cid,'mega soco',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'mega chute',0) learnSpell(cid,'power rush',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 11 then if msgcontains(msg, 'yes') and talk_state == 11 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 39') doCreatureChangeOutfit(cid, 109) learnSpell(cid,'pirula amarela',0) learnSpell(cid,'asas da divindade',0) learnSpell(cid,'tres pirulas',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'pirula verde',0) learnSpell(cid,'bubun baika no jutsu',0) learnSpell(cid,'bubun baika',0) learnSpell(cid,'chou baika no jutsu',0) learnSpell(cid,'pirula vermelha',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 40') doCreatureChangeOutfit(cid, 109) learnSpell(cid,'pirula amarela',0) learnSpell(cid,'asas da divindade',0) learnSpell(cid,'tres pirulas',0) learnSpell(cid,'pirula verde',0) learnSpell(cid,'bubun baika',0) learnSpell(cid,'chou baika no jutsu',0) learnSpell(cid,'bubun baika no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'pirula vermelha',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 12 then if msgcontains(msg, 'yes') and talk_state == 12 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 60') doCreatureChangeOutfit(cid, 70) learnSpell(cid,'mokuton impulse',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'mokuton no jutsu',0) learnSpell(cid,'mokuton shichuuka no jutsu',0) learnSpell(cid,'mokuton hijutsu jukai kousan',0) learnSpell(cid,'mokuton jubaku eisou',0) learnSpell(cid,'mokuton moku shouheki no jutsu',0) learnSpell(cid,'mokuton shichuurou no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 60') doCreatureChangeOutfit(cid, 70) learnSpell(cid,'mokuton impulse',0) learnSpell(cid,'mokuton no jutsu',0) learnSpell(cid,'mokuton shichuuka no jutsu',0) learnSpell(cid,'mokuton hijutsu jukai kousan',0) learnSpell(cid,'mokuton jubaku eisou',0) learnSpell(cid,'mokuton moku shouheki no jutsu',0) learnSpell(cid,'mokuton shichuurou no jutsu',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 13 then if msgcontains(msg, 'yes') and talk_state == 13 then setPlayerVocation(cid,1) buy(cid,2381,1,0) buy(cid,2390,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 35') doCreatureChangeOutfit(cid, 2) learnSpell(cid,'raiton no jutsu',0) learnSpell(cid,'chidori',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'katon kasumi enbu no jutsu',0) learnSpell(cid,'raikiri',0) learnSpell(cid,'senbon chidori',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'mega soco',0) learnSpell(cid,'kunais explosion',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'ultimate raikiri',0) learnSpell(cid,'pakkun invocate',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 36') doCreatureChangeOutfit(cid, 2) learnSpell(cid,'raiton no jutsu',0) learnSpell(cid,'chidori',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'katon kasumi enbu no jutsu',0) learnSpell(cid,'raikiri',0) learnSpell(cid,'senbon chidori',0) learnSpell(cid,'rasengan',0) learnSpell(cid,'konoha senpuu',0) learnSpell(cid,'mega soco',0) learnSpell(cid,'kunais explosion',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'ultimate raikiri',0) learnSpell(cid,'pakkun invocate',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 15 then if msgcontains(msg, 'yes') and talk_state == 15 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') doCreatureChangeOutfit(cid, 15) learnSpell(cid,'ninpou choujuu giga rat',0) learnSpell(cid,'protecao artistica',0) learnSpell(cid,'ninpou choujuu giga lion',0) learnSpell(cid,'tinta impulse',0) learnSpell(cid,'casulo artistico',0) learnSpell(cid,'explosao de tintas',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') doCreatureChangeOutfit(cid, 15) learnSpell(cid,'ninpou choujuu giga rat',0) learnSpell(cid,'protecao artistica',0) learnSpell(cid,'ninpou choujuu giga lion',0) learnSpell(cid,'tinta impulse',0) learnSpell(cid,'casulo artistico',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'explosao de tintas',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 16 then if msgcontains(msg, 'yes') and talk_state == 16 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') doCreatureChangeOutfit(cid, 172) learnSpell(cid,'faca de chakra',0) learnSpell(cid,'create senbon',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'tonton',0) learnSpell(cid,'veneno letal',0) learnSpell(cid,'facas de chakra',0) learnSpell(cid,'jutsu secreto da shizune',0) learnSpell(cid,'doku impulse',0) learnSpell(cid,'doku protect',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 28') doCreatureChangeOutfit(cid, 172) learnSpell(cid,'faca de chakra',0) learnSpell(cid,'create senbon',0) learnSpell(cid,'doku kiri no jutsu',0) learnSpell(cid,'tonton',0) learnSpell(cid,'veneno letal',0) learnSpell(cid,'facas de chakra',0) learnSpell(cid,'jutsu secreto da shizune',0) learnSpell(cid,'doku impulse',0) learnSpell(cid,'doku protect',0) learnSpell(cid,'hiper chute',0) learnSpell(cid,'chyute sio',0) learnSpell(cid,'hp restore',0) learnSpell(cid,'saikan chuushutsu no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end if talk_state == 17 then if msgcontains(msg, 'yes') and talk_state == 17 then setPlayerVocation(cid,1) buy(cid,2381,1,0) setPlayerStorageValue(cid,600,1) setPlayerStorageValue(cid,5,1) if getPlayerSex(cid) == 0 then selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 40') doCreatureChangeOutfit(cid, 142) learnSpell(cid,'veneno da flora',0) learnSpell(cid,'transferencia de mente',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'protecao venenosa',0) learnSpell(cid,'casulo da flora',0) learnSpell(cid,'jutsu secreto dos yamanaka',0) learnSpell(cid,'kuchyose flora no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 else selfSay('/makesay ' .. creatureGetName(cid) .. ',/promotedsx 41') doCreatureChangeOutfit(cid, 142) learnSpell(cid,'veneno da flora',0) learnSpell(cid,'transferencia de mente',0) learnSpell(cid,'protecao venenosa',0) learnSpell(cid,'casulo da flora',0) learnSpell(cid,'jutsu secreto dos yamanaka',0) learnSpell(cid,'kuchyose flora no jutsu',0) learnSpell(cid,'kawarimi',0) learnSpell(cid,'luz',0) learnSpell(cid,'henge no jutsu',0) learnSpell(cid,'chakra impulse',0) setPlayerMasterPos(cid,388,117,7) Travel(cid, 0, 388, 117, 7) talk_state = 20 focus = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if focus > 0 then x, y, z = creatureGetPosition(focus) myx, myy, myz = selfGetPosition() if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then selfTurn(0) end if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then selfTurn(2) end if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then selfTurn(1) end if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then selfTurn(3) end if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then selfTurn(1) end if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then selfTurn(3) end if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then selfTurn(2) end if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then selfTurn(0) end if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then selfTurn(1) end if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then selfTurn(3) end if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then selfTurn(2) end if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then selfTurn(0) end if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then selfTurn(1) end if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then selfTurn(3) end if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then selfTurn(2) end if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then selfTurn(0) end end if focus == 0 then randmove = math.random(1,50) if randmove == 1 then selfMove(0) end if randmove == 2 then selfMove(1) end if randmove == 3 then selfMove(2) end if randmove == 4 then selfMove(3) end end if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end end end Boa sorte, poste resultados! BENÇA ) -
[Encerrado] [ajuda por favor] como abrir porta no modem sem danifica-lo
tópico respondeu ao dirceujunior1 de Roksas em Tópicos Sem Resposta
Não foi nada, Disponha do XTibia! Dúvida Sanada, Reportado!- 8 respostas
-
- porta no modem
- rede
- (e 5 mais)
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.