Tudo que Pedro. postou
- 2015 GESIOR ACC 1.0 BY VICTORWEBMASTER
-
[NPC] Quest por missões.
Olá, boa noite TK, venho trazer para vocês um script que uso no meu servidor, que serve de missão. Acho maneiro, para RPGS. A função do script é uma quest, o player precisa entregar um item ao NPC, no caso um pergaminho, que lhe dará acesso a clicar na arvore, porém para chegar até a arvore voce tem que procurar uma alavanca, para aparecer uma escada. Vamos lá. Crie um arquivo npc/script/Wyat.lua e adicione. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- OTServ event handling functions end function doCreatureSayWithDelay(cid,text,type,delay,e) if delay<=0 then doCreatureSay(cid,text,type) else local func=function(pars) doCreatureSay(pars.cid,pars.text,pars.type) pars.e.done=TRUE end e.done=FALSE e.event=addEvent(func,delay,{cid=cid, text=text, type=type, e=e}) end end --returns how many msgs he have said already function cancelNPCTalk(events) local ret=1 for aux=1,table.getn(events) do if events[aux].done==FALSE then stopEvent(events[aux].event) else ret=ret+1 end end events=nil return(ret) end function doNPCTalkALot(msgs,interval) local e={} local ret={} if interval==nil then interval=3000 end --3 seconds is default time between messages for aux=1,table.getn(msgs) do e[aux]={} doCreatureSayWithDelay(getNpcCid(),msgs[aux],TALKTYPE_PRIVATE_NP,(aux-1)*interval,e[aux]) table.insert(ret,e[aux]) end return(ret) end function creatureSayCallback(cid, type, msg) -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. if (not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'here') and getPlayerStorageValue(cid, 60200) == -1 then npcHandler:say('This is an old castle. Terrifying {beasts} used to live here.', cid) talk_state = 5 elseif msgcontains(msg, 'beasts') and talk_state == 5 then npcHandler:say('I can tell you more about the castle, however I will need a {favour}.', cid) talk_state = 6 elseif msgcontains(msg, 'favour') and talk_state == 6 then npcHandler:say('I heared about an {old parchment}, which contains ancient alchemists formulas.', cid) talk_state = 7 elseif msgcontains(msg, 'old parchment') and talk_state == 7 then npcHandler:say('Its the piece of paper. The legend says the necromancers from Tanami desert are keeping it in their {library}.', cid) talk_state = 8 elseif msgcontains(msg, 'library') then npcHandler:say('The library can be found to the north of Aldruhn city. I really need this paper, but I am not strong enough to defeat necromancers. Bring it to me, and I will tell you more about beasts.', cid) setPlayerStorageValue(cid, 60200, 1) talk_state = 0 elseif (msgcontains(msg, 'parchment') or msgcontains(msg, 'alchemist') or msgcontains(msg, 'here') or msgcontains(msg, 'alchemists') or msgcontains(msg, 'formulas') or msgcontains(msg, 'done') or msgcontains(msg, 'reward')) and getPlayerItemCount(cid,9733) < 1 and getPlayerStorageValue(cid, 60202) == -1 and getPlayerStorageValue(cid, 60200) == 1 then npcHandler:say('I need you to find it as fast as possible! Please be quick.', cid) elseif getPlayerStorageValue(cid, 60200) == 1 and getPlayerStorageValue(cid, 60201) == -1 and (msgcontains(msg, 'parchment') or msgcontains(msg, 'here') or msgcontains(msg, 'alchemist') or msgcontains(msg, 'alchemists') or msgcontains(msg, 'formulas') or msgcontains(msg, 'done') or msgcontains(msg, 'reward') or msgcontains(msg, 'beast')) then if getPlayerItemCount(cid,9733) >= 1 then if doPlayerRemoveItem(cid,9733,1) then local msgs={ "Okay. I really appreciate it. As I promised: The beast used to terrorize the people from villages nearby. Those were horrible years, many heroes died trying to defeat the beast, but no one survived....", "The name of the beas was Ortheus, this name scares me even to this day. Soon after, Telas came. He was a very brave hero, but not strong enough to kill her alone....", "Luckily for him, he had more luck than cleverness. It was a few seconds separating him from death, then he saw his sword nearby which ensured him victory....", "The beast was changed into a beautiful, red tree. This tree is still here. Some old lever in basement opens the way upstairs. You should start searching there. You have my blessing. Good luck, you can have glory, or die in pain." } doNPCTalkALot(msgs,9000) --if the 2750 is ommited, it uses 3000 always setPlayerStorageValue(cid, 60201, 1) setPlayerStorageValue(cid, 60202, 1) elseif msgcontains(msg, 'things') then npcHandler:say('The beast used to eat human bodies. Many people died here. Many heroes tried to defeat beast, but no one survived. Then {telas} came.', cid) talk_state = 11 elseif msgcontains(msg, 'telas') and talk_state == 11 then npcHandler:say('He was powerful, but not as strong as the beast. He was also very lucky, and this ensured him {victory}.', cid) talk_state = 12 elseif msgcontains(msg, 'victory') and talk_state == 12 then npcHandler:say('The beast was finally defeated. Telas changed her into a beautiful {tree}, but be aware, bad things happen near it.', cid) talk_state = 13 elseif msgcontains(msg, 'tree') and talk_state == 13 then npcHandler:say('The tree is still here. Some old lever in basement opens the way upstairs. You should start searching there. You got my blessing. Good luck, you can have glory, or die in pain.', cid) setPlayerSetStorageValue(cid,60201, 1) doSendMagicEffect(getCreaturePosition(cid), 14) talk_state = 0 end end end ------------------------------------------------ confirm no ------------------------------------------------ -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) crie um xml, Wyat.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Wyat" script="wyat.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="9" corpse="6080"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. What are you looking for {here}?"/> </parameters> </npc> Vamos lá, explicar o Script. você vai falar com o npc, e ele te dará pistas de onde está o [iTEM] que ele quer que você entregue, assim que você entregar ele te dará acesso para passar. Quando ele te der o acesso, você poderá ser teleportado pela arvore. Vamos ao script dela. Actions/script e crie tree.lua e adicione function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 60201) == -1 then doCreatureSay(cid, "You little worm! You dont have enough power to touch me.", TALKTYPE_ORANGE_2, getCreaturePosition(cid)) elseif getPlayerStorageValue(cid, 60201) == 1 then local tppos = {x=1341, y=1094, z=8} doSendMagicEffect(getCreaturePosition(cid), 17) doTeleportThing(cid,tppos) end end adicione essa tag em xml. <action uniqueid="60200" script="new/tree.lua"/> Sem a storage voce não conseguira ser teleportado, e com a storage será para a cords da config.
-
[PEDIDO] OTServer 10.78 + TFS Compilado!
cara, hoje em dia existe o forum para isso, para pesquisar e procurar. O tópico é para pedir ajuda sim, mas tente pesquisar antes.. GLOBAL FULL 10.78 http://www.tibiaking.com/forum/topic/36403-global-full-1078-tfs-10-lions-rock-cast-system-atualiza%C3%A7%C3%A3o-v12/ Distro compiladas http://www.tibiaking.com/forum/topic/53559-distros-compilados-tfs-10-e-12-1078-x86-x64-dlls/ não sei se serve para sqlite, apenas mysql.
-
/a não funciona
nada, tente mudar no phpmyadmin, account_type para 5
- NPC de task
-
NPC de task
- NPC de task
- Bug ao criar naruto website
confere se o nome está correto no phpmyadmin, depois verefique na config.lua também.- First Itens Duvida
1 sorc, 2 ed, 3 pala, 4 ek. [1] = { [2] = { [3] = { [4] = {- [Gesior] PagSeguro Automático atualizado 09/09/2016.
- [Gesior] PagSeguro Automático atualizado 09/09/2016.
- ShopGuild sem erros no site, só nao entrega o item
- [C] Function in 'isnumber' [Archievements]
já uso essa script adicionei o seguinte em global.lua function isNumber(str) return tonumber(str) ~= nil end dai ao dar /addach Admin,1 da o mesmo erro de função, porém agora assim. [C] in function 'addarchievements' up?- (Resolvido)Problemas em deixar ot online
"C:\Program Files\Tibia\Tibia.exe" gamemaster - < está assim? se estiver tire.- [C] Function in 'isnumber' [Archievements]
Estou com um problema no archievements, quando faço a quest ou adicono os pontos pela talkactions da esse erro. Estou usando tfs 1.2, e sei que tem funções que não funcionam. Mais posso usar o que para subistituir?- [Npc] Que ataca Pk e qualquer Monstro
pesquise mais no forum, pesquisar não morde. http://www.tibiaking.com/forum/topic/11649-npc-guard-ataca-players-com-skulls/ http://www.tibiaking.com/forum/topic/37828-npc-guard-ataca-skulls-e-monsters-invasores/- Ajuda Storage TFS 1.2
use essa aqui de modelo. script.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- OTServ event handling functions end function creatureSayCallback(cid, type, msg) -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. if (not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'PALAVRA AQUI') and getPlayerStorageValue(cid, 60100) == -1 then npcHandler:say('You dont want to know {what} is happening down there. I warn you!', cid) talk_state = 5 elseif msgcontains(msg, 'what') and talk_state == 5 then npcHandler:say('Sobkowiak was a teacher a long long time ago. She was always hard on her students. The ones who survived her class were never the same. If you are brave enough, I can let you {pass}.', cid) talk_state = 6 elseif msgcontains(msg, 'PALAVRA AQUI) and talk_state == 6 then npcHandler:say('Are sure You wanna go there?', cid) talk_state = 7 elseif msgcontains(msg, 'yes') and talk_state == 7 then npcHandler:say('As You wish. Good luck, You are really going to need it!', cid) setPlayerStorageValue(cid,60100, 1) talk_state = 0 elseif msgcontains(msg, 'no') and talk_state == 7 then npcHandler:say('Smart choice.', cid) talk_state = 0 ------------------------------------------------ confirm no ------------------------------------------------ -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) npc/npc.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Albert" script="albert.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="146" head="116" body="113" legs="114" feet="98" addons="2"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. You are standing next to {PALAVRA AQUI}. Be quiet, she can hear everything!"/> </parameters> </npc>- Duvida sobre bot
pra caçar tem vários, ibot, xeno etc. Voce pode baixar alguns crakeados no site do pandorium. http://pandoriumx.com/forum/- Erro no uso de uma função no NPC
Tente esse script aqui. <?xml version="1.0" encoding="UTF-8"?> <npc name="Captain Carla" script="default.lua" walkinterval="1500" floorchange="0"> <health now="150" max="150"/> <look type="142" head="19" body="69" legs="125" feet="50" addons="2" corpse="2212"/> <parameters> <parameter key="module_travel" value="1"/> <parameter key="message_greet" value="Hello |PLAYERNAME|. If you don't know where to flow, say {travel}."/> <parameter key="travel_destinations" value="thais,32310,32210,6,50;carlin,32387,31820,6,50;venore,32954,32022,6,50;"/> </parameters> </npc> e em script adicione isso em default.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end npcHandler:addModule(FocusModule:new()) caso não funcione troque seu data/npc/lib/npcsystem/npchandler.lua por este- [Pedido] Estou precisando de 2 Scripts tfs 1.0
não lí, perdão- Erro no uso de uma função no NPC
qual a versão do seu tfs?- [Pedido] Estou precisando de 2 Scripts tfs 1.0
data/movements/scripts: local message = "mensagem" --Mensagem que aparecerá ao pisar no tile. function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doPlayerPopupFYI(cid, message) return true end xml. <movevent type="StepIn" actionid="5731" event="script" value="nome_do_arquivo.lua"/> não esqueça de alterar actionID no rme.- Pedido de script de quest!
adicione isso em xml. <action actionid="2000" script="quests/system.lua"/> crie um system.lua em action/script/quests/system.lua e adicione. -- UniqueIDS para quests, começa nos 55000+ para a quest funcionar, use o ACTIONID 2000 + UNIQUEID para pegar o BAU e os Storagevalue 70000+ -- local config = { storage = 70013, Bp_ID = 5926, -- Pirate Backpack storage2 = 70020, Presente = 1990 -- presente anihilator] } function onUse(cid, item, fromPosition, itemEx, toPosition) -- quest aleatórias -- elseif item.uid == 55024 then if getPlayerStorageValue(cid,70020) == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a demon armor.") doPlayerAddItem(cid,2494,1) setPlayerStorageValue(cid,70020,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"The chest is empty.") end elseif item.uid == 55025 then if getPlayerStorageValue(cid,70020) == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a magic sword.") doPlayerAddItem(cid,2400,1) setPlayerStorageValue(cid,70020,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"The chest is empty.") end elseif item.uid == 55026 then if getPlayerStorageValue(cid,70020) == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a stonecutter axe.") doPlayerAddItem(cid,2431,1) setPlayerStorageValue(cid,70020,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"The chest is empty.") end elseif item.uid == 55027 then if getPlayerStorageValue(cid, config.storage2) == -1 then setPlayerStorageValue(cid, config.storage2, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a present.") Bp = doPlayerAddItem(cid, config.presente, 1) doAddContainerItem(Bp, 2326, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"The chest is empty.") end -- end quest aleatórias -- end return true end IDS que vão no BAU - elseif item.uid == 55024 then STORAGE - if getPlayerStorageValue(cid,70020) == -1 then [NÂO MUDAR] ID DO ITEM - doPlayerAddItem(cid,2431,1)- [Scripter] Procuro Projeto
Tenho um mapa próprio já está online, você mesmo deve conhecer, era do smok3 na epoca era versão 8;54 no momento está online, 10.78, reformulei todos npcs, quests, e adiconei bastante coisa. Tive que refazer maioria das quests pois os npcs usavam 8.60 e não funcionavam no tfs 1.0 + Se quiser saber mais sobre me avise. Servidor: http://luxury-ats.servegame.com- [10.90] Vanaheim Global Opensource - TFS 1.2
achei um problema no cast system, no caso quando abre e tal só o PRIMEIRO espectador consegue mandar mensagens. -EDIT- Bruno, tava testando aqui, achei um BUG que crash o servidor. Quando o player abre o CAST, abre mc e entra no próprio cast, o servidor cai :S - NPC de task
Informação Importante
Confirmação de Termo