vo vereificar se funciona e depois eu posta aki comentando... flw valw ae pela ajuda
3
1.3k
1 mês depois...
info
Grupo: Conde
Registrado: 07/05/08
Posts: 612
Reputação: +12
Char no Tibia: leviana luciferiana

11 de março de 2009 às 11:16
1 mês depois...
info
Grupo: Visconde
Registrado: 12/08/07
Posts: 345
Reputação: +7
Char no Tibia: Lokeded
11 de abril de 2009 às 15:23
Esse não é o The Oracle que veio na versão 8.41 da The Forgotten Server?
~~
Se for o mesmo, não irá funcionar,pois quando você fala a cidade,vocação, ele não te manda para ''main''
Bem, vou testar de qualker geito
Cya


info
Grupo: Campones
Registrado: 28/10/06
Posts: 26
Reputação: 0
bom, este oracle é mais pra quem tem server grande, e frequentemente adiciona novas cidades, ele traz a facilidade de configurar uma nova cidade ou vocations personalizadas
-- AREA EDITÁVEL local Cities = { -- {id,'nome',x,y,z,'premium/free'} {1,'Varak',242,429,12,'premium'}, {2,'Rhyves',159,387,6,'free'}, {3,'Jorvik',469,172,7,'free'}, } local Vocations = { -- {id,'name'} {2,'druid'}, {4,'knight'}, {3,'paladin'}, {1,'sorcerer'}, } local phrases = { -- event = 'phrase', noLevel = 'CHILDREN! COME BACK WHEN YOU\'VE GROWN UP!', greet = 'HELLO, |PLAYERNAME|. ARE YOU PREPARED TO FACE YOUR DESTINY?', askVoc = 'WHAT VOCATION YOU WANT TO BE? ', confirmVoc = 'ARE YOU SURE? THIS DECISION IS IRREVERSIBLE.', askCity = 'DO YOU WANT TO LIVE IN ', confirmCity = {'I\'LL TURN YOU INTO A ',' AND LEAVE YOU IN ',' RIGHT?'}, endMessage = 'GOOD LUCK IN YOUR JOURNEY!', playerDecline = 'COME BACK WHEN YOU FEEL PREPARED', } -- FIM DA ÁREA EDITÁVEL local function mainMe(cid, message, keywords, params, node) doPlayerSetVocation(cid, params.voc[1]) doPlayerSetTown(cid, params.cit[1]) params.npcHandler:releaseFocus(cid) local tmp = getCreaturePosition(cid) doTeleportThing(cid, params.cit[3]) doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(params.cit[3], CONST_ME_TELEPORT) end local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onThink() npcHandler:onThink() end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) if (not npcHandler:isFocused(cid)) then return false end if getPlayerLevel(cid) < 8 then npcHandler:say(phrases.noLevel,cid) npcHandler:releaseFocus(cid) return false end end local cityList = '' local ableCity = {} local node2 = {} local node3 = {} local node4 = {} local pos = {} for i=1,#Cities do pos = {x=Cities[i][3],y=Cities[i][4],z=Cities[i][5]} if (isPremium(cid) == TRUE) then ableCity[#ableCity+1] = {Cities[i][1],Cities[i][2],pos} elseif (Cities[i][6] == 'free') then ableCity[#ableCity+1] = {Cities[i][1],Cities[i][2],pos} end end if #ableCity > 1 then cityList = '{'..ableCity[1][2]..'}' end for i=2,#ableCity-1 do cityList = cityList..', {'..ableCity[i][2]..'}' end phrases.askCity = string.upper(phrases.askCity..cityList..' or {'..ableCity[#ableCity][2]..'}?') local VocList = '{'..Vocations[1][2]..'}' for i=2,#Vocations-1 do VocList = VocList..', {'..Vocations[i][2]..'}' end phrases.askVoc = string.upper(phrases.askVoc..VocList..' or {'..Vocations[#Vocations][2]..'}?') keywordHandler:addKeyword({'no'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,reset=true,text=phrase s.playerDecline}) local node1 = keywordHandler:addKeyword({'yes'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text=phrases.askVoc}) for i=1,#Vocations do node2[i] = node1:addChildKeyword({Vocations[i][2]},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text=phrases.confirmVo c}) node2[i]:addChildKeyword({'no'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text=phrases.askVoc,mo veup=1}) node3[i] = node2[i]:addChildKeyword({'yes'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text=phrases.askCity}) for j=1,#ableCity do askCity = string.upper(phrases.confirmCity[1]..Vocations[i][2]..phrases.confirmCity[2]..ableCity[j][2]..phrases.confirmCity[3]) node4[j] = node3[i]:addChildKeyword({string.lower(ableCity[j][2])},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text=askCity}) node4[j]:addChildKeyword({'no'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text=phrases.askCity,m oveup=1}) node4[j]:addChildKeyword({'yes'},mainMe,{voc=Vocations[i],cit=ableCity[j],npcHandler=npcHandler}) end end npcHandler:setMessage(1,phrases.greet) npcHandler:addModule(FocusModule:new())para adicionar uma nova cidade, bastar ir dps da última e adicionar
{id no map editor, nome da cidade, x, y, z, free}
e pronto, seu oracle já está pronto pra oferecer a nova cidade!
mesmo que não usem, comentem :smile_positivo: