Ir para conteúdo

ViitinG

Membro
  • Registro em

  • Última visita

Tudo que ViitinG postou

  1. Testa ae,eu to aprendendo script !
  2. Retire um "registerCreatureEvent(cid, "DeathBroadcast")" do login.lua..
  3. Não quero seu config.lua quero seu login.lua brother !
  4. Ta ai o script para não comprar se tiver dias de premium : 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'offer') or msgcontains(msg, 'offer')) then selfSay('Para comprar Premium diga ( premium ).', cid) elseif(msgcontains(msg, 'premium') or msgcontains(msg, 'Premium')) then selfSay('15 Dias por 100k ok - diga yes para comprar-', cid) talkState[talkUser] = 1 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerPremiumDays(cid) == 0 then if(doPlayerRemoveItem(cid, 2160, 100) == true) then selfSay('Parabens, Premium de 15 dias!', cid) doPlayerAddPremiumDays(cid, 15) talkState[talkUser] = 0 else selfSay('Voce nao tem dinheiro suficientes.', cid) talkState[talkUser] = 0 else selfSay('Voce so pode comprar premium quando voce nao tiver nenhum dia de premium.', cid) talkState[talkUser] = 0 end end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Creditos : Jamison por ajudar !
  5. Para mostrar quem matou e quem morreu é outro script brother,um de cada vez !! Mande seu login.lua e seu creaturescript.xml.
  6. Manda como code brother e não como anexo,só copiar o script e mandar aqui como code.
  7. Primeiramente aqui não é o tibiaking e sim o Tibia King. Mande o script da magic wall por favor !!
  8. Brother eu preciso do script para poder editar !! Manda o script que tu ta usando.
  9. Qual o script que tu ta usando ?
  10. Ahh entendi rsrsrsrsr. Resolvido. Relatado.
  11. Manda seu script e a tag para eu ver como está !!
  12. Brother você ta usando o script e a tag que eu te mandei ?m Porque pelo que estou vendo o nome do NPC e a fala estão erradas com a que eu mandei (a não ser que você tenha trocado),manda o script e a tag que você ta usando !!
  13. Para saber a senha que ta em sha1 é só converter para plain usando um dos sites que o Nicrox mandou acima ! Pegue a senha que está em sha1 e coloque no dialogo de um dos dois sites que ele mandou acima..
  14. Aqui tem um download do Alissow pelo comedinhasss : http://www.tibiaking.com/forum/topic/24660-alissow-ots-50-17032013/
  15. Poisé a 3.0 tem essa opção de poder mappear junto porém está com muitos bugs então acho melhor usar a 2.2 até que a 3.0 esteja livre de bugs e possa ser usada sem dor de cabeça !!
  16. Tem que falar "sim",no caso se quiser que fale "yes" mude para este script : 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'offer') or msgcontains(msg, 'offer')) then selfSay('Para comprar Premium diga ( premium ).', cid) elseif(msgcontains(msg, 'premium') or msgcontains(msg, 'Premium')) then selfSay('dialogo da premium - diga sim para comprar-', cid) talkState[talkUser] = 1 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 2160, 1) == true) then selfSay('Parabens, Premium de 30 dias!', cid) doPlayerAddPremiumDays(cid, 31) talkState[talkUser] = 0 else selfSay('Voce nao tem dinheiro suficientes.', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  17. O melhor editor de mapa no meu caso é o RME mesmo. A versão mais recente dele sem bugs é a 2.2 !!
  18. Tenta este : "data/npc/premmyseller" <?xml version="1.0" encoding="UTF-8"?> <npc name="Premmy Seller" script="data/npc/scripts/premmyseller.lua" walkinterval="3000" floorchange="0" access="5" > <health now="150" max="150"/> <look type="545" head="0" body="114" legs="114" feet="0"/> <parameters> <parameter key="message_greet" value="Bem-vindo, aqui voce pode comprar sua Premium para ver as ofertas diga 'offer' "/> <parameter key="message_farewell" value="Ate a proxima, Beijoss!"/> </parameters> </npc> "data/npc/scripts/premmyseller" 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'offer') or msgcontains(msg, 'offer')) then selfSay('Para comprar Premium diga ( premium ).', cid) elseif(msgcontains(msg, 'premium') or msgcontains(msg, 'Premium')) then selfSay('dialogo da premium - diga sim para comprar-', cid) talkState[talkUser] = 1 -- Confirmação da Compra elseif(msgcontains(msg, 'sim') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 2160, 10) == true) then selfSay('Parabens, Premium de 30 dias!', cid) doPlayerAddPremiumDays(cid, 31) talkState[talkUser] = 0 else selfSay('Voce nao tem dinheiro suficientes.', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  19. Procure um tutorial aqui no TK que você vai achar brother !!
  20. Tenta mudar o script para este : days = 30 gold coins = 3031 quant = 10000 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 function santaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.present == true) then if isPlayer(cid) then if getPlayerItemCount(cid,gold coins) >= quant then doPlayerAddPremiumDays(cid,days) doPlayerRemoveItem(cid,gold coins,quant) npcHandler:say('Obrigado |PLAYERNAME|, Está aqui seus "..days.." dias de Premium', cid) else npcHandler:say('Voce não tem "..quant.." Gold Coins.', cid) end end npcHandler:resetNpc() return true end end npcHandler:setMessage(MESSAGE_GREET, "Olá |PLAYERNAME|. Eu vendo {Premium} Days.") local noNode = KeywordNode:new({'no'}, santaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true}) local node = keywordHandler:addKeyword({'premium'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce gostaria de comprar "..days.." dias de Premium por "..quant.." gold coins?'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new())
  21. É só você achar um que não tenha muitas coisas,se tiver algo que você não goste é só retirar do servidor..
  22. Tenta este : "data/npc/buypremmy.xml" <?xml version="1.0" encoding="UTF-8"?> <npc name="Premium Seller" script="buypremmy.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="160" head="0" body="112" legs="93" feet="95"/> </npc> "data/npc/scripts/buypremmy.lua" days = 30 goldcoins = 3031 quant = 10000 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 function santaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.present == true) then if isPlayer(cid) then if getPlayerItemCount(cid,goldcoins) >= quant then doPlayerAddPremiumDays(cid,days) doPlayerRemoveItem(cid,goldcoins,quant) npcHandler:say('Obrigado |PLAYERNAME|, Está aqui seus "..days.." dias de Premium', cid) else npcHandler:say('Voce não tem "..quant.." Gold Coins.', cid) end end npcHandler:resetNpc() return true end npcHandler:setMessage(MESSAGE_GREET, "Olá |PLAYERNAME|. Eu vendo {Premium} Days.") local noNode = KeywordNode:new({'no'}, santaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true}) local node = keywordHandler:addKeyword({'premium'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce gostaria de comprar "..days.." dias de Premium por "..quant.." gold coins?'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new())
  23. Da sim brother,faça o seguinte : "data/creaturescripts/creaturescripts.xml" <event type="think" name="TiraBattle" event="script" value="tirabattle.lua"/> "data/creaturescript/scripts/login.lua" registerCreatureEvent(cid, "TiraBattle") "data/creaturescripts/scripts/tirabattle" function onThink(cid, interval) if(getTilePzInfo(getCreaturePosition(cid))) then doRemoveCondition(cid, CONDITION_INFIGHT) end end

Informação Importante

Confirmação de Termo