Hi, could you edit my script.
When i used spell then my outfit have to be changed on LOOKTYPE 1214 for 20 seconds. After 20 seconds outfit changed for which was before
Engine 0.3.6
Thank you.
When i used spell then my outfit have to be changed on LOOKTYPE 1214 for 20 seconds. After 20 seconds outfit changed for which was before
Engine 0.3.6
Thank you.
Lua:
local removeTime = 120 --time to remove the clones
local arr = {
{
{1, 0, 1},
{1, 2, 1},
{1, 0, 1}
},
{
{1, 1, 0, 1, 1},
{1, 0, 1, 0, 1},
{0, 1, 2, 1, 0},
{1, 0, 1, 0, 1},
{1, 1, 0, 1, 1}
}
}
function onTargetTile(cid, pos)
local creature = doSummonCreature("Powerfull Ghost Kamikaze", pos)
doConvinceCreature(cid, creature)
doChangeSpeed(creature, getCreatureBaseSpeed(cid))
addEvent(removeCreatures, removeTime * 1000, cid, creature)
return TRUE
end
local combat = {}
for i = 1, 2 do
combat[i] = createCombatObject()
setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatArea(combat[i], createCombatArea(arr[i]))
_G["onTargetTile" .. i] = onTargetTile
setCombatCallback(combat[i], CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i)
end
function onCastSpell(cid, var)
local config = {
storage = 11114,
cooldown = 1
}
if(os.time() - getPlayerStorageValue(cid, config.storage)) < config.cooldown then
doPlayerSendCancel(cid, "You can use it just one time every 4 minutes.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return false
end
setPlayerStorageValue(cid, config.storage, os.time())
return doCombat(cid, combat[1], var)
end