Memerto
PHP, JS, LUA, HTML...
- Joined
- Oct 18, 2009
- Messages
- 131
- Solutions
- 6
- Reaction score
- 25
Hello guys! Some days ago Darkhaos did this script for me, but it doesn't work, in spite of the GUI does not show any errors. I need it working urgently. Can you help me?
Explanation of the script: I need a script that send an effect and some animated text to the corpse position, when the monster dies, if it loots a certain object(or some of them). Those items could be configurable in the script(local list = ....)
Distro 0.3.6 (8.60) V5 - Crying Damson
The creaturescript:
To creaturescript.xml
To login.lua
Rep++ for the one who makes this script works properly, and I'll give him/her the new 9.8 Demon Outfit, IDF format just to import.
Explanation of the script: I need a script that send an effect and some animated text to the corpse position, when the monster dies, if it loots a certain object(or some of them). Those items could be configurable in the script(local list = ....)
Distro 0.3.6 (8.60) V5 - Crying Damson
The creaturescript:
Lua:
function scanContainer(uid, list, position) --function by Jano. Edited by Darkhaos.
for k = (getContainerSize(uid) - 1), 0, -1 do
local tmp = getContainerItem(uid, k)
if (isInArray(list, tmp.itemid)) then
doSendAnimatedText(position, "Epic", TEXTCOLOR_ORANGE)
doSendMagicEffect(position, 65)
return true
elseif isContainer(tmp.uid) then
scanContainer(tmp.uid, list, position)
end
end
return true
end
local list = {7382, 6528}
function onDeath(cid, corpse, deathList)
if not isMonster(cid) then return true end
return scanContainer(corpse.uid, list, getCreaturePosition(cid))
end
To creaturescript.xml
XML:
<event type="death" name="ScanContainer" event="script" value="blablabla.lua"/>
To login.lua
Lua:
registerCreatureEvent(cid, "ScanContainer")
Rep++ for the one who makes this script works properly, and I'll give him/her the new 9.8 Demon Outfit, IDF format just to import.
Last edited: