Ir para conteúdo

MaXwEllDeN

Héroi
  • Registro em

  • Última visita

Tudo que MaXwEllDeN postou

  1. Anexarei sua resposta ao tópico. Obrigado, Caronte.
  2. Não posso fazer um tópico totalmente contra idiotas, muito menos desenvolver scripts contra idiotas. O problema no CTF, é que ninguém lê exatamente o que eu postei, e sempre acaba fazendo algo que eu não disse para fazer, por isso os que não sabem ler instalam errado. Se não disse onde coloca UID, é porque não precisa colocar UID, o próprio script faz isso. Pela metade? Realmente. Não posso instalar para todos que querem, né? Porque a única coisa que falta nas coisas que posto, é instalar para as pessoas, que mesmo assim fazem merda e instalam errado. Passar bem.
  3. Poxa, esse arquivo ainda não dá informações suficientes... Preciso da estrutura da função function doSendPokeBall Acho que fica em algum arquivo dentro da pasta lib
  4. Fishing System: Renamer Npc: Npc Uper: Conforme eu precise mais de algo eu coloco aki Obrigado pela ajuda... REP+ e até logo! :3 Olá, TsplayerT. Para poder te ajudar, preciso entender como funciona a arquitetura do seu sistema de pokémon. Será que você poderia me enviar os arquivos que executam o catch de pokémons? Eles serão provavelmente encontrados em actions/scripts.
  5. MaXwEllDeN postou uma resposta no tópico em Playground (Off-topic)
    td mundo já sabia
  6. Ficou daora, parabéns! Vai liberar a source?
  7. local config = { gold = 20, -- Gold necessário cd = 2, -- Intervalo em minutos storage = 2612, -- Não necessita configurar } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) npcHandler.topic = {} 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(cid) npcHandler:onThink(cid) end local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end if msgcontains(msg, "promotion") or msgcontains(msg, "promote") then if getPlayerVocation(cid) > 4 then npcHandler:say("Sorry, you are already promoted.", cid) elseif not isPremium(cid) then npcHandler:say("Sorry, you must be premium to buy promotion.", cid) else npcHandler:say("Do you want to buy promotion for 20k?", cid) npcHandler.topic[cid] = 1 end elseif msgcontains(msg, "yes") and npcHandler.topic[cid] == 1 then if doPlayerRemoveMoney(cid, 20000) then doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) npcHandler:say("You are now promoted!", cid) else npcHandler:say("Sorry, you do not have enough money.", cid) end npcHandler.topic[cid] = 0 elseif msgcontains(msg, "desbug") then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.intervalo * 60 then npcHandler:say("Quer desbugar por ".. config.gold .." gold?", cid) npcHandler.topic[cid] = 2 else npcHandler:say("Não posso te desbugar agora.") end elseif msgcontains(msg, "yes") and npcHandler.topic[cid] == 2 then if doPlayerRemoveMoney(cid, config.gold) then doPlayerAddLevel(cid, 1) setPlayerStorageValue(cid, config.storage, os.time()) npcHandler:say("Pronto adicionado", cid) else npcHandler:say("Sorry, you do not have enough money.", cid) end npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  8. Se seria O USO DO PRÓPRIO ITEM, seria mais interessante mapear na source o método que interpreta que o player usou um item, e desse modo interfacear esse método com um novo método, que você poderia chamar de doPlayerUseItem(cid, itemuUID, target) Onde basicamente você iria forçar por um script, o servidor a entender que foi o cliente quem enviou a solicitação para usar o item. Creio que seja isso, mas não posso afirmar com total certeza pois não conheço bem as sources. Abraços.
  9. doPlayerCastSpell(cid, "Light Healing") ou doCreatureCastSpell(cid, "Light Healing") Sobre a solução para as runas, exemplifica melhor um caso onde você precisaria usar, que talvez eu possa te dar uma solução alternativa.
  10. local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {300, 301, 302, 303, 304, 305, 306, 307} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601} function onUse(cid, item, fromPosition, itemEx, toPosition) if getDistanceBetween(aqui, toPosition) >= 8 then return doPlayerSendTextMessage(cid, 27, "Está muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras") elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, Apenas Minato pode usar a tecnica Deus Dragão.") elseif(isCreature(itemEx.uid)) then return doPlayerSendTextMessage(cid, 27, "Desculpe, mas você não pode teletransportar em criaturas.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(pos, 24) doSendMagicEffect(toPosition, 24) doCreatureSay(cid, "Shunshin", 19) return doSendDistanceShoot(pos, toPosition, 16) end return doPlayerSendCancel(cid, "Desculpe nao foi possivel.") end
  11. local ip = {x = 926, y = 1012, z = 7} Aqui é onde o "Michael Jackson" vai aparecer
  12. <?xml version="1.0" encoding="UTF-8"?> <npc name="Juca" script="juca.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|, se voce quer uma vocação VIP tu precisa do {pergaminho}."/> </parameters> </npc>
  13. Perdão, na verdade era linha 5.
  14. Muda o que tem na linha 7 do arquivo juca.xml. Uma dúvida: Seu nome é Yan? theGazette no Pokémon da SvkE?
  15. Cria o arquivo data/npc/juca.xml e coloca isso dentro: <?xml version="1.0" encoding="UTF-8"?> <npc name="Juca" script="juca.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|, I am a bootmaker."/> </parameters> </npc> Cria o arquivo data/npc/scripts/juca.lua e coloca isso dentro: local pergaminhoid = 2154 -- Itemid do pergaminho local vocations = { [5] = {9, 10, 11}, [6] = {12, 13, 14}, [7] = {15, 16, 17}, [8] = {17, 15, 10} } 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:lower()) end function onThink() npcHandler:onThink() end local talkState = {} function creatureSayCallback(cid, typeb, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then if msgcontains(msg, "hi") then talkState[talkUser] = 0 end return true end local voc = vocations[getPlayerVocation(cid)] if voc then if msgcontains(msg, "pergaminho") then if getPlayerItemCount(cid, pergaminhid) > 0 then local str = "" local ret = {} for _, v in pairs(voc) do str = str .. "{".. getVocationInfo(v).name .. "}, " table.insert(ret, getVocationInfo(v).name:lower()) end npcHandler:say("Ora ora, voce tem o pergaminho, então escolha sua vocaçao vip: ".. str:sub(1, #str - 2) .. ".", cid) talkState[talkUser] = ret else npcHandler:say("Você não tem o pergaminho.", cid) end elseif type(talkState[talkUser]) == "table" and isInArray(talkState[talkUser], msg:lower()) then if doPlayerRemoveItem(cid, pergaminhoid, 1) then for _, v in pairs(voc) do if getVocationInfo(v).name:lower() == msg:lower() then doPlayerSetVocation(cid, voc) break end end npcHandler:say("Ótima escolha, agora voce é {".. msg:lower() .. "}, até mais!", cid) talkState[talkUser] = 0 else npcHandler:say("Você não tem o pergaminho.", cid) end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  16. Cria um arquivo em data/npc/scripts
  17. local pergaminhoid = 2154 -- Itemid do pergaminho local vocations = { [5] = {9, 10, 11}, [6] = {12, 13, 14}, [7] = {15, 16, 17}, [8] = {17, 15, 10} } 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:lower()) end function onThink() npcHandler:onThink() end local talkState = {} function creatureSayCallback(cid, typeb, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then if msgcontains(msg, "hi") then talkState[talkUser] = 0 end return true end local voc = vocations[getPlayerVocation(cid)] if voc then if msgcontains(msg, "pergaminho") then if getPlayerItemCount(cid, pergaminhid) > 0 then local str = "" local ret = {} for _, v in pairs(voc) do str = str .. "{".. getVocationInfo(v).name .. "}, " table.insert(ret, getVocationInfo(v).name:lower()) end npcHandler:say("Ora ora, voce tem o pergaminho, então escolha sua vocaçao vip: ".. str:sub(1, #str - 2) .. ".", cid) talkState[talkUser] = ret else npcHandler:say("Você não tem o pergaminho.", cid) end elseif type(talkState[talkUser]) == "table" and isInArray(talkState[talkUser], msg:lower()) then if doPlayerRemoveItem(cid, pergaminhoid, 1) then for _, v in pairs(voc) do if getVocationInfo(v).name:lower() == msg:lower() then doPlayerSetVocation(cid, voc) break end end npcHandler:say("Ótima escolha, agora voce é {".. msg:lower() .. "}, até mais!", cid) talkState[talkUser] = 0 else npcHandler:say("Você não tem o pergaminho.", cid) end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  18. local storage = 4123 function onChangeOutfit(cid, old, current) if getPlayerStorageValue(cid, storage) ~= -1 and getPlayerStorageValue(cid, 79519) < 1 then setPlayerStorageValue(cid, 79519, 1) doCreatureChangeOutfit(cid, old) setPlayerStorageValue(cid, 79519, -1) return false end return true end
  19. Ainda bem, cara. Se precisar de ajuda com algo pode falar comigo no Skype que te ajudo no que estiver dentro do meu entendimento. Skype: MaXwEllDeN
  20. Caraca, como ninguém nunca pensou nisso antes? O script pode ser simples, mas a ideia foi genial!
  21. Removi a parte que fazia o player falar os números. Esqueci de remover durante os testes.. Bem, provavelmente ele não mostra a spell por causa do needlearn sim. Vou desenvolver algo para que possa usar com o conjure. Em breve posto
  22. MaXwEllDeN postou uma resposta no tópico em Suporte Tibia OTServer
    function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__MAGLEVEL then local spells = {} for index = 0, getPlayerInstantSpellCount(cid) - 1 do local spell = getPlayerInstantSpellInfo(cid, index) doCreatureSay(cid, spell.mlevel) if spell.mlevel > oldLevel and spell.mlevel <= newLevel then table.insert(spells, " [".. spell.name .."] \"".. spell.words .. "\" Mana[".. spell.mana .."]") end end if #spells > 0 then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have just advanced to magic level ".. newLevel .." and learned new spells!") for _, v in pairs(spells) do doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, v) end end end return true end Substitua seu script antigo por esse
  23. Tenta esse aqui: function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__MAGLEVEL then local spells = {} for index = 0, getPlayerInstantSpellCount(cid) - 1 do local spell = getPlayerInstantSpellInfo(cid, index) if spell.mlevel > oldLevel and spell.mlevel <= newLevel then table.insert(spells, " [".. spell.name .."] \"".. spell.words .. "\" Mana[".. spell.mana .."]") end end if #spells > 0 then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have just advanced to magic level ".. newLevel .." and learned new spells!") for _, v in pairs(spells) do doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, v) end end end return true end Se não der certo, me passa ta lib 000-const.lua Ah, e detalhe: Ele só funciona com instant spells, spells de conjuração não são identificadas pelo script, para que fossem uma gambiarrazinha teria que ser feita
  24. MaXwEllDeN postou uma resposta no tópico em Suporte Tibia OTServer
    Editei o último tópico. Mas tive outra ideia para refazer esse script, se quiser testar essa última versão enquanto eu crio o novo script, fique a vontade.
  25. MaXwEllDeN postou uma resposta no tópico em Suporte Tibia OTServer
    Me passa seu spells.xml. Preciso ver uma coisa

Informação Importante

Confirmação de Termo