botter1234
Member
- Joined
- Jun 20, 2008
- Messages
- 103
- Reaction score
- 7
This is what I have, idk who made the script I am sorry for not stating name, but I have made a few modifications to it because it was erroring and not giving the correct hp
I cannot manage to get the script to retrieve the players outfit and apply it to the decoy
the doSetMonsterOutfit, I have tried many different variables and calling it in different parts of the script it made no difference it gave the same error
(luadoSetMonsterOutfit) Creature Not Found
I cannot manage to get the script to retrieve the players outfit and apply it to the decoy
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 39)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
local REQUIRED_REBIRTHS = 6 --Change this for the number of rebirths
if getCreatureStorage(cid, 85987) < REQUIRED_REBIRTHS then
doPlayerSendCancel(cid, "You can only use this spell if you have " .. REQUIRED_REBIRTHS .. " prestiges.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return false
end
local n = getCreatureSummons(cid)
if #n >= 1 then
for _,pid in ipairs(n) do
doRemoveCreature(pid)
end
return false
end
local hp = getCreatureHealth(cid)
local position = getCreaturePosition(cid)
position.stackpos = 255
local creature = doSummonCreature("Decoy", position)
if hp < 1000000000 then
setCreatureMaxHealth(creature, 2*hp)
doSetMonsterOutfit(getCreatureSummons(cid), getCreatureOutfit(cid))
doConvinceCreature(cid, creature)
else
setCreatureMaxHealth(creature, 2100000000)
doSetMonsterOutfit(getCreatureSummons(cid), getCreatureOutfit(cid))
doConvinceCreature(cid, creature)
end
return doCombat(cid, combat, var)
end
the doSetMonsterOutfit, I have tried many different variables and calling it in different parts of the script it made no difference it gave the same error
(luadoSetMonsterOutfit) Creature Not Found