Forkz
Well-Known Member
- Joined
- Jun 29, 2020
- Messages
- 360
- Solutions
- 1
- Reaction score
- 76
Hi otlanders,
Below is the spells script. When the summon is generated the player cannot go through the "summon" and also the "summon" does not generate in places that have no space. can anybody help me?
How it works in practice
Places where there are walls or PZ area
Below is the spells script. When the summon is generated the player cannot go through the "summon" and also the "summon" does not generate in places that have no space. can anybody help me?
Lua:
function onTargetTile(cid, position)
position.stackpos = 255
doConvinceCreature(cid, doCreateMonster("headcaptor", position, false))
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
return true
end
local arr = {
{1, 0, 1},
{0, 2, 0},
{1, 0, 1},
}
local removeTime = 1.5 --time to remove the clones
local function removeCreatures(cid, creature)
if isCreature(creature) == TRUE then
doRemoveCreature(creature)
end
end
function onTargetTile(cid, pos)
local creature = doSummonCreature("headcaptor", pos)
doCreatureAddMana(cid, -2000)
doConvinceCreature(cid, creature)
doCreatureSay(creature, "Utevo Mort", TALKTYPE_ORANGE_1)
addEvent(removeCreatures, removeTime * 1000, cid, creature)
return TRUE
end
local area, combat = createCombatArea(arr), createCombatObject()
setCombatArea(combat, area)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
How it works in practice
Places where there are walls or PZ area