
Tudo que Wise postou
- O seu novo Tibia King!
-
Ao clicar em item ele realiza uma talkaction
Como Vodkart disse, basta: function onUse(cid) return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Your current position is [X: '..getCreaturePosition(cid).x..' | Y: '..getCreaturePosition(cid).y..' | Z: '..getCreaturePosition(cid).z..']') end
-
[BETA] Quest Maker
Código simples em C++ que pode ajudar muitos tibianos que não programam. É isso aí
-
[Heal] A partir de x porcentagem do life
@avalax percentheal.lua (data\spells\scripts) local time, percent, key = 30, 20, 34567 -- seconds, %, storage key local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) function onCastSpell(cid, var) local function healPercent(uid, perc) return getPlayerStorageValue(uid, key) > os.time() and getCreatureHealth(uid) <= perc * (getCreatureMaxHealth(uid) / 100) and doCombat(uid, combat, var) and addEvent(function() if isPlayer(uid) then healPercent(uid, perc) end end, 1000) or true end return setPlayerStorageValue(cid, key, os.time() + time) and healPercent(cid, percent) end spells.xml (data\spells) <instant name="Percentage Healing" words="NAME" lvl="9" mana="20" aggressive="0" selftarget="1" exhaustion="30000" needlearn="0" event="script" value="percentheal.lua"> <vocation id="1"/> <vocation id="2"/> </instant> E há, porém eu não vi nenhum double post. Dar UP é permitido, desde que haja um intervalo de 48 horas entre cada um deles.
-
[Pedido] Magia Para Monstro
Tag (ex): <instant name="Paramonster" words="paramonster" lvl="1" mana="1" prem="0" aggressive="0" needtarget="1" exhaustion="5000" needlearn="0" event="script" value="paramonster.lua"> Eu disse errado, só é possível o uso do lookType; releia minha explicação sobre a estatua.
-
(Resolvido)Treiners Anti AFK
Não vi que era essa versão, enfim, obrigado @Bruno Minervino.
-
aumentar velocidade do helmet debaixo d'água
drown.lua (data\movements\scripts) PS: caso já exista (imagino que deve existir), apenas substitua o script local speed, key = 100, 45678 -- value, storage key local condition = createConditionObject(CONDITION_DROWN) setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -20) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000) local function checkDrowning(uid) local item = 5461 -- Helmet of the Deep Id if getPlayerSlotItem(uid, CONST_SLOT_HEAD).itemid == item and getPlayerStorageValue(uid, key) < 1 then doChangeSpeed(uid, getCreatureSpeed(uid) + speed) setPlayerStorageValue(uid, key, 1) elseif not getPlayerSlotItem(uid, CONST_SLOT_HEAD).itemid == item and getPlayerStorageValue(uid, key) > 0 then doChangeSpeed(uid, getCreatureSpeed(uid) - speed) setPlayerStorageValue(uid, key, -1) end return true end function onStepIn(cid) return isPlayer(cid) and doAddCondition(cid, condition) and checkDrowning(cid) or true end function onStepOut(cid) return getPlayerStorageValue(cid, key) > 0 and doChangeSpeed(cid, getCreatureSpeed(cid) - speed) and setPlayerStorageValue(cid, key, -1) and doRemoveCondition(cid, CONDITION_DROWN) or doRemoveCondition(cid, CONDITION_DROWN) end movements.xml (data\movements) <movevent type="StepIn" fromid="5405" toid="5410" event="script" value="drown.lua"/> <movevent type="StepOut" fromid="5405" toid="5410" event="script" value="drown.lua"/>
-
Como Deixar a Ml e Outras Skills Para de Up Quando Chegar Em Determinado Numero
maxadvance.lua (data\creaturescripts\scripts) local t = { [0] = 120, -- fist [1] = 120, -- club [2] = 120, -- sword [3] = 120, -- axe [4] = 120, -- distance [5] = 120, -- shielding [6] = 120, -- fishing [7] = 120, -- magic level [8] = 120 -- level } function onAdvance(cid, skill, oldlevel, newlevel) local s = t[skill] return s and newlevel > s and false or true end creaturescripts.xml (data\creaturescripts) <event type="advance" name="MaxAdvance" event="script" value="maxadvance.lua"/> Registre o creature event em login.lua (data\creaturescripts\scripts) registerCreatureEvent(cid, "MaxAdvance")
-
[Pedido] Magia Para Monstro
Sim, desde que ela contenha o atributo needtarget com o valor igual a 1. Não, lookType.
-
aumentar velocidade do helmet debaixo d'água
E qual seria a condição em seu servidor que determina que o creatureid está "debaixo d'água"?
-
!aol !bless !loot no TFS 1.2 ServerVersao 10.78
@moviebr Releia o título do tópico: no TFS 1.2 ServerVersao 10.78
-
Como Deixar a Ml e Outras Skills Para de Up Quando Chegar Em Determinado Numero
local t = { [0] = 120, -- fist [1] = 120, -- club [2] = 120, -- sword [3] = 120, -- axe [4] = 120, -- distance [5] = 120, -- shielding [6] = 120, -- fishing [7] = 120, -- magic level [8] = 120 -- level } function onAdvance(cid, skill, oldlevel, newlevel) local s = t[skill] return s and newlevel > s and false or true end A tag deve ser referente ao creature event onAdvance (event type="advance") e também deve ser registrado em login.lua
-
(Resolvido)Comando que mostra se o servidor está PVP ou NO-PVP
Disponha ;]
-
[Pedido] Magia Para Monstro
Pronto, já corrigi. 333 é o lookType da estatua (a mesma que a medusa transforma os creatureids); fora isso, não vejo como adequar em Lua a transformação do player em um itemid. E sim, vai voltar após 5000 milissegundos. Se você fizer uso de um addEvent em função, dá sim.
-
(Resolvido)Addon Bonus
Pronto, já corrigi.
- kraleo
-
[Pedido] Magia Para Monstro
local time = 5 -- seconds local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local statue = createConditionObject(CONDITION_OUTFIT) setConditionParam(statue, CONDITION_PARAM_TICKS, 1000 * time) setConditionParam(statue, CONDITION_PARAM_OUTFIT, 333) setCombatCondition(combat, statue) function onCastSpell(cid, var) local v = variantToNumber(var) return isPlayer(v) and doCombat(v, combat, var) and doCreatureSetNoMove(v, true) and addEvent(function() if isPlayer(v) then doCreatureSetNoMove(v, false) end end, 1000 * time) or false end
-
(Resolvido)Addon Bonus
No script da spell, procure por: return doCombat(cid, combat, var) E substitua por (de acordo com a vocação da spell): --Druid: local lookType = {148, 144} -- {female, male} return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Druid full addons to cast this spell.') and false --Sorcerer: local lookType = {138, 130} -- {female, male} return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Mage full addons to cast this spell.') and false --Knight: local lookType = {142, 134} -- {female, male} return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Warrior full addons to cast this spell.') and false --Paladin: local lookType = {156, 152} -- {female, male} return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Assassin full addons to cast this spell.') and false
-
[Procuro]Base com Pokemons 1° a 5° geraçao :D Com shiny e boost stone Funcionando :D Quero criar um OT :D REP+++ help
@Alysson334 Além de reviver um tópico, você ainda fez um comentário ofensivo e que não tem conteúdo algum. Mesmo quando não gostar de algo, não faça comentários depreciativos ou grosseiros. Espero que isso não se repita, releia as Regras do fórum.
-
(Resolvido)Comando que mostra se o servidor está PVP ou NO-PVP
function onSay(cid) local player = Player(cid) return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'World type is currently: '..Game.getWorldType() == 1 and 'Non-PvP' or Game.getWorldType() == 2 and 'PvP' or 'PvP-Enforced') end
-
[Pedido] Invasão Aleatoria
Não vejo erros no script; acabei de testar e executou sem problemas. Você não modificou algo por engano?
-
(Resolvido)Addon Bonus
Apenas ter o addon ou teria que estar usando ele? First ou second addon? Especifique.
-
Anti Divulgação em LUA
É, eu acabei retornando true por engano. Enfim, basta utilizar o último parâmetro da função de modo a desativar os patterns para que o script execute como você quer. local w = {'.org', '.no-ip', '.net', '.com', '.pl', '.biz', '.servegame', '.br', '.sytes', '.info'} function onSay(cid, words) for _, word in ipairs(w) do if words:lower():find(word, 1, true) then return doPlayerSendCancel(cid, 'You can\'t send this message.') end end return false end
-
Preciso de GM no meu serve
Preste mais atenção, assim não precisa fazer posts desnecessários. Releia o post principal do tópico:
-
(Resolvido)Ideia para uma Quest! Ajuda a Fazer?
É um movement script, portanto basta por o actionid da tag no tile desejado via Remere's Map Editor.