• 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!

TFS 0.X onPrepareDeath; player dont die.

elnelson

Lunaria World Dev
Joined
Jun 20, 2009
Messages
580
Solutions
2
Reaction score
58
Location
México
Hello, otlanders. im facing a problem trying a revive system with storages.
The script is suposse to work like this (green txt is achieved one, red is not):
-if "dies"(prepare death) and player have storage 9999 > 1 then
player teleport to a sanctuary.
after teleport, get heal

and after 5 seconds; player teleport back to death pos (i need help getting back)
player set storage 0
end

if player dies with storage 9999 < 1 then

player have 5 seconds to receive help (with special item that adds heal) <-- im working on it
if player wont get help then
player dies (here is the problem. the player wont die, just stay with 0 hp) <-- im getting crazy

end


And this is the script for tfs 0.4
Lua:
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds" --The text which appear when his dead
}

function onPrepareDeath(cid, deathList)
   if isPlayer(cid) and getPlayerStorageValue(cid, 9999) < 1 then
    -- "Create dead body, that can be healed with  doCreatureAddHealth(cid, getCreatureMaxHealth(cid))"
      addEvent(function()
   --doRemoveCreature(cid) <-- this must be replaced for something that make the player dies...
           end, 5*1000)
      print(0)
   
   end
function revive(cid)
    if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) == 1 then
      print(1)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
        doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
        doCreatureSetNoMove(cid, false)
        setPlayerStorageValue(cid, config.storage, 1)
        --doTeleportThing(cid, {x = 1073, y = 135, z = 10})
        return true
    end
end

function revivetext(cid)
   print(2)
    if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) == 1 then
        doPlayerSendTextMessage(cid,21, config.text)
        addEvent(revive, config.time*1000, cid)
        return true
    end
end

    if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) == 1 then
      print(3)
        if getCreatureHealth(cid) <= 0 then
            addEvent(revivetext, 1*1000, cid)
            doCreatureSetNoMove(cid, true)
            setPlayerStorageValue(cid, config.storage, -1)
            doCreatureChangeOutfit(cid, config.outfit)
            doAddCondition(cid, CONDITION_INFIGHT)
            return false
        end
    return true
    end
end
 
Solution
So it dies..I wonder why, another try (?

Code:
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds", --The text which appear when his dead
    sanctuaryPos = {x = , y = , z = }
}

function storageRevive(cid, originalPos)
    if isPlayer(cid) then
        doCreatureSetNoMove(cid, false)
        doTeleportThing(cid, originalPos)
        doSendMagicEffect(originalPos, CONST_ME_TELEPORT)
        return true
    else
        return false
    end
end

function onStatsChange(cid, attacker, type, combat, value)
    if isPlayer(cid) and value ==...
If you have achieved this:
-if "dies"(prepare death) and player have storage 9999 > 1 then
player teleport to a sanctuary.
after teleport, get heal
and after 5 seconds; player teleport back to death pos (i need help getting back)
player set storage 0
end

You won't be able to get back if you don't save the position where the player died BEFORE actually teleporting him to the sanctuary and pass that value to the event, so when the revive moment comes you just use:
Code:
doTeleportThing(cid, deathPosition)
 
If you have achieved this:
-if "dies"(prepare death) and player have storage 9999 > 1 then
player teleport to a sanctuary.
after teleport, get heal
and after 5 seconds; player teleport back to death pos (i need help getting back)
player set storage 0
end

You won't be able to get back if you don't save the position where the player died BEFORE actually teleporting him to the sanctuary and pass that value to the event, so when the revive moment comes you just use:
Code:
doTeleportThing(cid, deathPosition)
so.. i need to modify
function onDeath(cid, corpse, deathList)
to
function onDeath(cid, corpse, deathList, deathPosition)

and add
addEvent(doTeleportThing, 5000, cid, deathPosition)

¿?, it says attempt to index a nill value :/
 
Of course it will say nil value if you don't assign a value to it.
Before teleporting it to the sanctuary, add this
Code:
local deathPosition = getThingPosition(cid)
nice, worked suck nice, i just need to complete the death for those whom doent have the storage x.x, the player keeps there with 0 hp
 
Btw, that script is way too painful for me to read, keep working on it tough, I will try to rewrite it when I have free time

---

That indeed worked? lol
Ok, so the only thing left to do is to make the player die?
Do you mind posting the entire script again?
 
Btw, that script is way too painful for me to read, keep working on it tough, I will try to rewrite it when I have free time

---

That indeed worked? lol
Ok, so the only thing left to do is to make the player die?
Do you mind posting the entire script again?
sorry im script kiddie but im doing my best lol
gonna paste it on php, it has "better" reading complex
at the moment ignore those --comments its my pallette :p
its messy as hell because im still working on it x.x gonna make it more aesthetic when it is done

the current state is:
1-.player has storage
2-. dies
3-. teleport to sanctuary (this is to stop the monster attack him its a bug disguised as a feature lol)
4-. wait 5 seconds (delay for death)
5-. teleport back and heal (bravo 50% work done atleast!)
6-. if die withot storage (tp to temple and give+1 hp, [I DONT WANT THIS, its temporally to avoid a print(15) spam

Current issue:
if player doesnt have storage
dont die and stand there like an idiot with 0 hp and monster continue attacking it, btw my print(15) still showing on console like the player is dying eternally because he haves 0 hp. need to execute the death normally, with exp and loot loss

PHP:
local corpse_ids = {
    3065, -- famale
    3058  -- male
}
   local Cyko = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds" --The text which appear when his dead
}
function onDeath(cid, corpse, deathList, deathPosition)
    if isPlayer(cid) and getPlayerStorageValue(cid, 9999) < 1 and getCreatureHealth(cid) <= 0 then
      -- addEvent(function()
           doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE)
           doPlayerSetPzLocked(cid, false)
           --doCreatureAddHealth(cid, -1, MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
           --doRemoveCreature(cid)
           -- end, 2*1000)
      print(1)
   return false
   end
end
function onPrepareDeath(cid, deathList)
   local playeroutfit = getCreatureOutfit(cid)
   if isPlayer(cid) and getPlayerStorageValue(cid, 9999) < 1 then
      print(15)
      doPlayerSetPzLocked(cid, false)
      stopEvent(revive)
      stopEvent(revivetext)
      return false
   end
function revive(cid)
    if isPlayer(cid) then
      print(2)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*.5, 2, 2, true)
        doCreatureAddMana(cid, getCreatureMaxMana(cid)/100, true)
        doCreatureSetNoMove(cid, false)
        return true
    end
end
function revivetext(cid)
    if isPlayer(cid) then
      print(3)
        doPlayerSendTextMessage(cid,21, Cyko.text)
        addEvent(revive, Cyko.time*1000, cid)
        return true
    end
end
    if isPlayer(cid) and getPlayerStorageValue(cid, Cyko.storage) == 1 then
      print(4)
        if getCreatureHealth(cid) <= 0 then
            addEvent(revivetext, 1*1000, cid)
            --addEvent(revive, Cyko.time*1000, cid)
            local deathPosition = getThingPosition(cid)
            local time = 6000
            local sanctuary = {x = 1073, y = 135, z = 10}
            doTeleportThing(cid, sanctuary)
            addEvent(doTeleportThing, time, cid, deathPosition)
            doSendMagicEffect(sanctuary, 10)
            local corpse = doCreateItem((corpse_ids[getPlayerSex(cid)+1]), 1, deathPosition)
            -- addEvent(doRemoveItem, 5500, deathPosition, 3058)
            -- local text = "You recognize "..getCreatureName(cid)..". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".\n[Raid Death]"
            -- doItemSetAttribute(corpse, "description", text)
            addEvent(doSendMagicEffect,time,deathPosition, 49)
            setPlayerStorageValue(cid, Cyko.storage, 2)
            addEvent(setPlayerStorageValue, time, cid, Cyko.storage, 1)
            doCreatureSetNoMove(cid, true)
            addEvent(doCreatureChangeOutfit,time, cid, playeroutfit)
            doCreatureChangeOutfit(cid, Cyko.outfit)
            --doAddCondition(cid, CONDITION_INFIGHT)
            doPlayerSetPzLocked(cid, false)
            return false
        end
    return true
    else
      return false
    end
end
 
Last edited:
Mmm I think there's no function to make the player die, I'm trying to think of a workaround, maybe a "simulation" of the death, after those 5 seconds, it gives him a different storage and kicks him out of the game. When he relogs, we check for that storage, if it has it, it means he has died after the 5 seconds and we can apply the skill/exp loss. I don't find it too hard to code it, the thing is, I don't know if there's a way to reduce the exp/skill..But it's a start, the rest of what I mentioned is totally doable and really easy
 
When the player has reached the stage of "onPrepareDeath", the player has already died.

If you 'return false', the player will have 0 hp, be unable to heal, but can probably still deal damage, cast spells and probably can walk around too.
Basically, they will just be a glitchy character left in the world.

If you want to 'simulate death', I'd suggest performing the 'onPrepareDeath' inside of 'onStatsChange' instead, and checking if the players remaining life equals the damage that is being applied to them.
(basically meaning, that this damage would have been a death blow. At this point bring the characters life to 1, and disable all healing/damage/movement of the character.
If the character isn't 'revived', then damage the character to 0 life using whatever method you want, and let them die normally.
 
When the player has reached the stage of "onPrepareDeath", the player has already died.

If you 'return false', the player will have 0 hp, be unable to heal, but can probably still deal damage, cast spells and probably can walk around too.
Basically, they will just be a glitchy character left in the world.

If you want to 'simulate death', I'd suggest performing the 'onPrepareDeath' inside of 'onStatsChange' instead, and checking if the players remaining life equals the damage that is being applied to them.
(basically meaning, that this damage would have been a death blow. At this point bring the characters life to 1, and disable all healing/damage/movement of the character.
If the character isn't 'revived', then damage the character to 0 life using whatever method you want, and let them die normally.

Oh, I tought by the name of 'onPREPAREdeath' that it was executed just before doing the 'die' part, so if paused there, it would let him die normally, guess not.
Is onStatsChange function on his TFS? I don't remember much about 0.3.6 or 0.4
 
When the player has reached the stage of "onPrepareDeath", the player has already died.

If you 'return false', the player will have 0 hp, be unable to heal, but can probably still deal damage, cast spells and probably can walk around too.
Basically, they will just be a glitchy character left in the world.

If you want to 'simulate death', I'd suggest performing the 'onPrepareDeath' inside of 'onStatsChange' instead, and checking if the players remaining life equals the damage that is being applied to them.
(basically meaning, that this damage would have been a death blow. At this point bring the characters life to 1, and disable all healing/damage/movement of the character.
If the character isn't 'revived', then damage the character to 0 life using whatever method you want, and let them die normally.
When the player has reached the stage of "onPrepareDeath", the player has already died.

If you 'return false', the player will have 0 hp, be unable to heal, but can probably still deal damage, cast spells and probably can walk around too.
Basically, they will just be a glitchy character left in the world.

If you want to 'simulate death', I'd suggest performing the 'onPrepareDeath' inside of 'onStatsChange' instead, and checking if the players remaining life equals the damage that is being applied to them.
(basically meaning, that this damage would have been a death blow. At this point bring the characters life to 1, and disable all healing/damage/movement of the character.
If the character isn't 'revived', then damage the character to 0 life using whatever method you want, and let them die normally.


well, this is the best i could done. it does not give error but player wont receive damage... (i know this is really bad its all empiric)
still workin on it tho. its a mess i dont really understand creaturescripts at all it is very confusing for me getting performing the 'onPrepareDeath' inside of 'onStatsChange'
i found this function, but i dont know how to perform preparedeath inside this. also it does not return any print of 0 or 1 :/
Lua:
function onStatsChange(cid, attacker, type, combat, value, msgonend)
    if combat == COMBAT_HEALING then
      print(0)
        return true
    end

    if getCreatureHealth(cid) > value then
      print(1)
        return true
    end
end
trash attempt V
Lua:
local sanctuary = {x = 1073, y = 135, z = 10}
local corpse_ids = {
    3065, -- famale
    3058  -- male
}
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds" --The text which appear when his dead
}
-- function onStatsChange(cid, attacker, type, combat, value)
--     if isPlayer(cid) and getPlayerStorageValue(cid, 9999) < 1 and getCreatureHealth(cid) <= 0 then
--       -- addEvent(function()
--            doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE)
--            doPlayerSetPzLocked(cid, false)
--            --doCreatureAddHealth(cid, -1, MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
--            --doRemoveCreature(cid)
--            -- end, 2*1000)
--       print(1)
--    return false
--    end
-- end
function onStatsChange(cid, attacker, type, combat, value)
  function onPrepareDeath(cid, deathList)
   local playeroutfit = getCreatureOutfit(cid)
   -- if isPlayer(cid) and getPlayerStorageValue(cid, 9999) < 1 then
   --    print(15)
   --    doPlayerSetPzLocked(cid, false)
   --    stopEvent(revive)
   --    stopEvent(revivetext)
   --    return false
   -- end
function revive(cid)
    if isPlayer(cid) then
      print(2)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*.5, 2, 2, true)
        doCreatureAddMana(cid, getCreatureMaxMana(cid)/100, true)
        doCreatureSetNoMove(cid, false)
        return true
    end
end
function revivetext(cid)
    if isPlayer(cid) then
      print(3)
        doPlayerSendTextMessage(cid,21, config.text)
        addEvent(revive, config.time*1000, cid)
        return true
    end
end

    if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature(cid))  then
      if isPlayer(cid) and getPlayerStorageValue(cid, 9999) == 1  then
        revivetext(cid)
  -- doTeleportThing(cid, sanctu  ary)
  -- addEvent(doTeleportThing, time, cid, deathPosition)
  -- doSendMagicEffect(sanctuary, 10)
  -- -- addEvent(doRemoveItem, 5500, deathPosition, 3058)
  -- -- local text = "You recognize "..getCreatureName(cid)..". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".\n[Raid Death]"
  -- -- doItemSetAttribute(corpse, "description", text)
  -- addEvent(doSendMagicEffect,time,deathPosition, 49)
  -- setPlayerStorageValue(cid, config.storage, 2)
  -- addEvent(setPlayerStorageValue, time, cid, config.storage, 1)
  -- doCreatureSetNoMove(cid, true)
  -- addEvent(doCreatureChangeOutfit,time, cid, playeroutfit)
  -- doCreatureChangeOutfit(cid, config.outfit)
  --doAddCondition(cid, CONDITION_INFIGHT)
  -- doPlayerSetPzLocked(cid, false)
        print(1)
      end
    end
  return true
end
end
 
Last edited:
Following what Xikini said, can you please test this? I don't know if these parameters passed to onStatsChange are correct (They are for TFS 1.2 at least)
This, in theory, will only work if the player HAS the storage, still not doing the REVIVING by others part

Code:
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds", --The text which appear when his dead
    sanctuaryPos = {x = , y = , z = }
}

