Ir para conteúdo

Oneda

Membro
  • Registro em

  • Última visita

  1. Versão melhorada da mesma action: local mEffect = 1 local creatures = {pack1 = {"Sheep", "Black Sheep"}, pack2 = {"Deer", "Bear", "Rat"}, pack3 = {"Dragon", "Wyvern"}} local rewards = {pack1 = 11236, pack2 = 5878, pack3 = 5877} local amounts = {pack1 = 5, pack2 = 2, pack3 = 1} local damages = {pack1 = -5, pack2 = -15, pack3 = -50} function onUse(player, item, fromPosition, target, toPosition, isHotkey) if target:isCreature(target) and isInArray(creatures.pack1, getCreatureName(target)) then toPosition:sendMagicEffect(mEffect) player:addItem(rewards.pack1, amounts.pack1) target:addHealth(damages.pack1) elseif isCreature(target) and isInArray(creatures.pack2, getCreatureName(target)) then toPosition:sendMagicEffect(mEffect) player:addItem(rewards.pack2, amounts.pack2) target:addHealth(damages.pack2) elseif isCreature(target) and isInArray(creatures.pack3, getCreatureName(target)) then toPosition:sendMagicEffect(mEffect) player:addItem(rewards.pack3, amounts.pack3) target:addHealth(damages.pack3) elseif target:isCreature(target) == false then player:sendTextMessage(MESSAGE_STATUS_WARNING, "You can only skin creatures.") -- The error message it will give if the player is trying to skin something that isn't a creature. else player:sendTextMessage(MESSAGE_STATUS_WARNING, "You cannot skin this creature.") -- The error message it will give if t he player is trying to skin a creature which isn't added in the configuration above. return true end end
  2. LeoTK reagiu a uma resposta no tópico: Skin em criaturas vivas.
  3. Não foi exatamente o que você pediu, pois não criei um slottype novo e nem um slot novo, porém, limitei a spell pelo fato do player ter ou não X item equipado. Como funciona: em "local equip = {2475, 2474}" é onde está listado o IDs do helmets que irão habilitar ou não o uso da magia, no caso, Winged Helmet e Warrior Helmet, o script checará se o helmet usado é um dos dois, se for, executará a magia, se não, irá enviar uma mensagem de erro. Aqui, usei a spell "exori" como exemplo: local combat = Combat() local equip = {2475, 2474} -- Items que permitirão a magia a ser executada pelo jogador. combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true) combat:setParameter(COMBAT_PARAM_USECHARGES, true) combat:setArea(createCombatArea(AREA_SQUARE1X1)) function onGetFormulaValues(player, skill, attack, factor) local min = (player:getLevel() / 5) + (skill * attack * 0.03) + 7 local max = (player:getLevel() / 5) + (skill * attack * 0.05) + 11 return -min, -max end combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(creature, variant) if isInArray(equip, getPlayerSlotItem(creature, CONST_SLOT_HEAD).itemid) then -- Se o HELMET (CONST_SLOT_HEAD) for igual a algum da array/table equip (definida no topo do script), então: return combat:execute(creature, variant) -- retorna a execução da spell else creature:sendTextMessage(MESSAGE_STATUS_WARNING, "You need some kind of equipment to be able to cast this spell.") -- se algum dos HELMETs listados não estiver equipado, retornará esta mensagem de erro. end end
  4. Salve carai! Então, tenho estudado um pouco de lua e acabei fazendo um script, simples, mas que pode vir a ser útil para alguns servidores... O que o script faz? É simples, ele te deixa tirar a "pele" de um animal ainda vivo, como a obsidian knife faz com os mortos. PS: Você pode configurar os mobs e suas respectivas "peles" no script, você só precisar tem um mínimo de conhecimento em lua. PS²: Script feito em um TFS 1.2 recém baixado. actions.xml: (PS: Não esqueça de definir o ID do item a ser usado) <action itemid="ID DO ITEM" script="skinning.lua" /> Observação: A Sintaxe em lua nos codes do fórum está aparentemente bugada, apenas copie o código abaixo e cole no seu editor lua que ficará normal. actions/scripts/skinning.lua: local wool = {"Sheep", "Black Sheep"} -- Creatures configuration for the first table which gives wool when skinned local leather = {"Deer", "Bear", "Rat"} -- Creatures configuration for the second table which gives minotaur leather when skinned (Should probably rename the item to leather by the way) local dleather = {"Dragon", "Wyvern"} -- Creatures configuration for the third table which gives green dragon leather when skinned (Could also change this to green leather or something) local tPos = getCreaturePosition(target) function onUse(player, item, fromPosition, target, toPosition, isHotkey) if isCreature(target) and isInArray(wool, getCreatureName(target)) then doSendMagicEffect(tPos, 1) -- The magic effect that will be shown @ target's position when skinned. player:addItem(11236, 3) -- Item which will be added when the mobs at "Wool" table are skinned and its amount. doCreatureAddHealth(target, -10) elseif isCreature(target) and isInArray(leather, getCreatureName(target)) then doSendMagicEffect(tPos, 1) -- The magic effect that will be shown @ target's position when skinned. player:addItem(5878, 1) -- Item which will be added when the mobs at "Leather" table are skinned and its amount. doCreatureAddHealth(target, -20) elseif isCreature(target) and isInArray(dleather, getCreatureName(target)) then doSendMagicEffect(tPos, 1) -- The magic effect that will be shown @ target's position when skinned. player:addItem(5877, 1) -- Item which will be added when the mobs at "DLeather" table are skinned and its amount. doCreatureAddHealth(target, -50) elseif isCreature(target) == false then player:sendTextMessage(MESSAGE_STATUS_WARNING, "You can only skin creatures.") -- The error message it will give if the player is trying to skin something that isn't a creature. else player:sendTextMessage(MESSAGE_STATUS_WARNING, "You cannot skin this creature.") -- The error message it will give if t he player is trying to skin a creature which isn't added in the configuration above. return true end end
  5. Olá povo do TK! Vim aqui pra pedir que me tragam suas idéias para sistemas de um servidor RPG, o qual poderá ou não ser finalizado, já que está sendo feito para estudo. Nota: Sistemas que forem concluídos, se não forem usados no servidor final, serão disponibilizados ao público. Idéias Aceitas: [Nome da Idéia] - @Usuário
  6. Oneda reagiu a uma resposta no tópico: Dinimuir o tempo de atualizaçao
  7. Exatamente isso, [7171]~[7172] Se não funcionar, avisa... Outra, tenta conferir com conexão de algum amigo, pode ser que seja só esse site te dando resultados falhos. ~Edit: Estranho, você disse que já tentou liberar UDP também, né?
  8. Tentou liberar tanto TCP como UDP? Faz isso, se continuar não dando, aumenta o range das ports pra 7171-7172.
  9. Voltemos ao início, qual IP você colocou aí? Se não foi teu IP local já tá errado.
  10. Sim, eu sei. Já tá marcado tudo certo. Eu já to com os arquivos na mesma pasta do mapa, o mapa carrega. Mas não carrega os spawns. Erro é o seguinte: Failed to load houses, Failed to load spawns. Porém, os arquivos de spawns e houses estão na pasta do mapa.
  11. Então, to tentando abrir o mapa do seu PokexCyan, mas, tem um pequeno detalhe... Ele abre normal e tudo mais, mas dá erro na hora de dar load nos arquivos spawn e houses.... (PokexCyan-houses.xml, PokexCyan-spawn.xml)
  12. Recomendo que quem baixe o servidor, dêem uma olhada nas actions... Principalmente no script "bruno5"
  13. Tem como me linkar o RME pra Extended? Não consegui achar ele. Att, Oneda.
  14. Me salvem, pelo amor! Qual mapa editor devo usar? Já tentei de tudo com a maioria das versões do RME que suporta 8.54! Socorro! D:
  15. Opa, então galera, o negócio é o seguinte, tenho um servidor TFS 1.0, para Tibia 10.36, tá em construção ainda, porém não consigo colocar ele p/ funcionar... Quando um membro da equipe tentou logar nele, ficava em um loading infinito (da character list), e quando eu tento entrar nele (sim usei meu IPV4) dava que o servidor estava offline, sendo que está online. Info: TFS 1.0 Versão Tibia: 10.36 S.O: Windows 7 Ultimate, 64 bits. Check de Ports: Config.lua: (Não mostrarei o IP pelo fato de que é o IP oficial do projeto, resumo: é um IP fixo do NO-IP.ORG (está atualizado certinho com meu IP Global e na configuração está certo.) Edit¹: Ele vai até a lista de characters, porém quando tento entrar no char, dá offline. (Para mim, no computador do membro da staff ele fica dando loading infinito na lista de characters)
  16. Isso não conflitaria com as sources do servidor e mandaria uma mensagem duplicada de levelup? Sendo uma em inglês e a outra "mudada"? Não consigo testar no momento. Desculpa o Bump em um post avô, mas necessito sanar essa minha dúvida.

Informação Importante

Confirmação de Termo