Guiaki
Member
- Joined
- Jan 3, 2011
- Messages
- 137
- Reaction score
- 8
Author: Guiaki
Server Tested: TFS 0.4dev
Configuration: the "5" in RED is the amount of life that will be regenerated when cannibalized.
TAG:add this to actions.xml
Edit the ITEMID to the desired Item id
well hope it helped someone ^^, remember this is my first script so please don't swear me, and sorry for my english ;x
Server Tested: TFS 0.4dev
What it do?
When using a item on a dead human corpse, it decayTo the second level of a dead human, and you get 5 times life added, 5hp per second.SCRIPT:
Create a file named cannibalism.lua in actions/scripts and add this into it:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.itemid == 3058) then
doTransformItem(itemEx.uid, 3059)
doDecayItem(itemEx.uid)
end
function doCannibalism() -- function by Guiaki
doSendMagicEffect(getCreaturePosition(cid), 12, cid)
doCreatureAddHealth(cid,[COLOR="red"]5[/COLOR])
end
for i = 1,5 do
addEvent(doCannibalism, i * 1000, 5)
end
return true
end
Configuration: the "5" in RED is the amount of life that will be regenerated when cannibalized.
TAG:
Code:
<action itemid="[COLOR="red"]ITEMID[/COLOR]" event="script" value="cannibalism.lua"/>
well hope it helped someone ^^, remember this is my first script so please don't swear me, and sorry for my english ;x