Kage Thunder
Advanced User
- Joined
- Sep 30, 2012
- Messages
- 184
- Reaction score
- 3
Witam, mam problem ot?? spr?bowa?em zrobi? skrypt, dzia?a tylko ?e jest problem, zamiast dodawac melee % to dodaje skille i to w sporej ilo?ci i nie wiem co jest nie tak, m?g?by kto? pom?c ?eby dodawa?o +15% melee, drugi na tej samej zasadzie +15% magic a trzeci +15% prot all? Bo jak ja pr?buje to wszystko dodaje skille a jest napisane "meleepercent" wiec co? nie halo z g?ry dzi?ki.
[LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 55)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 100000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 115)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 1000) == 0 then
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 1000, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Buff On")
else
doRemoveCondition(cid, CONDITION_PARAM_SKILL_MELEEPERCENT)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Buff Off")
setPlayerStorageValue(cid, 1000, 0)
end
end[/LUA]
[LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 55)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 100000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 115)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 1000) == 0 then
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 1000, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Buff On")
else
doRemoveCondition(cid, CONDITION_PARAM_SKILL_MELEEPERCENT)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Buff Off")
setPlayerStorageValue(cid, 1000, 0)
end
end[/LUA]