Sentielo
Advanced OT User
- Joined
- Feb 3, 2008
- Messages
- 2,388
- Reaction score
- 226
Hello,
I have got some spells which aren't working (properly).
I hope somebody would be able to help me fixing them.
Info
-The bold letters tells what the spells should do
-Between code tags shows the current script
-Italic letter shows what it currently do
Sharpshooter Smoke Wave (reduces your Distance Skill 60%-75% for 20 seconds)
It works, but it removes between 60 or 75 skill insteed of percentage.
Summons 8 Slimes at once
Containing this error report:
I have got some spells which aren't working (properly).
I hope somebody would be able to help me fixing them.
Info
-The bold letters tells what the spells should do
-Between code tags shows the current script
-Italic letter shows what it currently do
Sharpshooter Smoke Wave (reduces your Distance Skill 60%-75% for 20 seconds)
Code:
local condition, combat = {}, {}
for i = -75, -60 do
combat[i] = createCombatObject()
setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_POFF)
condition[i] = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition[i], CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition[i], CONDITION_PARAM_SKILL_DISTANCEPERCENT, i)
setCombatCondition(combat[i], condition[i])
setCombatArea(combat[i], createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5))
end
function onCastSpell(cid, var)
return doCombat(cid, combat[-math.random(60, 75)], var)
end
Summons 8 Slimes at once
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_BLUESHIMMER)
setCombatArea(combat, area)
local maxsummons = 8
function onCastSpell(cid, var)
local summoncount = getCreatureSummons(cid)
if #summoncount < 8 then
for i = 1, maxsumons - #summoncount do
doConvinceCreature(cid, doSummonCreature("Slime", getCreaturePosition(cid)))
end
end
return doCombat(cid, combat, var)
end
Last edited by a moderator: