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

Lua [Spell] Polymorph Rune

Demnish

Tibian Hero
Joined
Sep 28, 2011
Messages
402
Solutions
2
Reaction score
65
Location
Sweden
Distro: OTServ 0.6.4 STABLE
Client: 8.6


Console error:
polymorph.lua:21: ',' expected near 'do'

Script:
polymorph.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, 20000)

local animals = {
    276, -- cat
    111, -- chicken
    32, -- dog
    212, -- flamingo
    224, -- frog
    60, -- pig
    21, -- rat
    14, -- sheep
    197, -- tortoise
    28 -- snake
}

local animal = animals[math.random(animals)]

for animal = animals[math.random(animals)] do
    addOutfitCondition(outfit, {lookTypeEx = animal})
end
local muted = createConditionObject(CONDITION_MUTED)
setConditionParam(regen, CONDITION_PARAM_TICKS, 20000)
local regen = createConditionObject(CONDITION_REGENERATION)
setConditionParam(regen, CONDITIONATTR_HEALTHGAIN, 100)
setConditionParam(regen, CONDITIONATTR_MANAGAIN, 100)
setConditionParam(regen, CONDITIONATTR_HEALTHTICKS, 1000)
setConditionParam(regen, CONDITIONATTR_MANATICKS, 1000)
setConditionParam(regen, CONDITION_PARAM_TICKS, 20000)
setCombatCondition(combat, outfit)
setCombatCondition(combat, muted)
setCombatCondition(combat, regen)
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

Could need some assistance, this was too big for me.
 
Distro: OTServ 0.6.4 STABLE
Client: 8.6


Console error:


Script:
polymorph.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, 20000)

local animals = {
    276, -- cat
    111, -- chicken
    32, -- dog
    212, -- flamingo
    224, -- frog
    60, -- pig
    21, -- rat
    14, -- sheep
    197, -- tortoise
    28 -- snake
}

local animal = animals[math.random(animals)]

for animal = animals[math.random(animals)] do
    addOutfitCondition(outfit, {lookTypeEx = animal})
end
local muted = createConditionObject(CONDITION_MUTED)
setConditionParam(regen, CONDITION_PARAM_TICKS, 20000)
local regen = createConditionObject(CONDITION_REGENERATION)
setConditionParam(regen, CONDITIONATTR_HEALTHGAIN, 100)
setConditionParam(regen, CONDITIONATTR_MANAGAIN, 100)
setConditionParam(regen, CONDITIONATTR_HEALTHTICKS, 1000)
setConditionParam(regen, CONDITIONATTR_MANATICKS, 1000)
setConditionParam(regen, CONDITION_PARAM_TICKS, 20000)
setCombatCondition(combat, outfit)
setCombatCondition(combat, muted)
setCombatCondition(combat, regen)
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

Could need some assistance, this was too big for me.
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, 20000)

local animals = {
    276, -- cat
    111, -- chicken
    32, -- dog
    212, -- flamingo
    224, -- frog
    60, -- pig
    21, -- rat
    14, -- sheep
    197, -- tortoise
    28 -- snake
}

local animal = animals[math.random(#animals)]
addOutfitCondition(outfit, {lookType = animal})

local muted = createConditionObject(CONDITION_MUTED)
setConditionParam(regen, CONDITION_PARAM_TICKS, 20000)
local regen = createConditionObject(CONDITION_REGENERATION)
setConditionParam(regen, CONDITIONATTR_HEALTHGAIN, 100)
setConditionParam(regen, CONDITIONATTR_MANAGAIN, 100)
setConditionParam(regen, CONDITIONATTR_HEALTHTICKS, 1000)
setConditionParam(regen, CONDITIONATTR_MANATICKS, 1000)
setConditionParam(regen, CONDITION_PARAM_TICKS, 20000)
setCombatCondition(combat, outfit)
setCombatCondition(combat, muted)
setCombatCondition(combat, regen)
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
I get this in the console:
Lua Script Error: [Spell Interface]
data/spells/scripts/custom/polymorph.lua

LuaScriptInterface::luaAddOutfitCondition(). Condition not found

Lua Script Error: [Spell Interface]
data/spells/scripts/custom/polymorph.lua

LuaScriptInterface::luaSetConditionParam(). Condition not found

Lua Script Error: [Spell Interface]
data/spells/scripts/custom/polymorph.lua

LuaScriptInterface::luaSetCombatCondition(). Combat not found

Lua Script Error: [Spell Interface]
data/spells/scripts/custom/polymorph.lua

LuaScriptInterface::luaSetCombatCondition(). Combat not found

Lua Script Error: [Spell Interface]
data/spells/scripts/custom/polymorph.lua

LuaScriptInterface::luaSetCombatCondition(). Combat not found
 
Back
Top