Postado Janeiro 13, 2012 13 anos -> JhonatanCWest Estarei movendo o seu tópico para "Tutorias de Scripting" qualquer coisa mande me uma pm. Movido. Editado Janeiro 13, 2012 13 anos por skydangerous (veja o histórico de edições) http://baiakuza.com/IP: baiakuza.com TIBIA: 10.96 Baiak Custom [ High Exp Rate ]
Postado Janeiro 20, 2012 13 anos Muito Bom Tutorial APROVADO!! Malvera Otserv Dedicado-24h Hospedado In Usa Utilizando Cliente Proprio Ou Ipchanger (Pode ser Baixado No Site) Supporter Execelente Supporter "In Forum And Game" Eventos Diariamentes Muitas Novidades Para a Melhora Do Server E Muito Mais.... Então? Estar esperando oque? Acesse Já o Malvera Ot , Venha Montar Sua Team , Parar Batalhar Contra Outras Team , Upar Skills ,Leveis,Etc.. Sejá Vip e Ganhe 20% De Exp , Ganhe Vip Set Incluindo Runes , Ganhe Destaque No Nome Ex: [Vip] Malvera ,E Tambem Ganhe Acesso Aos Treiners que Nunca desloga , Entre Muitas Outras Vantagen .. Saiba Mais Sobre as Noticias Do Malvera Já no Site Ip: Malvera IP Site: Malvera Site Otslist: Malvera No Otslist Suporter: Malvera Suporter Forum: Malvera Forum Cliente Download: Malvera Cliente
Postado Fevereiro 22, 2012 13 anos Ola, sou iniciante na area de scripts e achei muito interessante seu tutorial, entao decidi tentar usar de base para os meus npcs mais da esse erro: '>' expected near 'then' Como posso aruma-lo? obrigado
Postado Outubro 14, 2017 7 anos Desculpe reviver o topico, mas como faço para adicionar outra quest no msm npc? tipo "mission 2"
Postado Outubro 14, 2017 7 anos 1 hora atrás, Everson Miranda disse: Desculpe reviver o topico, mas como faço para adicionar outra quest no msm npc? tipo "mission 2" local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if msgcontains(msg, 'mission1') or msgcontains(msg, 'mission 1') then npcHandler:say('TEXT MISSION 1!',cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg, 'mission2') or msgcontains(msg, 'mission 2') then npcHandler:say('TEXT MISSION 2!',cid) npcHandler.topic[cid] = 2 ------------------------------------------------------------------------------------ elseif msgcontains(msg, 'yes') then if npcHandler.topic[cid] == 1 then if getPlayerItemCount(cid, 2559) >= 1 then -- small axe if doPlayerRemoveItem(cid, 2559, 1) then -- small axe doPlayerAddItem(cid, 2553, 1) -- pick npcHandler:say('Splendid! Here, take your pick.', cid) npcHandler.topic[cid] = 0 else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") npcHandler.topic[cid] = 0 end else npcHandler:say('Sorry, I am looking for a small axe.', cid) npcHandler.topic[cid] = 0 end elseif npcHandler.topic[cid] == 2 then if getPlayerItemCount(cid, 2559) >= 1 then -- small axe if doPlayerRemoveItem(cid, 2559, 1) then -- small axe doPlayerAddItem(cid, 2553, 1) -- pick npcHandler:say('Splendid! Here, take your pick.', cid) npcHandler.topic[cid] = 0 else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") npcHandler.topic[cid] = 0 end else npcHandler:say('Sorry, I am looking for a small axe.', cid) npcHandler.topic[cid] = 0 end end elseif(msgcontains(msg, "no") and isInArray({1,2}, npcHandler.topic[cid])) then npcHandler:say("Ok then.", cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Eu uso dessa maneira em meu servidor. Aproveita e dá uma conferida lá OBS: O script foi feito para versão 0.3.7, porém funciona em tfs 1.x
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.