
Histórico de Curtidas
-
peterson18 deu reputação a Rusherzin em (Resolvido)[Actions] Porta que só passa com StorageSe estiver usando uma Quest Door, é só botar no uniqueid dela a storage que tu quiser.
-
peterson18 deu reputação a amora murder em (Resolvido)[Actions] Porta que só passa com StorageCara, sou muito cru em scripts e não sei resolver efetivamente seu problema. Mas, ao menos, te darei uma ideia. Não sei se é válida ou não! Ok?
E se você colocasse um "elseif"? Mais ou menos assim:
function onUse(cid, item, fromPosition) if getPlayerStorageValue(cid, XX) >= 1 then doTeleportThing(cid,{x = XX, y = XX, z = XX}) doSendMagicEffect(getPlayerPosition(cid), 10) elseif getCreaturePosition (cid) == x = xx, y = xx, y= xx then --uma posição do lado de dentro da sala, em frente a porta doTeleportThing (cid, {posição para fora da sala}) else doPlayerSendCancel(cid,"Texto.") end return TRUE end
-
peterson18 deu reputação a Tricoder em Depot Medieval____________________________________________
Créditos
feliptovis
____________________________________________
SCAN
https://www.virustotal.com/pt/file/56952cb8d52645f8ba315c50e0022b6bb3b3551a3614330a4b5325723b356f29/analysis/1451357480/
DOWNLOAD
depot1.otbm
-
peterson18 deu reputação a ricardiitoohz em Cyclops CaveBen vindo galera, hoje venho trazer-lhe uma excelente caverna do cyclops.
aqui o link e algumas imagens:
Scan: https://www.virustotal.com/#/file/ea3a17af8480bbd8967f2d227d74308af8c660a6c93d3a589a961b479ef7293b/detection
Download: http://www.mediafire.com/file/65ekvtwa5uqkgjl/Cave+Cyclops.rar
-
peterson18 deu reputação a Rusherzin em (Resolvido)[Dúvida]Npc Termina o DialogoÉ só usar o método unGreet do NpcHandler.
npcHandler:unGreet(cid)
-
peterson18 deu reputação a Rusherzin em (Resolvido)Tile que só pode passa algumas vocaçao.Não testei..
local vocations = {1,2,3,4,5,6,7,8} -- Vocs local entermsg = "Welcome" -- Msg se puder passar local failmsg = "Sorry, but you aren\'t the right vocation" -- Msg se não tiver voc certa function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) then if isInArray(vocations,getPlayerVocation(cid)) then doPlayerSendTextMessage(cid,25,entermsg) doSendAnimatedText(getCreaturePosition(cid), "WELCOME!", TEXTCOLOR_RED) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) else doTeleportThing(cid,fromPosition) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid,25,failmsg) end return true end end movements.xml
<movevent type="StepIn" actionid="xxx" event="script" value="voctile.lua"/> -
peterson18 recebeu reputação de Wakon em (Resolvido)function creatureSayCallback(cid, type, msg) [Dúvida]Obrigado!
-
peterson18 deu reputação a Wakon em (Resolvido)function creatureSayCallback(cid, type, msg) [Dúvida]@peterson18, utilize a função isInArray, exemplo:
if isInArray({'familia', 'parentes'}, msg) then
-
peterson18 recebeu reputação de RAJADAO em ERRO AO CARREGAR ITEMS.XML@RAJADAO
Tenta esse:items.xml
-
peterson18 recebeu reputação de Andersen96 em (Resolvido)Zombie Nojento@Andersen96
Pelo que eu entendi faltou fechar a tabela, tenta assim:
-
peterson18 recebeu reputação de King Laker em (Resolvido)Spell da erro quando bate na paredeTenta assim:
-
peterson18 deu reputação a Gengo em (Resolvido)Criar teleport com x item em altarOpa blz, vamos lá no que você precisa.
Primeiro vá a pasta do seu servidor data/actions/scritps e crie um arquivo com um nome script Teleporte.lua e coloque o seguinte script:
local config = { posicao = { x = 989, y = 978, z = 6}, -- Posição em que o player deve estar no altar item = {5808, { x = 988, y = 978, z = 6} }, -- { id_do_item / posi onde deve colocar o item } teleporte = {1387, { x = 990, y = 978, z = 6}, { x = 160, y = 54, z = 7} }, -- { id do Teleporte / onde será criado o teleporte / onde irá teleportar } tempo = 5000 -- Tempo para que o teleporte desapareça } function removeTP() doRemoveItem(getTileItemById(config.teleporte[2], config.teleporte[1]).uid) end function onUse(cid, item, fromPosition, itemEx, toPosition) local pId = getTopCreature(config.posicao).uid local posiItem = getTileItemById(config.item[2], config.item[1]) if ( pId == 0 or not isPlayer(pId) ) then doPlayerSendCancel(cid, "Posição invalida!") return true elseif ( posiItem.uid == 0 ) then doPlayerSendCancel(cid, "Este item nao e valido!") return true end doCreateTeleport(config.teleporte[1], config.teleporte[3], config.teleporte[2]) doRemoveItem(posiItem.uid) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) addEvent(removeTP, config.tempo) return true end Depois abre o arquivo data/actions/actions.xml e coloque a seguinte tag:
<action uniqueid="3775" script="other/scriptTeleporte.lua"/> <!-- em uniqueid você coloca pelo mapa editor --> Feito tudo isso fica assim no game:
OBS: o item vai sumir do lugar do altar e depois de 5 minutos o teleporta irá desaparecer, na imagem deixei ali o item só para mostrar como exemplo.
Espero que tenha entendido :D
-
peterson18 deu reputação a Rusherzin em (Resolvido)getWorldTime()Aaaah, pensei que tu tivesse o tempo já em 4 dígitos. Faz o seguinte, cria uma função assim na lib:
function readableTime() local config = { tibianTime = true, twentyFour = true -- only if tibianTime = false } local str = "" if(config.tibianTime) then local var = (os.date('%M') * 60 + os.date('%S')) / 150 local hour = math.floor(var) local minute = math.floor(60 * (var - hour)) if(hour < 10) then hour = '0' .. hour end if(minute < 10) then minute = '0' .. minute end str = hour .. ':' .. minute elseif(config.twentyFour) then str = os.date('%H:%M') else str = os.date('%I:%M %p') end return str end No NPC tu bota:
selfSay('Agora são: ' ..readableTime()..'.',cid)
-
peterson18 recebeu reputação de Queijo em otb item editor ERRO@Queijo
Tenta baixar o cliente do site do tibiabr e copiar os arquivos necessários para ver se funciona.
Link: https://www.tibiabr.com/downloads/clients-antigos/
-
peterson18 recebeu reputação de Adm Evolution em [Pedido] Script Quest (RESOLVIDO)Tenta esse:
Onde esta:
elseif voc == 9 then -- Coloca sua voc 'nova' if queststatus == -1 then doPlayerSendTextMessage(cid,22,"Parabens, voce encontrou alguns itens!" -- Mensagem que irá aparecer ao abrir o baú doPlayerAddItem(cid,2650,1) --| ID do item e quantidade que ira ganhar doPlayerAddItem(cid,2512,1) --| doPlayerAddItem(cid,2649,1) --| doPlayerAddItem(cid,2461,1) --| doPlayerAddItem(cid,2554,1) --| doPlayerAddItem(cid,2120,1) --| doPlayerAddExp(cid, expReward) doPlayerSendTextMessage(cid, 22, 'Voce ganhou '.. expReward ..' de experiencia.') -- Mensagem de exp que você ganhou setPlayerStorageValue(cid,1001,1) else doPlayerSendTextMessage(cid,22,"Esta vazio.") -- Mensagem que ira aparecer quandovocê tentar abrir de novo
-
peterson18 deu reputação a xWhiteWolf em Magnus ChallengerFala galera, hoje vim trazer o projeto pronto do Magnus Challenger pra vocês instalarem no servidor de vocês!
Pra quem não conhece é um sistema de Tasks baseado no Zezenia onde você pode escolher entre tasks de matar monstros ou de coletar certos items para o npc Magnus, um guerreiro famoso da cidade que está atolado de tarefas e precisa da sua ajuda!
Peguei os aspectos que eu julguei serem os principais do modelo do Zezenia e editei com algumas coisas que eu achei que ficariam melhores.
Quem quiser pode ver um vídeo comentado de como o sistema funciona:
Dito isso vou ensinar vocês como instalar isso no server:
Pra começar vá em data\creaturescripts\scripts e procure login.lua, agora vá até o final do arquivo e antes do último return true coloque essas linhas abaixo
ainda em creaturescripts procure creaturescripts.xml e adicione essa linha junto com as outras que já estão lá (seguindo o padrão)
<!-- TASK SYSTEM --> <event type="kill" name="tasksystem" script="tasksystem.lua"/> Agora crie um arquivo em creaturescripts\scripts com o nome de tasksystem.lua e adicione o seguinte à ele:
Terminada a parte da contagem de kill vamos ao NPC em si.
Crie um arquivo chamado Magnus.xml em data\npc e coloque isso dentro dele:
Agora em data\npc\scripts crie um arquivo chamado zezeniaa.lua e adicione esse conteúdo dentro do arquivo:
~~~~~~~~~~~~~~~~ FEITO ISSO ESTÁ TERMINADO ~~~~~~~~~~~~~~~~~~
Agora aprendendo a configurar:
No tasksystem vc pode editar isso daqui:
Eu fiz um sistema onde se vc estiver em party com alguém e a pessoa matar os bixos conta como se você tivesse matado; Assim incentiva o pessoal a ir numa cave de Dragon e ao invés de matar quem está lá pra ficar sozinho na cave, eles vão chamar party pra fazerem a task juntos.. assim fazer amigos fica mais fácil e com maiores laços é maior a chance do povo não abandonar o seu server.
Apenas digite "true" ou "false" pra ativar/desativar esse sistema e em baixo temos a distancia máxima pro monstro estar do cara que está fazendo a task pra contar o kill. Se a distancia entre o monstro e a pessoa for maior que 7 não vai contar pra ele a kill.
No zezeniaa.lua as coisas que dão pra configurar são maiores mas são igualmente simples:
Toda vez que vc pedir uma task short (curta) vc vai ter de 100 a 400 monstros pra matar, ele gera um número de 0 a 6 e multiplica por 5 e soma com os 100 iniciais.. o mesmo vale pra todos os outros valores.
levelcollect é o level mínimo pra fazer tasks do tipo collect.
time é o tempo em segundos que você vai ficar sem poder falar com o npc caso desista de alguma task, o padrão é 8 * 60 * 60 (8 horas)
bonus é por quanto vai multiplicar caso vc permita que o npc escolha aleatoriamente entre todas as opções.. o padrão é 20% de bonus (1.2)
multiplicador é uma coisa que eu adicionei pra ficar mais fácil mexer na fórmula sem cometer cagadas, se vc tá ganhando 10% de exp e quer ganhar 80% é só colocar 8 no multiplicador.
Isso daqui é o banco de dados principal do sistema de kill, toda vez que vc escolher uma task do tipo fácil, médio, dificil ele vai acessar essas tabelas contendo o nome das criaturas.. vc pode facilmente adicionar novos nomes, o npc já está programado pra lidar com isso, apenas siga o padrão e mantenha sempre o último sem vírgula!
Ex: adicionando Morgaroth na tabela de hard
local hard = { [1] = "Giant Spider", [2] = "Dragon Lord", [3] = "Grim Reaper", [4] = "Demon", [5] = "Crystal Spider", [6] = "Demon Skeleton", [7] = "Juggernaut", [8] = "Destroyer", [9] = "Hand of Cursed Fate", [10] = "Morgaroth" } atente-se também pra não repetir o número no index.. se o anterior era [9] use [10].
O restante das tabelas são separadas para o banco de dados das tasks de collect:
segue a mesma lógica da de kill só que aqui você tem o id dos itens que serão usados... aquela count não tem nada a ver com o item pois ele vai gerar tanto o item aleatoriamente quanto à count;
Ex:
[1] = {id = 5880, count = 20}, -- iron ore isso não significa que se cair iron ore (id 5880) irá cair sempre 20.. até porque eu poderia escolher uma task long e easy e pegar a task de trazer até 50 iron ores, apenas tente manter os padrões que são os intervalos definidos.
No easy ele varia de 10 a 20, no medium ele varia de 20 a 35 e no hard de 40 a 50.
Espero que vocês tenham curtido, é um sistema grande mas bem simples de se mexer... se tiverem quaisquer problemas podem comentar aqui. Deu trabalho fazer isso então se você gostou deixe o seu comentário aí e o seu "Gostei" que vai me incentivar a trazer mais coisas desse tipo pra cá. Abraços do lobo.
PS: Pra sumonar o npc digite com o GOD: /n Magnus ou coloque ele pelo map editor.
-
peterson18 deu reputação a Skydrowz em Erro Script Função getCreatureNamelocal 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local nome = "nome" if nome == getCreatureName(cid) then if (msgcontains(msg, "blz") or msgcontains(msg, "blzz")) and (talkState[talkUser]) == 1 then -- Você vai precisar dos () para separar o 'or' do 'and', caso contrário sua condição ia bugar. selfSay("Olá, como está ".. nome ..", faz tempo que não aparece por aqui... Em que posso lhe ajudar?",cid) talkState[talkUser] = 1 -- Altere aqui, pois a talkState já está 1, de acordo com sua condição. end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
peterson18 deu reputação a edaegonis em Erro Script Função getCreatureName@peterson18 está quase, faltou remover o if desnecessário
acredito que a versão correta do script seria assim:
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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local nome = getCreatureName(cid) if msgcontains(msg, "blz") or msgcontains(msg, "blzz") and talkState[talkUser] == 1 then selfSay("Olá, como está ".. nome ..", faz tempo que não aparece por aqui... Em que posso lhe ajudar?",cid) return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) veja se deu certo ?
-
peterson18 deu reputação a WooX em Erro Script Função getCreatureNameA função retorna uma string, ou seja, um texto. Para fazer essa comparação corretamente, o nome a ser comparado também tem que ser uma string.
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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local nome = "nome" if getCreatureName(cid) == nome then if msgcontains(msg, 'Oi') or msgcontains(msg, 'Ola') and talkState[talkUser] == 1 then selfSay("Olá, como está ".. nome ..",faz tempo que não aparece por aqui... Em que posso lhe ajudar?",cid) talkState[talkUser] = 1 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
peterson18 deu reputação a Skydrowz em (Resolvido)Duplicar Script TASKlocal keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local quest = 76670 <!-- Alterei aqui para 76670, que seria a OUTRA storage de task --> local reward = 70000 <!-- Aqui você altera a reward --> 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then return false elseif msgcontains(msg, "ajudar") then npcHandler:say("Agradeco, por se empenhar em ajudar a vila, tenha cuidado {ok} ?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, "ok") and talkState[talkUser] == 2 then npcHandler:say("Tenha cuidado nao se esforce muito!", cid) setPlayerStorageValue(cid, quest, 2) <!-- Aqui ele vai usar a storage que mudei lá em cima (76670) --> talkState[talkUser] = 0 elseif msgcontains(msg, "favor") then local str = getPlayerStorageValue(cid, quest) if(str < 2) then npcHandler:say("msg.", cid) talkState[talkUser] = 1 return true elseif(str == 2) then npcHandler:say("msg!", cid) elseif(str == 3) then npcHandler:say("msg.", cid) doPlayerAddItem(cid, 2148, 75) doPlayerAddExp(cid, 1300) doPlayerSendTextMessage(cid, 22, 'exp.') setPlayerStorageValue(cid, quest, 4) elseif(str == 4) then npcHandler:say("msg.", cid) end talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Tenta assim.
-
peterson18 deu reputação a DdJs em Forbidden Village | 8.60Cave hunt - Forbidden Village.
Download: Here
Scan: Here
Imagens:
-
peterson18 deu reputação a FlavioHulk em (Resolvido)Mensagens "setCallback" do NPC-- Constant indexes for defining default messages. MESSAGE_GREET = 1 -- When the player greets the npc. MESSAGE_FAREWELL = 2 -- When the player unGreets the npc. MESSAGE_BUY = 3 -- When the npc asks the player if he wants to buy something. MESSAGE_ONBUY = 4 -- When the player successfully buys something via talk. MESSAGE_BOUGHT = 5 -- When the player bought something through the shop window. MESSAGE_SELL = 6 -- When the npc asks the player if he wants to sell something. MESSAGE_ONSELL = 7 -- When the player successfully sells something via talk. MESSAGE_SOLD = 8 -- When the player sold something through the shop window. MESSAGE_MISSINGMONEY = 9 -- When the player does not have enough money. MESSAGE_NEEDMONEY = 10 -- Same as above, used for shop window. MESSAGE_MISSINGITEM = 11 -- When the player is trying to sell an item he does not have. MESSAGE_NEEDITEM = 12 -- Same as above, used for shop window. MESSAGE_NEEDSPACE = 13 -- When the player don't have any space to buy an item MESSAGE_NEEDMORESPACE = 14 -- When the player has some space to buy an item, but not enough space MESSAGE_IDLETIMEOUT = 15 -- When the player has been idle for longer then idleTime allows. MESSAGE_WALKAWAY = 16 -- When the player walks out of the talkRadius of the npc. MESSAGE_DECLINE = 17 -- When the player says no to something. MESSAGE_SENDTRADE = 18 -- When the npc sends the trade window to the player MESSAGE_NOSHOP = 19 -- When the npc's shop is requested but he doesn't have any MESSAGE_ONCLOSESHOP = 20 -- When the player closes the npc's shop window MESSAGE_ALREADYFOCUSED = 21 -- When the player already has the focus of this npc. MESSAGE_WALKAWAY_MALE = 22 -- When a male player walks out of the talkRadius of the npc. MESSAGE_WALKAWAY_FEMALE = 23 -- When a female player walks out of the talkRadius of the npc.
Basta usar um dos ID acima, e incluir no final do script do NPC
npcHandler:setMessage(MESSAGE_WALKAWAY, "Example") npcHandler:setMessage(MESSAGE_FAREWELL, "Example")
-
peterson18 deu reputação a Fabianuh em (Resolvido)Mensagens "setCallback" do NPC@peterson18 existe sim a possibilidade de alterar essas falas.
vá até a pasta data/npc/lib/npcsystem/ e abra o arquivo chamado npchandler.lua, você vai encontrar algo parecido com isso:
[MESSAGE_GREET] = 'Welcome, |PLAYERNAME|! I have been expecting you.', [MESSAGE_FAREWELL] = 'Good bye, |PLAYERNAME|!', [MESSAGE_BUY] = 'Do you want to buy |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold coins?', [MESSAGE_ONBUY] = 'It was a pleasure doing business with you.', [MESSAGE_BOUGHT] = 'Bought |ITEMCOUNT|x |ITEMNAME| for |TOTALCOST| gold.', [MESSAGE_SELL] = 'Do you want to sell |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold coins?', [MESSAGE_ONSELL] = 'Thank you for this |ITEMNAME|, |PLAYERNAME| gold.', [MESSAGE_SOLD] = 'Sold |ITEMCOUNT|x |ITEMNAME| for |TOTALCOST| gold.', [MESSAGE_MISSINGMONEY] = 'Sorry, you don\'t have enough money.', [MESSAGE_NEEDMONEY] = 'You do not have enough money.', [MESSAGE_MISSINGITEM] = 'You don\'t even have that item, |PLAYERNAME|!', [MESSAGE_NEEDITEM] = 'You do not have this object.', [MESSAGE_NEEDSPACE] = 'You do not have enough capacity.', [MESSAGE_NEEDMORESPACE] = 'You do not have enough capacity for all items.', [MESSAGE_IDLETIMEOUT] = 'Next, please!', [MESSAGE_WALKAWAY] = 'How rude!', [MESSAGE_DECLINE] = 'Not good enough, is it... ?', [MESSAGE_SENDTRADE] = 'Here\'s my offer, |PLAYERNAME|. Don\'t you like it?', [MESSAGE_NOSHOP] = 'Sorry, I\'m not offering anything.', [MESSAGE_ONCLOSESHOP] = 'Thank you, come back when you want something more.', [MESSAGE_ALREADYFOCUSED]= '|PLAYERNAME|! I am already talking to you...', [MESSAGE_PLACEDINQUEUE] = '|PLAYERNAME|, please wait for your turn. There are |QUEUESIZE| customers before you.' Você pode alterar conforme seu gosto nesse arquivo (*vai afetar todos os npcs).
Ou então alterar no próprio arquivo xml de cada NPC. exemplo:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Morgan" script="data/npc/scripts/vip/morgan.lua" walkinterval="2000"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="225" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Welcome, |PLAYERNAME|! I have been expecting you. Would like some {upgrades}? check {points}?" /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="upgrades" /> <parameter key="keyword_reply1" value="I can sell for you.. {infinite potions} and upgrade spells for {sorcerer}, {druid}, {paladin} and {knight}. want to buy one?" /> </parameters> </npc> Dê uma certa atenção para a parte:
<parameter key="message_greet" value="Welcome, |PLAYERNAME|! I have been expecting you. Would like some {upgrades}? check {points}?" />
você pode alterar o message_greet para uma das opções:
MESSAGE_GREET MESSAGE_FAREWELL MESSAGE_BUY MESSAGE_ONBUY MESSAGE_BOUGHT MESSAGE_SELL MESSAGE_ONSELL MESSAGE_SOLD MESSAGE_MISSINGMONEY MESSAGE_NEEDMONEY MESSAGE_MISSINGITEM MESSAGE_NEEDITEM MESSAGE_NEEDSPACE MESSAGE_NEEDMORESPACE MESSAGE_IDLETIMEOUT MESSAGE_WALKAWAY MESSAGE_DECLINE MESSAGE_SENDTRADE MESSAGE_NOSHOP MESSAGE_ONCLOSESHOP MESSAGE_ALREADYFOCUSED MESSAGE_PLACEDINQUEUE Qualquer dúvida, volte a postar novamente ?
-
peterson18 deu reputação a Storm em (Resolvido)Npc que dê outfitte por Quest"You started the task" = Você já iniciou a missão , ou seja, está correto.
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 storage = 35678 -- monster kill | local sto = 24529 -- don't pick premio | -- | Não mecha nessa gambiarra aqui , só certifique que nenhuma dessas storages sejam usadas em outros sistemas local rage = 24525 -- inicializate contage | local ok = 45651 -- don't inicializate | local exp = 100 -- Quantidade de XP local monster = 100 -- Quantos monstros terá que matar local outfit = { male = 10, -- ID da outfit male female = 11 -- ID da outfit female } local potion, count = 2139, 10 -- ID da potion , Count. local gold = 1000 -- quanto de money irá ganhar if(msgcontains(msg, 'premio')) then if getPlayerStorageValue(cid, sto) == -1 then if getPlayerStorageValue(cid, storage) >= 100 then selfSay("You have finished the task", cid) doPlayerAddItem(cid, potion, count) doPlayerAddMoney(cid, gold) doPlayerAddExp(cid, exp) doSendMagicEffect(getCreaturePosition(cid), 5) setPlayerStorageValue(cid, rage, -1) setPlayerStorageValue(cid, sto, 1) setPlayerStorageValue(cid, fuck, 1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, outfit.male, 0) else doPlayerAddOutfit(cid, outfit.female, 0) end else selfSay("You need kill 100 monsters do finish the task", cid) end else selfSay("back from here nigga", cid) end end if(msgcontains(msg, 'accept')) then if getPlayerStorageValue(cid, ok) == -1 then selfSay("voce iniciou a missao", cid) setPlayerStorageValue(cid, ok, 1) setPlayerStorageValue(cid, rage, 1) else selfSay("Voce ja iniciou a missao", cid) end end end
-
peterson18 deu reputação a Storm em (Resolvido)Npc que venda Livro com TextoTava faltando uns parametros , aqui vai :
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 money = 1000 -- Custo local id = 7122 -- id do Book local text = "Livro misterioso" if(msgcontains(msg, 'yes')) then if doPlayerRemoveMoney(cid, money) then doSetItemText(doPlayerAddItem(cid, id, 1), text) selfSay('Obrigado', cid) else selfSay('Você precisa de '.. money ..' de money para comprar esse livro', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())