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

VirrageS

←•†ĿuĀ && ©¤¤•→
Joined
May 30, 2010
Messages
984
Reaction score
63
Location
Poland
Hello

I need to covert this spell to that I will can transform not only wolf but another monster like :
  • Bear (will add shielding)
  • Chicken (will add speed)
  • Lion (I don't know :p)

And if I say:
Code:
[COLOR="red"]transform "[B][SIZE="4"]Bear[/SIZE][/B][/COLOR]
or

[COLOR="red"]transform "[B][SIZE="4"]Wolf[/SIZE][/B][/COLOR]
or

[COLOR="red"]transform "[B][SIZE="4"]Chicken[/SIZE][/B][/COLOR]
...
then I will be transformed to this monster

but when I say
Code:
[COLOR="red"]transform "[B][SIZE="4"]Demon[/SIZE][/B][/COLOR]
then will show message that "You can't transform to this monster" or something like that

Spell:
Lua:
local time = 120 * 1000        -- 120 * 1000 = 2 min
local addShielding = 200       -- how much shielding should be added


local wolf = {lookType = 52, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, addShielding)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)

local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 5, -500, 5, -500)
setCombatCondition(combat, speed)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, time)
addOutfitCondition(outfit, wolf)
setCombatCondition(combat, outfit)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, time)
setCombatCondition(combat, exhaust)

function onCastSpell(cid, var)
        return doCombat(cid, combat, var)
end

I will be very thankful if someone will do it
:thumbup: ^_^
 
Back
Top Bottom