Ir para conteúdo

MaTTch

Membro
  • Registro em

  • Última visita

Tudo que MaTTch postou

  1. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Como assim? você quer que fique saindo efeitos tipo um buff?
  2. elseif spell == "Leech Seed" then setPlayerStorageValue(cid, 498587, 1) for var = 1,10 do addEvent(function() if not target then return false end if getPlayerStorageValue(cid, 498587) == 1 then local life = getCreatureHealth(target) local newlife = life - getCreatureHealth(target) doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 1) doAreaCombatHealth(cid, GRASSDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 14) doSendMagicEffect(getThingPosWithDebug(cid), 12) doSendMagicEffect(getThingPosWithDebug(target), 45) if newlife >= 1 then doCreatureAddHealth(cid, newlife) doSendAnimatedText(getThingPosWithDebug(cid), "+"..newlife.."", 32) end end end, 1000*var) end
  3. Então crie uma função local para fazer a mesma coisa que esse addEvent, e coloca pra checar o target. Caso não souber, manda o script no tópico, ou se for algo "próprio, particular ou único", manda por PM.
  4. Vou dar um exemplo de como parar o for: if not target then break end
  5. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Bom... como o próprio titulo já diz, estou com alguns erros na finalização da compilação, quando ele vai criar o executor, aparece este seguinte erro: Compilação: TFS 0.4 - Rev 3884 - 8.60 Agradeço a quem ajudar. --------#EDIT---------- Consegui arrumar, trocando a rev para 3777
  6. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    Não.
  7. Não. O tile_items é apenas para pisos de houses.
  8. DELETE FROM `tile_items`; Executa esse comando na sua database com o server offline.
  9. local config = { boss = "nome", pos = {x=1000, y=1000, z=7}, msg = "You have been trapped by a nightmare.", time = 60 -- quantos segundos depois de matar o boss } function onKill(cid, target) if isMonster(target) and getCreatureName(target):lower() == config.boss:lower() then doTeleportThing(cid, config.pos) addEvent(function() if isPlayer(cid) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.msg) end end,config.time*1000) end return true end OBS: precisa registrar em login.lua
  10. MaTTch postou uma resposta no tópico em Playground (Off-topic)
  11. Substitui por sprites que você não usa, ou já comece a ver tutoriais sobre OTClient.
  12. local condition = createConditionObject(CONDITION_POISON) addDamageCondition(condition, 20, 700, -200) local storage = 600 function onCombat(cid, target) if isPlayer(cid) and getPlayerStorageValue(cid, storage) >= 1 and getDistanceBetween(getThingPos(cid), getThingPos(target)) <= 1 then return doAddCondition(target, condition) and setPlayerStorageValue(cid, storage, -1) end return true end
  13. Pra por tempo basta usar o os.time(), tipo: setPlayerStorageValue(cid, storage, segundos + os.time()) e getPlayerStorageValue(cid, storage) - os.time()
  14. "na verdade é o catador de..."
  15. Spell: local storage = 600 function onCastSpell(cid, var) if storage >= 1 then doPlayerSendCancel(cid, "You're already with Poisoned Attack.") doSendMagicEffect(getThingPos(cid), 2) return false end setPlayerStorageValue(cid, storage, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you are with Poisoned Attack.") return true end a tag você ja deve saber colocar. Em creaturescripts: local condition = createConditionObject(CONDITION_POISON) addDamageCondition(condition, 20, 700, -200) local storage = 600 function onCombat(cid, target) if isPlayer(cid) and getPlayerStorageValue(cid, storage) >= 1 then return doAddCondition(target, condition) and setPlayerStorageValue(cid, storage, -1) end return true end Tag: <event type="combat" name="PoisonedAttack" event="script" value="NOME DO ARQUIVO.lua" /> e finalmente em login.lua registerCreatureEvent(cid, "PoisonedAttack") o resto você ja deve saber o que fazer. Não sei se era isso que você tava querendo, mas ta ai.
  16. Acho que você errou nessa parte: local kill = getPlayerStorageValue(cid, 9755) ele ta pegando o storage do cid, no caso, o storage do Orc.
  17. Mas essa magia vai ser tipo um "encantamento" com o arma que você estiver usando, ou vai ser pra qualquer arma que você usar?
  18. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    Deitado.
  19. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    https://www.youtube.com/watch?v=g1bhEVxClMI
  20. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Execute esse comando na sua database com o server offline: DELETE FROM `player_items`;DELETE FROM `tile_items`;DELETE FROM `player_depotitems` WHERE `itemtype` != 2594;
  21. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Vá em config.lua, procure por showHealingDamage e deixe em true, ficando assim: showHealingDamage = true Agora caso você quiser isso apenas nesta magia, desta forma é impossível sem alteração nas sources. A não ser que você coloque um callback...
  22. O limite de 254 efeitos é no client.
  23. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Repare que onde era local function onCastSpell1(parameters) doCombat(parameters.cid, weapon1, parameters.var) end agora é local function onCastSpell1(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, weapon1, parameters.var) end foi colocado uma checagem para caso houver um caster, executar a spell
  24. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    local weapon1 = createCombatObject() local weapon2 = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 44) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) function onGetFormulaValues(cid, level, maglevel) min = (level*4) + (level*3) max = (level*4) +(level*3) +500 return -min, -max end setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 34) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) function onGetFormulaValues(cid, level, maglevel) min = (level*4) + (level*3) max = (level*4) +(level*3) +500 return -min, -max end setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 34) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) function onGetFormulaValues(cid, level, maglevel) min = (level*4) + (level*3) max = (level*4) +(level*3) +500 return -min, -max end setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 66) function onGetFormulaValues(cid, level, maglevel) min = (level*4) + (level*3) max = (level*4) +(level*3) +500 return -min, -max end setCombatCallback(combat4, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local arr3 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local arr4 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(weapon1, area1) setCombatArea(weapon2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) function onTargetTile(cid, pos) doCombat(cid,combat1,positionToVariant(pos)) end function onTargetTile2(cid, pos) doCombat(cid,combat2,positionToVariant(pos)) end setCombatCallback(weapon1, CALLBACK_PARAM_TARGETTILE, "onTargetTile") setCombatCallback(weapon2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2") local function onCastSpell1(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, weapon1, parameters.var) end local function onCastSpell2(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, weapon2, parameters.var) end local function onCastSpell3(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat4, parameters.var) end function onCastSpell(cid, var) local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4 } addEvent(onCastSpell1, 200, parameters) addEvent(onCastSpell2, 400, parameters) addEvent(onCastSpell3, 500, parameters) addEvent(onCastSpell4, 400, parameters) return true end
  25. O texto animado é limitado para somente 9 caracteres.

Informação Importante

Confirmação de Termo