function storageRevive(cid, originalPos)
    if isPlayer(cid) then
        doCreatureSetNoMove(cid, false)
        doTeleportThing(cid, originalPos)
        doSendMagicEffect(originalPos, CONST_ME_TELEPORT)
        return true
    else
        return false
    end
end

function onStatsChange(cid, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    if isPlayer(cid) and (primaryDamage + secondaryDamage) == getCreatureHealth(cid) then
        if getPlayerStorageValue(cid, config.storage) == 1  then
            local originalPos = getThingPosition(cid)
            doTeleportThing(cid, config.sanctuaryPos)
            doPlayerSendTextMessage(cid,21, config.text)
            setPlayerStorageValue(cid, config.storage, 0)
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
            doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
            doCreatureSetNoMove(cid, true)
            addEvent(storageRevive, config.time * 1000, cid, originalPos)
        end
    end
return true
end
 
Following what Xikini said, can you please test this? I don't know if these parameters passed to onStatsChange are correct (They are for TFS 1.2 at least)
This, in theory, will only work if the player HAS the storage, still not doing the REVIVING by others part

Code:
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds", --The text which appear when his dead
    sanctuaryPos = {x = , y = , z = }
}

function storageRevive(cid, originalPos)
    if isPlayer(cid) then
        doCreatureSetNoMove(cid, false)
        doTeleportThing(cid, originalPos)
        doSendMagicEffect(originalPos, CONST_ME_TELEPORT)
        return true
    else
        return false
    end
end

