This is probably the #1 most frustrating thing to look at when trying to help someone.
They want help but refuse to help themselves.
Is there an error code? Take a picture of the entire server log if you aren't seeing it.
How do you have it installed? Again, pictures are great.
What did you actually try? Although at first glance it appears obvious what you've done, I cannot be sure, and therefore cannot provide any modicum of help.
Please
@Na Amigo put some thought into your posts because otherwise your going to feel like nobody cares, and for the most part, I think we all care otherwise we wouldn't be here looking at your post.
could you post some script with onDeath and PrepareDeath scripts
Since you have creaturescripts at this point, I'll go ahead and do my alternative method for you.
data/lib/000-constant.lua [anywhere is fine, but I prefer putting it at the bottom]
Lua:
STORAGE_DEATH_COUNT = 45001 -- put whatever storage value you want to use
data/creaturescripts/creaturescripts.xml
XML:
<event type="death" name="onDeath_death_count" event="script" value="onDeath_death_count.lua"/>
<event type="login" name="onLogin_death_count" event="script" value="onLogin_death_count.lua"/>
data/creaturescripts/scripts/login.lua [at the bottom with the other registered events.]
Lua:
registerCreatureEvent(cid, "onDeath_death_count")
registerCreatureEvent(cid, "onLogin_death_count")
data/creaturescripts/scripts/onDeath_death_count.lua
Lua:
function onDeath(cid, corpse, deathList)
setPlayerStorageValue(cid, STORAGE_DEATH_COUNT, getPlayerStorageValue(cid, STORAGE_DEATH_COUNT) + 1)
return true
end
data/creaturescripts/scripts/onLogin_death_count.lua
Lua:
function onLogin(cid)
if getPlayerStorageValue(cid, STORAGE_DEATH_COUNT) < 0 then
setPlayerStorageValue(cid, STORAGE_DEATH_COUNT, 0)
end
return true
end
data/movements/movements.xml [again, use whatever number you want and that is not currently in use.]
XML:
<movevent type="StepIn" actionid="45001" event="script" value="onStepIn_death_count_display.lua"/>
data/movements/scripts/onStepIn_death_count_display.lua
Lua:
function onStepIn(cid, item, position, fromPosition)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "OTMadness: You have died " .. getPlayerStorageValue(cid, STORAGE_DEATH_COUNT) .. " times.")
doSendMagicEffect(position, CONST_ME_TELEPORT)
return true
end