• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.
[TFS 1.x] Lost XP Retrieval - Skull of Fallen

[TFS 1.x] Lost XP Retrieval - Skull of Fallen

VitoxMaster

Well-Known Member
Joined
Feb 6, 2023
Messages
118
Solutions
5
Reaction score
87
VitoxMaster submitted a new resource:

[TFS 1.x] Lost XP Retrieval - Skull of Fallen - Upon death, the player leaves behind a skull in their corpse, which can be used to get exp back.

Hi everyone,
I decided to share simple concept which is implemented on my OTS.
Simple scenario: Upon death, the player leaves behind a skull in their corpse, which can be recovered and used to regain a percentage of lost experience.

This system acts as an additional 'last chance' to soften the pain of death in Tibia. The amount of experience restored depends on blessings, but it gives players hope to reclaim at...

Read more about this resource...
 
In this tutorial two stuff missing
1. You forgot to define PlayerStorageKeys.skullOfFallenCooldown in lib
2. You also forgot to include formatNumberWithSpaces function because it will return a nil value
3. There should also be some sort of timer/protection so you wont go back in 12 hours and pick the skull and use it after a while
 
Last edited:
Thanks for your time and valuable remarks.
  • AD 1 - I mentioned it, but you're right I could paste that line. Added declaration
I keep storage values in PlayerStorageKeys; remember to assign your keys there.
  • AD 2 - Yep, missing function, added it, thanks
  • AD 3 - There is timer for overall skull usage.

local now = os.time()
local nextUse = tonumber(player:getStorageValue(PlayerStorageKeys.skullOfFallenCooldown)) or -1
if nextUse ~= -1 and nextUse > now then
player:sendCancelMessage("You can use another skull in " .. fmtTimeLeft(nextUse - now) .. ".")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return true
end
[...]
player:setStorageValue(PlayerStorageKeys.skullOfFallenCooldown, now + SKULL_OF_FALLEN_COOLDOWN)
 
Very cool! Extended a little upon the idea, instead of a Skull, players have the option (unlockable) to leave behind a variety of Grave Stones.
Other players can try to dig up the corpse and loot all the items!
Each Grave comes with different Cooldowns/Protections to protect their corpse against Graverobbers!
While the owner of the Grave can get part of his Experience back and access to his items, with some confidence, that they are in time to get their loot back.


This system you posted was a great base to work from, thank you! <3
 
Back
Top