function onStatsChange(cid, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    if isPlayer(cid) and (primaryDamage + secondaryDamage) == getCreatureHealth(cid) then
        if getPlayerStorageValue(cid, config.storage) == 1  then
            local originalPos = getThingPosition(cid)
            doTeleportThing(cid, config.sanctuaryPos)
            doPlayerSendTextMessage(cid,21, config.text)
            setPlayerStorageValue(cid, config.storage, 0)
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
            doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
            doCreatureSetNoMove(cid, true)
            addEvent(storageRevive, config.time * 1000, cid, originalPos)
        end
    end
return true
end

sure, gonna test and edit this comment later to feedback ty :D

edit: it does not give any error in console tho even if player has storage 9999 == 1 the player wont get tp sanctuary nor revive and die normally

seems that you could fix player death but now player wont revive XD!! nice

edit2: i paste these prints and seems the script is not working since here
gonna figure it out how to make it work
Lua:
if isPlayer(cid) and (primaryDamage + secondaryDamage) == getCreatureHealth(cid) then
 
Last edited:
sure, gonna test and edit this comment later to feedback ty :D

edit: it does not give any error in console tho even if player has storage 9999 == 1 the player wont get tp sanctuary nor revive and die normally

seems that you could fix player death but now player wont revive XD!! nice

Remember this is no more an onPrepareDeath function, I don't know how you have it registered in creaturescripts.xml
 
For example:
Code:
<event type="healthchange" name="statHP" script="stats.lua"/>

That's as I have registered in TFS 1.2
well in TFS 0.4 its, i edited a comment below that must help
Lua:
<event type="statschange" name="Revival" event="script" value="revival.lua"/>
 
well in TFS 0.4 its, i edited a comment below that must help
Lua:
<event type="statschange" name="Revival" event="script" value="revival.lua"/>
Seems fine.

About the edit2 you did
As I suspected, those are the parameters tfs 1.2 uses, I don't really know or have an example for an statsChange function and the parameters it receives, they are surely named different
 
Seems fine.

About the edit2 you did
As I suspected, those are the parameters tfs 1.2 uses, I don't really know or have an example for an statsChange function and the parameters it receives, they are surely named different

i have this critical script that uses some parameters we can use gonna test with them hope this helps, also gonna find others parameters and edit them here lateer if i found
Lua:
   if combat == COMBAT_HEALING then
      return true
   end
   if getCreatureHealth(cid) > value then
      return true
   end
Lua:
function onStatsChange(cid, attacker, type, combat, value)
if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isPlayer(attacker) and isCreature(cid)) then
if (getPlayerStorageValue(attacker, lvlcrit)) >= math.random (0,1000) then
value = math.ceil(value*(multiplier))
doTargetCombatHealth(attacker, cid, combat, -value, -value, 255)
doSendMagicEffect(getCreaturePosition(cid), effect)
doSendAnimatedText(getCreaturePos(attacker), "Critical", 144)
return false
end
end
return true
end
 
Found it, test this one:
Code:
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds", --The text which appear when his dead
    sanctuaryPos = {x = , y = , z = }
}

function storageRevive(cid, originalPos)
    if isPlayer(cid) then
        doCreatureSetNoMove(cid, false)
        doTeleportThing(cid, originalPos)
        doSendMagicEffect(originalPos, CONST_ME_TELEPORT)
        return true
    else
        return false
    end
end

function onStatsChange(cid, attacker, type, combat, value)
    if isPlayer(cid) and value == getCreatureHealth(cid) then
        if getPlayerStorageValue(cid, config.storage) == 1  then
            local originalPos = getThingPosition(cid)
            doTeleportThing(cid, config.sanctuaryPos)
            doPlayerSendTextMessage(cid,21, config.text)
            setPlayerStorageValue(cid, config.storage, 0)
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
            doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
            doCreatureSetNoMove(cid, true)
            addEvent(storageRevive, config.time * 1000, cid, originalPos)
        end
    end
return true
end
 
Found it, test this one:
Code:
local config = {
    storage = 9999, --Use empty storage
    outfit = {lookType = 0}, --still working on the to turn into dead body
    time = 5, --How long will it take until he revives from the death
    text = "You will be revived in 5 seconds", --The text which appear when his dead
    sanctuaryPos = {x = , y = , z = }
}

function storageRevive(cid, originalPos)
    if isPlayer(cid) then
        doCreatureSetNoMove(cid, false)
        doTeleportThing(cid, originalPos)
        doSendMagicEffect(originalPos, CONST_ME_TELEPORT)
        return true
    else
        return false
    end
end

function onStatsChange(cid, attacker, type, combat, value)
    if isPlayer(cid) and value == getCreatureHealth(cid) then
        if getPlayerStorageValue(cid, config.storage) == 1  then
            local originalPos = getThingPosition(cid)
            doTeleportThing(cid, config.sanctuaryPos)
            doPlayerSendTextMessage(cid,21, config.text)
            setPlayerStorageValue(cid, config.storage, 0)
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
            doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
            doCreatureSetNoMove(cid, true)
            addEvent(storageRevive, config.time * 1000, cid, originalPos)
        end
    end
return true
end

working better, if player dont has storage dies, if not gets teleported, then die... but we're getting closer, we just need to execute onPrepareDeath as Xikini said i guess.. nice =D
 
Back
Top