Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''Npc''.



Mais opções de pesquisa

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • A Cidade OTBR
    • OTServ Brasil
    • Atendimento
    • Taverna
  • Projetos Open Source
    • Canary
    • OTServBR-Global
    • Mehah OTClient
    • MyAAC
  • OpenTibia
    • Notícias e Discussões
    • Suporte - Dúvidas, Bugs, Erros
    • Downloads
    • Tutoriais
    • Show-Off
  • Outros
    • Design

Encontrado 21 registros

  1. Programação Accept new coin

    Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo: https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/ https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/ Obs: não delete esse formulário pré-definido, preencha-o corretamente para postar o seu tópico! Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.). Base: OTServBR-Global 12.x Qual é a sua pergunta? Estou procurando uma maneira de adicionar uma nova moeda ao jogo e fazer com que o npc aceite a nova moeda como dinheiro. Tentei editar fontes de um guia que encontrei em outro fórum mas ao comprar algo o npc não detecta a nova moeda como dinheiro, espero e possam me ajudar, estou usando otbr 1.3 12.64 Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
  2. Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.). TFS 1.3 versão 8.6 Base: Global Qual é a sua pergunta? Como resolvo esse problema que da no console: Attempt to call global 'getItemNameById' (a nil value) (como na imagem abaixo) Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
  3. Base: Global 12.51 tfs 1.3 Qual é a sua pergunta? Olá bom dia, se alguém puder me ajudar ficaria muito grato! Porfavor alguém consegue disponibilizar um script de npc que altere PvP do player? Vou explicar, a pessoa cria o char e já chega sendo npvp, portanto na cidade terá um npc em que ele possa se alterar pra pvp, gostaria que o player que não tivesse PvP ficasse com a caveirinha verde do lado do char e o PvP fica normal (podendo pegar caveirinha branca, red, black. Também gostaria se for possível adicionar tempo para pode trocar novamente, tipo 24 horas. Se alguém puder uma luz porfavor, desde já agradeço. Server global 12.51 tfs 1.3 Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
  4. Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.). The OTX Server Version: (2.100 - 6000) - Codename: (FINAL) Versão 7.72 Qual é a sua pergunta? Tenho um npc de task, porém ele deixa fazer as tasks somente uma vez, gostaria de permitir que os players repetissem as tasks, como fazer? Seguem Scripts MOD NPC <?xml version="1.0"?> <npc name="Task" script="data/npc/scripts/simple_task.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="35" head="100" body="116" legs="121" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. Do you want to do a {task}? or {leave} one? you can also {reward} if you finished it! Disponible tasks: Troll, Goblin, Rot, Cyc, Mino, Dragon, GS, Demon, Hero, Vampire, Warlock, Hydra, Behes, Hero King, Ferumbras, Infernus, Master Warlock, BKs and DLs." /> </parameters> </npc> NPC/SCRIPT domodlib('task_func') 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 creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) if isInArray({"task","tasks","missao","mission"}, msg) then npcHandler:say("Me diga o nome do monstro que você deseja fazer a task!", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if tasktabble[msg] then if CheckTask(cid) ~= true then local contagem = getPlayerStorageValue(cid, tasktabble[msg].storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then npcHandler:say('Desculpe, mas você já terminou a task do '..msg, cid) return true end setPlayerStorageValue(cid, tasktabble[msg].storage_start, 1) npcHandler:say("Parabéns, agora você está participando da missão task do "..msg..", falta matar "..string.sub(((contagem)-1)-tasktabble[msg].count, 2).." "..msg, cid) talkState[talkUser] = 0 else npcHandler:say('Desculpe, mas você já faz parte de uma task!', cid) talkState[talkUser] = 0 end else npcHandler:say('digite o nome correto da missão task! para mais informações digite {!task}', cid) talkState[talkUser] = 1 end elseif isInArray({"receber","reward","recompensa","report","reportar"}, msg) then if CheckTask(cid) then for k, v in pairs(tasktabble) do racetype = k if getPlayerStorageValue(cid,v.storage_start) >= 1 then local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then npcHandler:say('você só pode receber os items uma única vez!', cid) return true end if (((contagem)-1) >= v.count) then for _, check in pairs(configbosses_task) do if string.lower(check.race) == string.lower(racetype) then local on = getPlayersOnline() for i=1, #on do if HavePlayerPosition(on[i], check.FromPosToPos[1],check.FromPosToPos[2]) then selfSay('aguarde alguns instantes, tem pessoas fazendo a task.', cid) return true end end doTeleportThing(cid, check.Playerpos) local function checkArea(cid) if not isCreature(cid) then return LUA_ERROR end if HavePlayerPosition(cid, check.FromPosToPos[1],check.FromPosToPos[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end addEvent(checkArea, check.time*60*1000, cid) end end local str = "" if v.exp ~= nil then doPlayerAddExp(cid, v.exp ) str = str.."".. (str == "" and "" or ",") .." "..v.exp.." de exp" end if v.money ~= nil then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ",") ..""..v.money.." gps" end if v.reward ~= nil then doAddItemsFromList(cid,v.reward) str = str.."".. (str == "" and "" or ",") ..""..getItemsFromList(v.reward) end npcHandler:say("Obrigado pela sua ajuda Recompensas: "..(str == "" and "nenhuma" or ""..str.."").." por ter completado a task do "..k, cid) setPlayerStorageValue(cid, v.storage, "Finished") setPlayerStorageValue(cid, v.storage_start, 0) setPlayerStorageValue(cid, 521456, getPlayerStorageValue(cid, 521456) == -1 and 1 or getPlayerStorageValue(cid, 521456)+1) finisheAllTask(cid) else npcHandler:say('Desculpe,mas você só matou '..((contagem)-1)..' de '..v.count..' '..k, cid) end end end else npcHandler:say("você não está em nenhuma missão task", cid) end elseif isInArray({"sair","leave","exit"}, msg) then if CheckTask(cid) then talkState[talkUser] = 2 for k, v in pairs(tasktabble) do if getPlayerStorageValue(cid,v.storage_start) >= 1 then storagesair = v.storage_start local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end npcHandler:say('você está participando de uma missão task do '..k..' e já tem '..((contagem)-1)..' '..k..' mortos, deseja mesmo sair?', cid) end end else npcHandler:say("você não está em nenhuma missão task", cid) end elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then setPlayerStorageValue(cid, storagesair, 0) npcHandler:say("Você foi retirado da task com sucesso!", cid) elseif msg == "no" then selfSay("Tudo bem então", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  5. [PACK] NPC's com preços corrigidos (otservbrglobal)

    Segue a lista de todos os NPC's de runas/potions com preços corrigidos. Lista de NPCs cujo foram corrigidos: em ordem alfabética: Download: Lembrete: Faça um backup de seus NPC's antes de substitui-los.
  6. [Ajuda] NPC Hireling (Trader)

    Olá pessoal, Faz +/- uns 16 anos que parei de mexer com tibia e estou voltando, criei um otserv 12.15, e segui os passos aqui postado pelo "Majesty", já até agradeci, só que está faltando 1 npc - "NPC Hireling (Trader)" - ele não aparece em lugar nenhum só se estiver com outro nome, alguém possui um script desse npc ou alguém sabe como colocar ele no Store para comprar? Já procurei aqui e em todo os sites de pesquisa e não achei nenhum script para colocar esse npc, como eu segui perfeitamente todos os passos daqui achei que ele estaria incluso. Obs:
  7. Scripting TFS 1.2 Npc Aldo

    Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo: https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/ https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/ Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.). Base: The Forgotten Server 1.2, Versão: 10.98. Qual é a sua pergunta? Alguém sabe por que esse erro está acontecendo quando eu compro um item deste npc? Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: Os aquivos são estes que uso. Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
  8. Scripting NPC não responde

    Olá comunidade, tenho um problema "um pouco grave a ser resolvido", meus npcs que estão abaixo do quarto andar não me respondem, mesmo usando a lib original do otx2 eu percebi que npcs sumonados e/ou npcs abaixo do quarto andar nao respondem. eu ja tentei de tudo mas n consigo. alguem tem ideia do que poderia ser? eu uso otx2 original baixei recentemente do github, e esse problema é persistente. pensei em alguma função do npc.lua ja testei com xml. lua. tudo e nada deu. o problema ta na configuração do proprio otx2.
  9. NPC que vende informação

    Dale! suave? deixo aqui um npc que fiz agora para meu servidor... Como fala no titulo, ele cobra uma certa quantia de dinheiro ou item, para dar uma informação, só configure certinho. É bem simples mas pode ajudar alguém Lembrando que está testado e funcionando 100% Vá em data/npc e crie um arquivo XML com o nome info e cole isso dentro... Salve e feche... Agora em data/npc/scripts crie um arquivo LUA com o nome info e cole dentro... Bom, é só isso espero ajudar alguém, se ajudei deixa o REP! Aí pra fortalecer a amizade LEMBRANDO QUE DENTO DO ARQUIVO ESTÁ A EXPLICAÇÃO.
  10. Olá gostaria de pedir a ajuda de você com um script, para ExtremeOT 7.6 XML, o server fica meio salaga as vezes por ter muito lixo no chão e estou querendo bolar um sistema de auto clean, e como não tenho as sources não consigo fazer, porem estive pensando e tenho um NPC que tem accesso de GOD e ele faz anuncios no /B eu gostaria que ele fizes esse anuncio "Clean map em 1 min, guarde seus itens", "clean map em 30 segundos, guarde seus itens" isso a cada umas 4 horas mais ou menos e logo em seguida mande o comando /clean. O script ja esta pronto porem ele fala de maneira aleatoria por um tempo que eu especifiquei, gostaria que alguem me ajudasse a editar esse script para o que eu citei acima script que eu tenho é esse:
  11. Scripting BUG NPCS BLESS.

    bom dia alguem pode me ajudar to usando a bless no ot igual a global mais to com problema nas script dos npc SOMENTE O NPC DE CARLIN VENDE CERTO A BLESS O RESTANTE PARA NA MSG ABAIXO. DEPOIS DO YES ELE NAO FALA MAIS NADA NEM VENDE A BLESS TODOS OS OUTROS TAO ASIM SOMENTE CARLIN FUNCIONA CERTO. 12:15 Edala: Welcome, noble Caue. I can provide you with bless. 12:15 Caue [8]: bless 12:15 Edala: I can bless you with The Fire of the Suns or third bless 12:15 Caue [8]: fire of the suns 12:15 Edala: Here on the Suntower you may receive the blessing The Fire of The Suns. But we must ask of you to sacrifice 2000 gold. Are you still interested? 12:15 Caue [8]: yes
  12. Sistema Cleaner NPC

    Olá pessoas. Tenho aqui um sistema de NPC que limpa o chão. Simples. Fiz um update nele e agora o sistema automaticamente cria o arquivo do NPC para você. Scripts: data/lib/cleaner_npc_lib.lua: data/talkactions/scripts/cleaner_npc.lua: data/talkactions/talkactions.xml: <talkaction log="yes" access="5" words="/cleaner" script="cleaner_npc.lua"/> Configurações: Comandos: /cleaner create -- Cria o NPC /cleaner remove -- Remove o NPC Bom uso, até.
  13. npc The Merchant - O viajante

    É um NPC que vende itens ( que você configurou ) mas de forma que o comprador tenha que esperar um tempo pra chegar a encomenda! Isto é útil em servers onde o RPG é prioridade. Instalação Crie um arquivo: data/npc/Merchant.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="The Merchant" script="merchant.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/> <parameters> </parameters> </npc> Crie um arquivo: data/npc/scripts/merchant.lua --// Creditos: Rômulo Souza (Criação) Longhart (Ideia e Tradução) local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local name --// Config Here// local min_hour = 2 -- Min hour of wait local max_hour = 12 -- Max hour of wait local items = {['katana']={itemid=2412, cust=100}, ['naginata']={itemid=2426, cust=200}} -- Items to Sell local config_str = {s_itemid=4251, s_comming=4241} -- Storage ( Dont change if you dont know ) --/////////////// function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) selfSay("Hey! Hey! I got some good stuff for you, come here!",cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'hi') or msgcontains(msg, 'hello')) then if (getPlayerStorageValue(cid,config_str.s_comming) ~= -1) then local itemid = getPlayerStorageValue(cid,config_str.s_itemid) local time = getPlayerStorageValue(cid,config_str.s_comming) if (getPlayerStorageValue(cid,config_str.s_comming) <= os.time()) then selfSay('Hello! Your '..getItemNameById(itemid)..' is ready! You want get it now?', cid) talkState[talkUser] = 3 else min = math.floor((time-os.time())/60) hours = math.floor((time-os.time())/60/60) selfSay('Your '..getItemNameById(itemid)..' will take '.. min..' minutes (~'..hours..' hours) to come for me.', cid) end else local str = '' local cont = 1 for name,tab in pairs(items) do str = str.. name.. (cont >= count(items) and '.' or ',') cont = cont+1 end selfSay('Hello, i can bring some kind of itens for you, just say what you want. Items: '..str, cid) talkState[talkUser] = 1 end elseif (talkState[talkUser] == 1 and msg ~='bye') then if (items[msg] ~= nil) then selfSay('You want to request the '..msg..'? it will cost '..items[msg].cust..' gold coins, are you sure?', cid) talkState[talkUser] = 2 name = msg else selfSay('I\'m not selling the '..msg..'!', cid) talkState[talkUser] = 1 end elseif(msgcontains(msg, 'no') and talkState[talkUser] == 2) then selfSay("Don\'t worry, i can bring this anytime you want.",cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and isInArray({2,3}, talkState[talkUser])) then if (talkState[talkUser] == 2) then if (doPlayerRemoveMoney(cid,items[name].cust)) then hours = doStorage(cid, items[name].itemid) selfSay('Thanks for requesting '..name..', it will take '..hours..' hours before come.', cid) talkState[talkUser] = 0 else selfSay('You don\'t have enough money, you need '.. items[name].cust..' gold coins.', cid) talkState[talkUser] = 1 end elseif (talkState[talkUser] == 3) then local itemid = getPlayerStorageValue(cid,config_str.s_itemid) selfSay('Here you are, come back again!.', cid) doPlayerAddItem(cid,itemid,1) setPlayerStorageValue(cid,config_str.s_itemid,-1) setPlayerStorageValue(cid,config_str.s_comming,-1) talkState[talkUser] = 0 end end return true end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) function doStorage(cid,itemid) str = getPlayerStorageValue(cid,config_str.s_comming) hours = math.random(min_hour,max_hour) local time = (os.time())+(1*60*60*hours) setPlayerStorageValue(cid,config_str.s_itemid,itemid) setPlayerStorageValue(cid,config_str.s_comming,time) return hours end function count(t) sum = 0 for k,v in pairs(t) do sum = sum + 1 end return sum end Outras Informações Este Script faz parte de um futuro projeto OpenSource que visa criar NPCS, Quests, Mapas, e Sistemas sempre inovadores. E estimular o desenvolvimento livre de otservers. Faça sua sugestão! Mais Trabalhos realizados em prol do Projeto: ShowOff do Mapa
  14. Jocker - Blackjack : NPC de Jogos

    Depois de algum tempo sem postar scripts... Bem, quem presta um pouco de atenção nos posts de NPC e te uma boa memória, deve se lembrar do Master of Games, que jogava par ou ímpar e jogo da velha, nada muito interessante. O Jocker é um Master of Games aprimorado, entretanto, não utilizo os jogos anteriores. O sistema está bem mais fácil de edição para scripters quanto a adição de novos jogos. Vantagens: - Sistema de fácil adição de novos jogos. - Código limpo. - Padrão fácil de ser estabelecido. - Possibilidade de uso das bibliotecas, com poucas edições para outros sistemas. Para a Próxima Versão: - Adição do jogo da forca. http://forums.otserv.com.br/showthread.php?82140-8.4-NPC-de-forca Vamos lá: XML: npc/jocker.xml [spoiler=jocker.xml] <?xml version="1.0" encoding="UTF-8"?> <npc name="Jocker" nameDescription="Jocker of casino." script="data/npc/scripts/jocker.lua" walkinterval="1500" floorchange="0"> <health now="150" max="150"/> <look type="132" head="150" body="80" legs="150" feet="76" addons="3" corpse="2212"/> </npc> XML Script: npc/scripts/jocker.lua [spoiler=jocker.lua] -- Loading special Jocker functions dofile(getDataDir() .. 'npc/lib/jocker.lua') local words = { start = { "hi" }, finish = { "bye" } } local mbet = 100 local messages = { start = "Hello, i'm a joker. ", finish = "Good bye...", games = "Choose your game: ", bet = "Place your bet, the minumum is " .. mbet ..".", play = "Lets play!", win = "Congratulations, you won the game!", draw = "Draw...", lose = "Sorry, you lost. Try again later.", random = { "Time to JOKE!", "Psiu", "Come on, place your bets!" } } local games = { { name = "blackjack", func = blackjack, rules = "Rules:\nGet 21 points\nYou may get cards" } } for all = 1, #games do messages.games = messages.games .. '{' .. games[all].name .. '}' if all > 1 then messages.games = messages.games .. ", " end end messages.games = messages.games .. "." local focus = {} function onCreatureSay(cid, typ, msg) if (getDistanceTo(cid) > 6) then return false; end if ( not getFocus(cid, focus) and getText(msg, words.start) ) then selfSay(messages.start, cid) addFocus(cid, focus) elseif ( getFocus(cid, focus) ~= false and getText(msg, words.finish) ) then selfSay(messages.finish, cid) removeFocus(cid, focus) elseif ( not getFocus(cid, focus) ) then return false end if focus[ getFocus(cid, focus) ].status == STATUS.reload then if msgcontains(msg, "yes") then focus[ getFocus(cid, focus) ].status = STATUS.continue doPlayerRemoveMoney(cid, focus[ getFocus(cid, focus) ].bet) elseif msgcontains(msg, "no") then focus[ getFocus(cid, focus) ].status = 0 else selfSay("Answer: {yes}, {no}", cid) return true end end if focus[ getFocus(cid, focus) ].status == 0 then for all = 1, #games do if msgcontains(msg, games[all].name) then selfSay("Select the level of game {1...inf}. How great, better is your prize.", cid) focus[ getFocus(cid, focus) ].game = all focus[ getFocus(cid, focus) ].status = STATUS.level return true end end selfSay(messages.games, cid) return true end if focus[ getFocus(cid, focus) ].status == STATUS.level then focus[ getFocus(cid, focus) ].level = getNumber( msg, {1} ) selfSay("Your level is: {" .. focus[ getFocus(cid, focus) ].level .. "}. " .. messages.bet, cid) focus[ getFocus(cid, focus) ].status = STATUS.bet return true end if focus[ getFocus(cid, focus) ].status == STATUS.bet then focus[ getFocus(cid, focus) ].bet = getNumber( msg, {mbet} ) selfSay("Your bet is: {" .. focus[ getFocus(cid, focus) ].bet .. "}, wish continue? Answer: {yes}, {no}.", cid) focus[ getFocus(cid, focus) ].status = STATUS.checkbet return true end if focus[ getFocus(cid, focus) ].status == STATUS.checkbet then if msgcontains(msg, "no") then focus[ getFocus(cid, focus) ].status = STATUS.bet selfSay(messages.bet, cid) return true elseif msgcontains(msg, "yes") then focus[ getFocus(cid, focus) ].status = STATUS.continue selfSay(messages.play, cid) doPlayerRemoveMoney(cid, focus[ getFocus(cid, focus) ].bet) else selfSay("Answer: {yes}, {no}.", cid) return true end end if ( focus[ getFocus(cid, focus) ].game ~= 0 ) then focus[ getFocus(cid, focus) ].status = games[ focus[ getFocus(cid, focus) ].game ].func(focus[ getFocus(cid, focus) ], msg) local f_status = focus[ getFocus(cid, focus) ].status local prize = games[ focus[ getFocus(cid, focus) ].game ].func(focus[ getFocus(cid, focus) ], 0) doPlayerAddMoney(cid, prize) if f_status == STATUS.lose then selfSay(messages.lose, cid) elseif f_status == STATUS.draw then selfSay(messages.draw .. ". But you got " .. prize .. " of money.", cid) elseif f_status == STATUS.win then selfSay(messages.win .. ". You got " .. prize .. " of money!", cid) doSendMagicEffect(getCreaturePosition(cid), 13) end if f_status ~= STATUS.continue then focus[ getFocus(cid, focus) ].status = STATUS.reload focus[ getFocus(cid, focus) ].values = {} selfSay("Wanna continue with game/level/bet? Answer: {yes}, {no}.", cid) end end return true; end function onThink() for all = 1, #focus do if( not isCreature(focus[all].id) ) then removeFocus(focus[all].id, focus) else distance = getDistanceTo(focus[all].id) or -1 if( (distance > 6) or (distance == -1) ) then selfSay(messages.finish, focus[all].id) removeFocus(focus[all].id, focus) end end end local rand = math.random(1, 600) if (rand <= #messages.random) then selfSay( messages.random[rand] ) end end Jocker lib: npc/lib/jocker.lua [spoiler=jocker.lua] -- Include the Advanced NPC System dofile(getDataDir() .. 'npc/lib/npcsystem/npcsystem.lua') -- Loading Blackjack dofile(getDataDir() .. 'npc/lib/blackjack.lua') STATUS = { level = 1, lose = 2, draw = 3, win = 4, continue = 5, reload = 6, bet = 7, checkbet = 8 } function getFocusData(cid) return { id = cid, status = 0, game = 0, level = 0, bet = 0, values = {} } end function getFocus(cid, f_table) for all = 1, #f_table do if(f_table[all].id == cid) then return all end end return false end function addFocus(cid, f_table) if( not getFocus(cid, f_table) ) then table.insert(f_table, getFocusData(cid)) end end function removeFocus(cid, f_table) for all = 1, #f_table do if (f_table[all].id == cid) then table.remove(f_table, i) break end end end Blackjack lib: npc/lib/blackjack.lua [spoiler=blackjack.lua] dofile(getDataDir() .. 'npc/lib/npc.lua') local function getValue(number) while number > 13 do number = number - 13 end return number end local function getSuit(number) local ret = 1 while number > 13 do number = number - 13 ret = ret + 1 end return ret end local function getName(number) local msg = "" local tmp = getValue(number) if (tmp == 1) then msg = "Ace" elseif (tmp == 11) then msg = "Jack" elseif (tmp == 12) then msg = "Queen" elseif (tmp == 13) then msg = "King" else msg = tmp end msg = msg .. " of " tmp = getSuit(number) if (tmp == 1) then msg = msg .. "Spade" elseif (tmp == 2) then msg = msg .. "Heart" elseif (tmp == 3) then msg = msg .. "Diamond" else msg = msg .. "Club" end return msg end local function getTotal(data) local total = 0 local ace = false for all = 1, #data.values do if getValue( data.values[all] ) == 1 then ace = true end total = total + getValue( data.values[all] ) end if ace and total <= 11 then return { total, total + 10 } end return {total} end local function addCard(data, number) table.insert(data.values, number) selfSay("You got a card: " .. getName( number ) .. ".", data.id) end local function addRandomCard(data) local rand local lower = math.huge for all = 0, data.level * 2 do rand = math.random(1, 52) if getTotal(data)[1] + getValue(rand) > 21 then lower = rand break elseif getTotal(data)[1] + getValue(rand) < lower + getTotal(data)[1] and getValue(rand) ~= 1 then lower = rand end end if lower == math.huge then lower = 1 end addCard(data, lower) end function blackjack(data, msg) if type(msg) == "number" then if data.status == STATUS.win then return data.bet * data.level * 1.5 elseif data.status == STATUS.draw then return data.bet * data.level * 0.85 else return 0 end end local stop = false if #data.values == 0 then addRandomCard(data) addRandomCard(data) elseif msgcontains(msg, "yes") then addRandomCard(data) elseif msgcontains(msg, "no") then stop = true end local total = getTotal(data) if #total == 2 then selfSay("You got " .. total[1] .. "/" .. total[2] .. " points.", data.id) else selfSay("You got " .. total[1] .. " points.", data.id) end total = total[#total] if total == 21 then stop = true elseif total < 21 and not stop then selfSay("Wanna get annother card? Answer: {yes}, {no}.", data.id) elseif total > 21 then return STATUS.lose end if stop == true then local best = math.random(1, 21) local rand for all = 1, data.level * 3 do rand = math.random(1, 33) if best < rand and rand <= 21 then best = rand end end selfSay("I got " .. best .. " points.", data.id) if best > total then return STATUS.lose elseif best == total then return STATUS.draw else return STATUS.win end end return STATUS.continue end Configuração Os textos estão em inglês e não se referem a qualquer servidor ou especificidade, caso ainda sim necessite alterar as mensagens para exibição e outros valores, todos estão no arquivo npc/scripts/jocker.lua, sendo que mbet é a aposta mínima. A parte citada é a seguinte: [spoiler=Configuração] local words = { start = { "hi" }, finish = { "bye" } } local mbet = 100 local messages = { start = "Hello, i'm a joker. ", finish = "Good bye...", games = "Choose your game: ", bet = "Place your bet, the minumum is " .. mbet ..".", play = "Lets play!", win = "Congratulations, you won the game!", draw = "Draw...", lose = "Sorry, you lost. Try again later.", random = { "Time to JOKE!", "Psiu", "Come on, place your bets!" } } Edição: Caso você queira adicionar novos jogos, é simples, em games adicione as informações como foi feito com o blackjack e observe como é feito o blackjack no arquivo npc/lib/blackjack.lua. [spoiler=games] local games = { { name = "blackjack", func = blackjack, rules = "Rules:\nGet 21 points\nYou may get cards" } } Edit: O jogo é programado para o usuário perder, quanto maior o nível do jogo, maior o prêmio, mas maior a dificuldade de ganhar. Espero que gostem, se gostarem acessem o link abaixo \/ (na minha assinatura) e comente. ( GCoders ) Atenciosamente, Pedro Silva Moreira - PeJuGe.
  15. Gary - Comprador de Colecionáveis

    Bom vamos ao principal: Na Pasta Data/npc crie um arquivo com nome de Gary.xml, dentro deste arquivo coloque o seguinte: Legendas: Vermelho: Nome do NPC Verde: Outfit que ele esta usando (neste caso, Pirate) Azul: Mensagem que ele diz após o Player falar Hi. Feito isso, vamos abrir a pasta Data/npc/scripts lá dentro iremos criar um arquivo com nome de buyer.lua. Abra este arquivo e dentro dele vamos por: Legendas: Vermelho: Nome do Item Verde: ID do Item (pode ser verificado em Data/items/items.xml) Azul: Preço de venda ou compra do item Roxo: modo de venda (se for addSellableItem o NPC compra do Player, se for addbuyableItem, o NPC vende para o Player) Esse NPC se encaixa melhor nos Server de RPG ou Fun. Mas pode ser usado tambem em Server de War ou aqueles apelao mesmo, para conseguir uma graninha extra. :yes:
  16. Sistema de Radio !!!

    Ai galera eu queria saber se alguem poderia fazer para mim e se é possivel : Eu queria um npc que quando o player disse exemplo : Player : hi NPC : Olá, o que deseja anunciar ? Player : Gostaria de comprar runas feitinhas na hora ? Vem para lojinha do (player), faço na hora, preço baratinho !!!, 5. Explicando : Frase, 5 <<< tempo que o NPC vai ficar falando... Tipo ai o NPC desse 1 preço pro player ai o player fala se aceita ou não... vamos supor cada letra 10 gps, ai o npc somava tudo e falava o preço : NPC : Isso dá o total de : .... , voce concorda em pagar ? Player : Sim. NPC : Sua mensagem será anunciada de 5 em 5 minutos. Ai ficava anunciando a mensagem de 5 em 5 minutos até o servidor fechar. Também podia ser por algum tempo estimado exemplo : Player : [color=Red]Gostaria de comprar runas feitinhas na hora ? Vem para lojinha do (player), faço na hora, preço baratinho !!![/color], [color=Lime]5[/color], [color=Navy]3 vezes[/color]. Vermelho : Mensagem que aparecerá no BroadCast. Verde : De quanto em quanto tempo vai aparecer. Azul : Quantas vezes. Ai o NPC calculava e fazia o que eu disse acima. Se der pra fazer me avise... Se alguem fizer, por favor me passe o script ? E claro disponibilize para todo munfo !!!
  17. [Sprite] Monstros em Perspectiva

    Este tutorial serve basicamente para ensinar a criar uma linha basica para um monstro em perspectiva, a partir de nenhum ponto, sendo possivel criar um monstro que nem se quer exista. Programas Necessarios Paint ou Photoshop (Preferencialmente) 0. Procure (tenha em mãos) uma imagem de referência (este passo pode ser opcional) Nota: Este passo pode ser opcional, más é necessário ser muito muito bom. O melhor para isso é ir no google, o pai das respostas. Você deve ter em mente o que irá fazer. A maioria das idéias de monstros podem surgir a partir de outros jogos. Então procure uma boa foto boa do seu monstro em que mostre bem sua anatomia. O monstro que eu irei usar é uma aranha chamada Mad Slasher. 1. Começamos aplicando uma forma bem grosseira do corpo. Você vera que pelo corpo ser uma bola, as coisas se tornam mais faceis. 9. Bom essa parte é unica agora para cada um. Desenhe agora todos os detalhes, sombras, luzes e o que mais você quizer e pronto seu monstro ja está pronto. Literalmente para fazer esse tutorial não foi tão necessario a palavra, o essencial aqui mesmo é mostra o que deve ser fazer. Boa sorte ae galera. Qualquer coisa só berraaa... Original: Hunter Killer (Otfans) Tradução: Caldiii_
  18. [8.1]Npc que enxe seu pote de health

    Você fala com o npc: -hi ->Voce quer que eu encha seu pote de health por 50 gps? -encher ->Ai está seu pote cheio =] Aqui vai um tutorial esplicando como fazê-lo ok? PRIMEIRO crie um documento de texto na área de trabalho, renomeando-o para Enche Health.xml e coloque isto dentro dele: <?xml version="1.0"?> <npc name="Enche Health" script="data/npc/scripts/encheh.lua" access="1" lookdir="2"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="133" head="78" body="88" legs="0" feet="88"/> </npc> pronto, primeiro passo cumprido! SEGUNDO Agora abra outro documento de texto renomeando para encheh.lua e coloque isto dentro dele: 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(npcHandler.focus ~= cid) then return false end if msgcontains(msg, 'health potion') or msgcontains(msg, 'encher') then selfSay('Voce quer que eu encha seu pote de health por 50 gps?') talk_state = 1 elseif msgcontains(msg, 'yes') and talk_state == 1 then if getPlayerItemCount(cid,7636,1) >= 1 and getPlayerItemCount(cid,2148,50) >= 1 then if doPlayerTakeItem(cid,7636,1) and doPlayerTakeItem(cid,2148,50) == 0 then selfSay('Ai Esta Seu pote cheio =]') doPlayerAddItem(cid,7618,1) end else selfSay('Desculpe Voce Nao Tem os itens precisos.') end elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then selfSay('Ok Ate Mais.') talk_state = 0 end -- 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()) Pronto! agora é só adicionar ele no seu map editor assim: vá na pasta do map editor e abra o creatures.xml e adicione isto na lista! <creature looktype="133" name="Enche Health" head="78" body="88" legs="0" feet="88" type="npc"/> aew! agora é só colocar ele no seu mapa pelo map editor Obs: esse npc substitui o pote vazio pelo pote cheio, pegando a sua grana, intão voce pode usar isso pra fazer outros itens serem substituidos!! Creditos:Apenas Eu =]
  19. NPC Varkhal cmo cada addon por um valor

    Primeiramente gostaria de dizer que esse é o meu primeiro Post..caso haja algum erro avise por favor!! ------------------------------- Nome: Varkhal-Addons Separados-Por Dinheiro Versão: 8.4 Tipo do script: NPC Autor: Rastaman ------------------------------- Este NPC q estou postando é uma inovação de Addon Seller.. Eu tive varios Ots e sempre quis um esquema de addons novo.. intao hoje msm decidi inovar..achei um Varkhal com addons por itens e quis mudar[pq n era tds os addons q dropavam nos bixos dos meus ots] Ai eu pensei.."nunca vi nenhum Varkhal que vendesse cada addon por dinheiro..." Intao decidir fazer um!! Aqui segue o script: Se você testar, os addon estarão com um preço padrão (500k first e 1kk second). Bom, agora você quer decidir a quantia de cada addon né? É bem facinhoo, pois 'um pouquinho chato' A parte rosa diz a quantia que o npc ira exigir. A parte vermelha diz a quantia que será retirada do player quando ele falar yes. Ex. Second Yalaharian - 1kk -> elseif msgcontains(msg, 'yalaharian segundo') then selfSay('Você tem os 1kk necessarios para conseguir o addon?') Você terá de trocar o 1kk pelo valor desejado, e em seguida -> elseif talk_state == 42 then if msgcontains(msg, 'yes') then item1 = doPlayerRemoveMoney(cid,1000000) Você terá de trocar o 1000000 pelo valor de golds desejado. Para Adiciona-lo ? Mais facil ainda ! Vá na pasta do OT em data/npc/scripts e lá localize o documento addon.lua e la dentro apague td e copie o quote acima Para comprar os addons in game? É 'baba' ! Fale Hi para o npc e com ele fale por exemplo:beggar primeiro ou intão yalaharian segundo e fale yes..pronto..addon comprado.. Erros por favor msg me!! Creditos: 50%Lunatic[kem me passou o NPC q vende por itens] 50%Eu[que mudei tdos os itens para os preços nele contido] Obrigado pela atenção :style: ~Rastaman !
  20. Oque é um npc?

    NPC's Oque são? Npc = Non playable character O Tibia e a maioria dos RPGS,MMORPGS,etc.. São games que nessecitam de um Non playable character. Pra que servem os NPC's? Os NPC's são como players... Cada NPC tem seu tipo: Existem muitos tipos de NPC's .. Os mais importantes são os acima. São os que todo jogador de Tibia deve saber Como usar 1 NPC: Cada npc tem sua função básica como eu disse acima..Vender,comprar,trocar, etc.. Comandos basicos para contato com NPC's: Algumas screens de NPC's: No Tibia existem Milhares de NPC's intão vou postar só esses msm :cry: Bem.. Agora vou sair (Y) Estuda pra prova de recuperação ¬¬'
  21. Npc Mordomo :D

    Ae galera !! To postando o meu 1º tópico, eu mesmo fiz esse NPC. Se ja existe um npc assim. plx apague. Procurei pelo site e n axei um npc assim. É o Npc Mordomo. ele vende tudo de graça, aol, bp de varias cores, runas, wands, rods, potions..... xega de papo. vamos ao script. --NPC Mordomo by MarcelloC2-- local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Adeus!') 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) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Olá ' .. creatureGetName(cid) .. '! Sou um mordomo. E so vc pedir que eu dou! Aol, Bps, Runes, Wands, Rods, Potions, Kits de Ksa .') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. creatureGetName(cid) .. '! Falo com vc em um minuto.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'wooden chair') then buy(cid,3901,getCount(msg),0) elseif msgcontains(msg, 'sofa chair') then buy(cid,3902,getCount(msg),0) elseif msgcontains(msg, 'red cushioned chair') then buy(cid,3903,getCount(msg),0) elseif msgcontains(msg, 'green cushioned chair') then buy(cid,3904,getCount(msg),0) elseif msgcontains(msg, 'tusk chair') then buy(cid,3905,getCount(msg),0) elseif msgcontains(msg, 'ivory chair') then buy(cid,3906,getCount(msg),0) elseif msgcontains(msg, 'chairs') then selfSay('Cadeiras? Tenho: wooden, sofa, red cushioned, green cushioned, tusk and ivory chairs.') elseif msgcontains(msg, 'big table') then buy(cid,3909,getCount(msg),0) elseif msgcontains(msg, 'square table') then buy(cid,3910,getCount(msg),0) elseif msgcontains(msg, 'round table') then buy(cid,3911,getCount(msg),0) elseif msgcontains(msg, 'small table') then buy(cid,3912,getCount(msg),0) elseif msgcontains(msg, 'stone table') then buy(cid,3913,getCount(msg),0) elseif msgcontains(msg, 'tusk table') then buy(cid,3914,getCount(msg),0) elseif msgcontains(msg, 'bamboo table') then buy(cid,3919,getCount(msg),0) elseif msgcontains(msg, 'tables') then selfSay('Mesas? Tenho: big, square, round, small, stone, tusk, bamboo tables.') elseif msgcontains(msg, 'pink flower') then buy(cid,3928,getCount(msg),0) elseif msgcontains(msg, 'green flower') then buy(cid,3929,getCount(msg),0) elseif msgcontains(msg, 'christmas tree') then buy(cid,3931,getCount(msg),0) elseif msgcontains(msg, 'plants') then selfSay('Flores? Tenho: pink and green flowers, also christmas trees.') elseif msgcontains(msg, 'large trunk') then buy(cid,3938,getCount(msg),0) elseif msgcontains(msg, 'drawer') then buy(cid,3921,getCount(msg),0) elseif msgcontains(msg, 'dresser') then buy(cid,3932,getCount(msg),0) elseif msgcontains(msg, 'locker') then buy(cid,3934,getCount(msg),0) elseif msgcontains(msg, 'trough') then buy(cid,3935,getCount(msg),0) elseif msgcontains(msg, 'box') then buy(cid,3915,getCount(msg),0) elseif msgcontains(msg, 'containers') then selfSay('Containers? Tenho: large trunks, boxes, drawers, dressers, lockers and troughs.') elseif msgcontains(msg, 'coal basin') then buy(cid,3908,getCount(msg),0) elseif msgcontains(msg, 'birdcage') then buy(cid,3918,getCount(msg),0) elseif msgcontains(msg, 'harp') then buy(cid,3917,getCount(msg),0) elseif msgcontains(msg, 'piano') then buy(cid,3926,getCount(msg),0) elseif msgcontains(msg, 'globe') then buy(cid,3927,getCount(msg),0) elseif msgcontains(msg, 'clock') then buy(cid,3933,getCount(msg),0) elseif msgcontains(msg, 'lamp') then buy(cid,3937,getCount(msg),0) elseif msgcontains(msg, 'more') then selfSay('Mais? Tenho: coal basins, birdcages, harps, pianos, globes, clocks and lamps.') elseif msgcontains(msg, 'blue tapestry') then buy(cid,1872,getCount(msg),0) elseif msgcontains(msg, 'green tapestry') then buy(cid,1860,getCount(msg),0) elseif msgcontains(msg, 'orange tapestry') then buy(cid,1866,getCount(msg),0) elseif msgcontains(msg, 'pink tapestry') then buy(cid,1857,getCount(msg),0) elseif msgcontains(msg, 'red tapestry') then buy(cid,1869,getCount(msg),0) elseif msgcontains(msg, 'white tapestry') then buy(cid,1880,getCount(msg),0) elseif msgcontains(msg, 'yellow tapestry') then buy(cid,1863,getCount(msg),0) elseif msgcontains(msg, 'tapestry') or msgcontains(msg, 'tapestries') then selfSay('Tapestries? Tenho: blue, green, orange, pink, red, white and yellow tapestry.') elseif msgcontains(msg, 'small purple pillow') then buy(cid,1678,getCount(msg),0) elseif msgcontains(msg, 'small green pillow') then buy(cid,1679,getCount(msg),0) elseif msgcontains(msg, 'small red pillow') then buy(cid,1680,getCount(msg),0) elseif msgcontains(msg, 'small blue pillow') then buy(cid,1681,getCount(msg),0) elseif msgcontains(msg, 'small orange pillow') then buy(cid,1682,getCount(msg),0) elseif msgcontains(msg, 'small turquiose pillow') then buy(cid,1683,getCount(msg),0) elseif msgcontains(msg, 'small white pillow') then buy(cid,1684,getCount(msg),0) elseif msgcontains(msg, 'heart pillow') then buy(cid,1685,getCount(msg),0) elseif msgcontains(msg, 'blue pillow') then buy(cid,1686,getCount(msg),0) elseif msgcontains(msg, 'red pillow') then buy(cid,1687,getCount(msg),0) elseif msgcontains(msg, 'green pillow') then buy(cid,1688,getCount(msg),0) elseif msgcontains(msg, 'yellow pillow') then buy(cid,1689,getCount(msg),0) elseif msgcontains(msg, 'round blue pillow') then buy(cid,1690,getCount(msg),0) elseif msgcontains(msg, 'round red pillow') then buy(cid,1691,getCount(msg),0) elseif msgcontains(msg, 'round purple pillow') then buy(cid,1692,getCount(msg),0) elseif msgcontains(msg, 'round turquiose pillow') then buy(cid,1693,getCount(msg),0) elseif msgcontains(msg, 'small') then selfSay('Pekenos? Tenho: small purple, small green, small red, small blue, small orange, small turquiose and small white pillows.') elseif msgcontains(msg, 'round') then selfSay('Redondos? Tenho: round blue, round red, round purple and round turquiose pillows.') elseif msgcontains(msg, 'square') then selfSay('Quadrados? Tenho: blue, red, green and yellow pillows.') elseif msgcontains(msg, 'pillows') then selfSay('Traviseiros? Tenho: heart, small, sqare and round pillows.') end if msgcontains(msg, 'backpacks') then selfSay('Tenho a verde, azul, amarela, vermelha, cinza, beggy, fur, pirate, old, tiquanda, star backpack).') elseif msgcontains(msg, 'potions') then selfSay('Tenho, strong health potion (lv 80 Knight and Pally), strong mana potion (lv 50 Druid, Paladin and Sorcerer) great mana potion (Sorcerer and Druid) , great health potion (Knight and Druid lv 80.') elseif msgcontains(msg, 'wands') then selfSay('Tenho, wand of inferno , plague , cosmic energy , vortex and dragonbreath.') elseif msgcontains(msg, 'rods') then selfSay('Tenho, quagmire, snakebite, tempest, volcanic and moonlight rod.') elseif msgcontains(msg, 'verde backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,1998,count,0) end elseif msgcontains(msg, 'azul backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,2002,count,0) end elseif msgcontains(msg, 'vermelha backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,200,count,0) end elseif msgcontains(msg, 'amarela backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,2004,count,0) end elseif msgcontains(msg, 'beggy backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,1999,count,0) end elseif msgcontains(msg, 'cinza backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,2003,count,0) end elseif msgcontains(msg, 'star backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,5949,count,0) end elseif msgcontains(msg, 'tiquanda backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,3940,count,0) end elseif msgcontains(msg, 'pirata backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,5926,count,0) end elseif msgcontains(msg, 'fur backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,7342,count,0) end elseif msgcontains(msg, 'old backpack') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,2365,count,0) end elseif msgcontains(msg, 'shovel') then buy(cid,2554,getCount(msg),0) elseif msgcontains(msg, 'backpack') then buy(cid,1988,getCount(msg),0) elseif msgcontains(msg, 'aol') then buy(cid,2173,getCount(msg),0) elseif msgcontains(msg, 'inferno') then count = getCount(msg) if count == 0 then selfSay('0 wand of inferno? LOL?') talk_start = os.clock() else buy(cid,2187,count,0) end elseif msgcontains(msg, 'plague') then count = getCount(msg) if count == 0 then selfSay('0 wand of plague? LOL?') talk_start = os.clock() else buy(cid,2188,count,0) end elseif msgcontains(msg, 'cosmic energy') then count = getCount(msg) if count == 0 then selfSay('0 wand of cosmic energy? LOL?') talk_start = os.clock() else buy(cid,2189,count,0) end elseif msgcontains(msg, 'vortex') then count = getCount(msg) if count == 0 then selfSay('0 wand of vortex? LOL?') talk_start = os.clock() else buy(cid,2190,count,0) end elseif msgcontains(msg, 'dragonbreath') then count = getCount(msg) if count == 0 then selfSay('0 Wand of Dragonbreath? LOL?') talk_start = os.clock() else buy(cid,2191,count,0) end -- fim da venda de wands =) -- inicio da venda de rods =) elseif msgcontains(msg, 'quagmire') then count = getCount(msg) if count == 0 then selfSay('0 Quagmire Rod? LOL?') talk_start = os.clock() else buy(cid,2181,count,0) end elseif msgcontains(msg, 'snakebite') then count = getCount(msg) if count == 0 then selfSay('0 Snakebite Rod? LOL?') talk_start = os.clock() else buy(cid,2182,count,0) end elseif msgcontains(msg, 'tempest') then count = getCount(msg) if count == 0 then selfSay('0 Tempest Rod? LOL?') talk_start = os.clock() else buy(cid,2183,count,0) end elseif msgcontains(msg, 'volcanic') then count = getCount(msg) if count == 0 then selfSay('0 Volcanic Rod? LOL?') talk_start = os.clock() else buy(cid,2185,count,0) end elseif msgcontains(msg, 'moonlight') then count = getCount(msg) if count == 0 then selfSay('0 Moonlight Rod? LOL?') talk_start = os.clock() else buy(cid,2186,count,0) end elseif msgcontains(msg, 'strong health potion') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,7588,count,0) end elseif msgcontains(msg, 'strong mana potion') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,7589,count,0) end elseif msgcontains(msg, 'great mana potion') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,7590,count,0) end elseif msgcontains(msg, 'great health potion') then count = getCount(msg) if count == 0 then selfSay('0 ? LOL?') talk_start = os.clock() else buy(cid,7591,count,0) end elseif msgcontains(msg, 'hmm') then count = getCount(msg) if count == 0 then selfSay('0 Hmm? LOL?') talk_start = os.clock() else buy(cid,2311,count,0) end elseif msgcontains(msg, 'uh') then count = getCount(msg) if count == 0 then selfSay('0 UH? LOL?') talk_start = os.clock() else buy(cid,2273,count,0) end elseif msgcontains(msg, 'gfb') then count = getCount(msg) if count == 0 then selfSay('0 GFB? LOL?') talk_start = os.clock() else buy(cid,2304,count,0) end elseif msgcontains(msg, 'explosion') then count = getCount(msg) if count == 0 then selfSay('0 EXPLO? LOL?') talk_start = os.clock() else buy(cid,2313,count,0) end elseif msgcontains(msg, 'sd') then count = getCount(msg) if count == 0 then selfSay('0 SD? LOL?') talk_start = os.clock() else buy(cid,2268,count,0) end elseif msgcontains(msg, 'blank rune') then count = getCount(msg) if count == 0 then selfSay('0 Blank rune? LOL?') talk_start = os.clock() else buy(cid,2260,count,0) end [color=Red]elseif msgcontains(msg, 'mana rune') then count = getCount(msg) if count == 0 then selfSay('0 Mana Rune? LOL?') talk_start = os.clock() else buy(cid,[color=Lime]2298[/color],count,0) end [/color] elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Adeus, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Proximo...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Que mal educado eim! Nem fala Bye. Adeus!.') focus = 0 end end end Obs.: Editei pra botar ele melhor, em verde é o id da mana rune. Se o seu ot nao tiver mana rune, delete o que está em vermelho. Copie qualquer arquivo .lua na pasta do seu ot em Data/npc/scripts. Cole nessa pasta. abra ele, apague tudo e bote o script acima. Salve e feche. depois renomeie para mordomo.lua. Depois va na pasta data/npc. copie qualquer arquivo .xml. abra ele, apague tudo e ponha isso. <?xml version="1.0"?> <npc name="Mordomo" script="data/npc/scripts/mordomo.lua" access="3" lookdir="1" autowalk="25"> <health now="1000" max="1000"/> <look type="133" head="114" body="114" legs="126" feet="114"/> </npc> Salve e feche. Renomeie para Mordomo.xml Vlw galera ! duvida poste nesse tópico !! Testado em Striker Server 8.10. by me cya (Y) Edit: Podem usar ele para vender mais coisas como itens novos. Nao permito a copia desse Topico. qualquer copia eu irei reportar. Para editar o preco, bote em count, o valor dos gold. para botar um item novo, edite um, ou copie.
×