Hello,
im again have a small problem ;P
This is a script:
Its summons a creature, all is okay but...
i wanna they monsters have the same outfit/hp/mana/speed to the owner...
Im found some kind of this:
But, no work...
Someone can help me?
Please
Erexo.
im again have a small problem ;P
This is a script:
Code:
local max = 2
function onCastSpell(cid, var)
local count, pos = #getCreatureSummons(cid), getThingPos(cid)
if count == max then
doPlayerSendCancel(cid, 'You cannot make more bunshins.')
doSendMagicEffect(pos, CONST_ME_POFF)
return false
end
for i = 1, max - count do
local v = doSummonMonster(cid, 'bunshin1')
if v ~= 1 then
doPlayerSendDefaultCancel(cid, v)
doSendMagicEffect(pos, CONST_ME_POFF)
return i ~= 1
end
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[count+i]), CONST_ME_TELEPORT)
end
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
return true
end
Its summons a creature, all is okay but...
i wanna they monsters have the same outfit/hp/mana/speed to the owner...
Im found some kind of this:
Code:
setCreatureMaxHealth(creature, getCreatureMaxHealth(cid) / 2)
doCreatureAddHealth(creature, getCreatureMaxHealth(cid))
setCreatureMaxMana(creature, getCreatureMaxMana(cid) / 2)
doCreatureAddMana(creature, getCreatureMaxMana(cid))
doChangeSpeed(creature, getCreatureBaseSpeed(cid))
doSetCreatureOutfit(creature, 426, -1)
But, no work...
Someone can help me?
Erexo.