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

Trans into Bear.

Donio

Banned User
Joined
Jun 24, 2008
Messages
4,004
Reaction score
16
Location
Manhattan, New York
Hello im having some problems with a spell in my server.. when you do utito trans bear you will transfrom to a bear and have 20+ more shielding.. but its not working.. here is the spell:

Code:
  --[[
        Bear transform
]]--

local time = 120 * 1000        -- 120 * 1000 = 2 min
local addShielding = 20        -- how much shielding should be added
local addMagic = 3        -- how much magic should be added


local bear = {lookType = 16, 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_SKILL_MAGIC, addMagic)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)

local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 0.7, -56, 0.7, -56)
setCombatCondition(combat, speed)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, time)
addOutfitCondition(outfit, bear.lookTypeEx, bear.lookType, bear.lookHead, bear.lookBody, bear.lookLegs, bear.lookFeet)
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

Code:
		<instant name="Bear Transform"  words="utito trans bear" lvl="80" mana="800" prem="1"  aggressive="0" selftarget="1"  exhaustion="1000" needlearn="0" script="bear.lua">
         <vocation name="1"/>
         <vocation name="5"/>
    </instant>

There isnt any errors in consol either
 
There isnt any errors in consol either.

There aren't any errors...
Btw, I don't think it should be like this

PHP:
<vocation name="1"/>
         <vocation name="5"/>
Shouldn't those be included in the first line?
 
@Korrex its for sorc and master sorc only, or atleast I want it to be :eek:

also its fixed now but every one can use it and as I mentioned I only need it to work for sorc and master sorc
 
Code:
		<instant name="Bear Transform"  words="utito trans bear" lvl="80" mana="800" prem="1"  aggressive="0" selftarget="1"  exhaustion="1000" needlearn="0" script="bear.lua">
         <vocation id="1"/>
         <vocation id="5"/>
    </instant>
 
Make lika an action/talkactions smaller script + you just need to make like

doPlayerAddMana(cid, -400) if the spelltakes 400 mana ex.
 
Back
Top