Hello,
I was bored today so i made a script, i haven't tested but should work for 0.3:
CreatureScript/creaturescripts.xml
Creaturescript/scripts and name the lua "clone.lua" and paste code below:
Now create new monster and just register this tag to it:
Simply the script does, is the monster copy the target outfit, hp and name is optional.
Any other suggestions i can add to it, just comment.
If you want it to change the name to the target you can set true but you need also install this by Scarlet:
http://otland.net/f35/change-existing-monster-name-game-131643/
Enjoy!
I was bored today so i made a script, i haven't tested but should work for 0.3:
CreatureScript/creaturescripts.xml
XML:
<event type="attack" name="Clone" event="script" value="clone.lua"/>
Creaturescript/scripts and name the lua "clone.lua" and paste code below:
Lua:
local change_name = false --Only if you have the function!
function onAttack(cid, target)
if (isCreature(target)) then
if (getCreatureStorage(cid, getCreatureName(target)) < 1) then
doCreatureSetStorage(cid, getCreatureName(target), 1)
doSetCreatureOutfit(cid, getCreatureOutfit(target), -1)
setCreatureMaxHealth(cid,getCreatureHealth(target))
doCreatureAddHealth(cid,getCreatureHealth(target))
if (change_name) then
setCreatureName(cid, ""..getCreatureName(target).."", "a clone")
end
end
end
return true
end
Now create new monster and just register this tag to it:
XML:
<script>
<event name="Clone"/>
</script>
Simply the script does, is the monster copy the target outfit, hp and name is optional.
Any other suggestions i can add to it, just comment.
If you want it to change the name to the target you can set true but you need also install this by Scarlet:
http://otland.net/f35/change-existing-monster-name-game-131643/
Enjoy!