renancs
New Member
- Joined
- Jul 8, 2008
- Messages
- 252
- Reaction score
- 3
Well, i create this script and i want to put this script to work:
when player use this spell, he go loss shield, gain speed and change your vocation for gain attack speed, how can i put,
to when the time end, the vocation back to vocation "2", without the attack speed, the shield, and speed, leave normaly,
only the vocation i have problem, someone can help me?
when player use this spell, he go loss shield, gain speed and change your vocation for gain attack speed, how can i put,
to when the time end, the vocation back to vocation "2", without the attack speed, the shield, and speed, leave normaly,
only the vocation i have problem, someone can help me?
Lua:
local time = 20 * 1000 -- 120 * 1000 = 2 min
local addShielding = -50 -- how much shielding should be added
local wolf = {lookType = 318, 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, 0.3, -24, 0.3, -24)
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, 3)
setCombatCondition(combat, exhaust)
function onCastSpell(cid, var)
doPlayerSetVocation(cid, 15)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
return doCombat(cid, combat, var)
end