Hey, folks!
I'm relatively interested in how I could make it charge 1 rune upon usage, and if any player(s) is detected in the pos2 interval, it should move the player(s) one step forward/backward, so that the rune can conduct its creation properly.
Server Information:
》TFS Version: 0.4
》Client: 8.60
I'm relatively interested in how I could make it charge 1 rune upon usage, and if any player(s) is detected in the pos2 interval, it should move the player(s) one step forward/backward, so that the rune can conduct its creation properly.
Server Information:
》TFS Version: 0.4
》Client: 8.60
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
local arr = {
{0, 1, 0},
{0, 3, 0},
{0, 1, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
local t = {
{{x = 1282, y = 995, z = 7}, {x = 1283, y = 995, z = 7}}
}
function onCastSpell(cid, var)
local pos = getThingPos(cid)
local pos2 = {x = 1286, y = 992, z = 7}
for i = 1, #t do
if isInRange(pos, unpack(t[i])) and isCreature(cid) then
return
doCombat(cid, combat, positionToVariant(pos2))
end
end
end