• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

RevScripts Spell Sword

RigBy

Member
Joined
Jun 9, 2015
Messages
44
Solutions
1
Reaction score
6
Sorry for my English, someone can tell me why this doesn't work, I'm learning the program in tfs 1.3 and I still don't know how to register the scripts, if anyone can fix it, I'm using otx12.64

Lua:
local weapon = Weapon(WEAPON_CLUB)

local area = createCombatArea({
    {1, 1, 1},
    {1, 3, 1},
    {1, 1, 1}
})

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BURSTARROW)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
combat:setArea(area)

function weapon.onUseWeapon(player, variant)
    if player:getSkull() == SKULL_BLACK then
        return false
    end

    return combat:execute(player, variant)
end

weapon:id(2391)
weapon:register()
Post automatically merged:

I tested it on fire magic longsword and it worked but it doesn't work on sword usable :/ does anyone know why?
Post automatically merged:

I was testing and in most of the sword, club, ax, it doesn't work but if I register other items it works.
Post automatically merged:



the same but it doesn't work
 
Last edited:
Top