Ir para conteúdo
Propaganda

Falls

Membro
  • Total de Posts

    4
  • Registro em

  • Última visita

  • Dias Ganhos

    1

Tudo que Falls postou

  1. como criar um documento ja escrito que não pode ser apagado ou reescrito. exemplo : [Hidden Content]
      • 49
      • Like
      • Thanks
      • Haha
      • Confused
      • Sad
  2. function onStatsChange(cid, attacker, type, combat, value) -- This should block all damage monster cause on eachother expect player summons if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false end end return true end
  3. weapon.lua ---------------------------------------- function onTargetCreature(creature, target) return target:registerEvent("lifesteal") end local combat = Combat() combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) combat:setParameter(COMBAT_PARAM_BLOCKSHIELD, 1) combat:setParameter(COMB, COMBAT_PHYSICALDAMAGE) combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0) combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") function onUseWeapon(player, variant) return combat:execute(player, variant) end --------------------------------------------------- creaturescripts/creaturescripts.xml <event type="healthchange" name="lifesteal" script="lifesteal.lua"/> ---------------------------------------- creaturescripts/scripts/lifesteal.lua local cfg = { weaponId = 16162, chance = 10, percent = 10 } function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) local damage = primaryDamage + secondaryDamage if attacker:isPlayer() then if math.random(100) <= cfg.chance then local weapon = attacker:getSlotItem(CONST_SLOT_LEFT) if weapon and weapon:getId() == cfg.weaponId then attacker:addHealth(damage * (cfg.percent/100)) end end end creature:unregisterEvent("lifesteal") return primaryDamage, primaryType, secondaryDamage, secondaryType end
  4. gostaria de um sistema em que o player usar um item nele, e quando ele bater no monstro ou outro player ele enchesse um pouco da mana e do life por porcentagem do dano causado, e com tempo de duração de duas horas depois tem que usar o item novamente. tfs 0.3.6 +rep
×
  • Criar Novo...