• 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!

[request] spells TFS 0.3.6

Andréew

Humble mapper.
Joined
Apr 14, 2015
Messages
833
Solutions
2
Reaction score
1,929
Location
Sweden
Hi!

Im on this project to make an server with a lot of customisation stuff.
And new vocations/redefined vocations is a part of that and so is spells!

I would like my druid to have a spell which allows him to transfer to a wolf for 300 seconds and gain some attack (fist fighting) and shielding.. Would be cool if you were able to make attack speed and running speed faster aswell! There is a similar script here on the forums but i get error when i run it.
(Sorry can't post it, im at work)
Would like a spell to become a bear and more tank like but i can modify wolf script!

I Also would like a spell for my hunter voc.
A spell that summons a creature "bear" that fights by players side and does a spell that taunts monsters to attack it instead of player. No need for any specific time frame but only 1 or 2 "pets" at time.

Thanks!
 
This should be in the request board, I don't have a server to test this on but try this out.
Code:
local time_ = 300 * 1000
local shieldBuff = 50
local fistBuff = 50
local combat = {}
local condition = {}

local param = {
    [1] = {CONDITION_PARAM_SKILL_SHIELD, 100 + shieldBuff},
    [2] = {CONDITION_PARAM_SKILL_FIST, 100 + fistBuff},
    [3] = {lookType = 16, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},
    [4] = {0.3, -24, 0.3, -24}
}

local effects = {
    [1] = CONDITION_ATTRIBUTES,
    [2] = CONDITION_ATTRIBUTES,
    [3] = CONDITION_OUTFIT,
    [4] = CONDITION_HASTE
}

local buff = {
    [1] = {CONDITION_PARAM_BUFF, true},
    [2] = {CONDITION_PARAM_BUFF, true},
    [3] = {CONDITION_PARAM_BUFF, false},
    [4] = {CONDITION_PARAM_BUFF, false}
}

for k, v in ipairs(effects) do
    combat[k] = createCombatObject()
    setCombatParam(combat[k], COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
    setCombatParam(combat[k], COMBAT_PARAM_AGGRESSIVE, false)
    condition[k] = createConditionObject(effects[k])
    setConditionParam(condition[k], CONDITION_PARAM_TICKS, time_)
    setConditionParam(condition[k], unpack(param[k]))
    if buff[k][2] then
        setConditionParam(condition[k], unpack(buff[k]))
    end
    setCombatCondition(combat[k], condition[k])
end


function onCastSpell(cid, var)
    for i = 1, #combat do
        doCombat(cid, combat[i], var)
    end
    return true
end
 
Last edited:
Sorry for posting in the wrong section. Im on my cellphone hah :)

I will try the code once i get home from work, thanks for your effort codex!
 
Updated see if this works with the outfit
Code:
local time_ = 300 * 1000
local shieldBuff = 50
local fistBuff = 50
local combat = {}
local condition = {}
-- check your monster directory for the looktypes of creatures, 27 is wolf
local outfit = {lookType = 27, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}

local param = {
    [1] = {CONDITION_PARAM_SKILL_SHIELD, 100 + shieldBuff},
    [2] = {CONDITION_PARAM_SKILL_FIST, 100 + fistBuff},
    [3] = {0.3, -24, 0.3, -24}
}

local effects = {
    [1] = CONDITION_ATTRIBUTES,
    [2] = CONDITION_ATTRIBUTES,
    [3] = CONDITION_HASTE
}

local buff = {
    [1] = {CONDITION_PARAM_BUFF, true},
    [2] = {CONDITION_PARAM_BUFF, true},
    [3] = {CONDITION_PARAM_BUFF, false}
}

for k, v in ipairs(effects) do
    combat[k] = createCombatObject()
    setCombatParam(combat[k], COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
    setCombatParam(combat[k], COMBAT_PARAM_AGGRESSIVE, false)
    condition[k] = createConditionObject(effects[k])
    setConditionParam(condition[k], CONDITION_PARAM_TICKS, time_)
    setConditionParam(condition[k], unpack(param[k]))
    if buff[k][2] then
        setConditionParam(condition[k], unpack(buff[k]))
    end
    setCombatCondition(combat[k], condition[k])
end


function onCastSpell(cid, var)
    for i = 1, #combat do
        doCombat(cid, combat[i], var)
    end
    doSetCreatureOutfit(cid, outfit, time_)
    return true
end
 
Yes! that one work!
however i do get an error in server console
359cryd.png


but the spell works fine ingame.
would it be possible to make it so when you are in the form you can not cast any spells?
also unequip weapon so you actually use your fists/paws would it be possible? ;)

i did notice while playing around with it, the shielding buff does not work.

so whats working is, outfit ( wolf ) and fist skill. Whats not working is shielding skill and that error in console.
 
Last edited:
If the shield buff doesn't work and everything else does then error luaSetConditionParam is reffering to the shield buff.
I'm preoccupied with other things at the moment but if I have time later I'll setup a server.

Your using crying damson 0.3.6 v8.2 correct?
 
Back
Top