Winchester83
New Member
- Joined
- Oct 25, 2023
- Messages
- 35
- Reaction score
- 4
Good morning everyone, so, I had made a request about these scripts here on this forum, and someone even offended me, but somehow I managed to create one and the revive part is working, but the delay is not, could someone transform that ? in revscripts or just adjust the delay operation,
This is the script, only the delay time is working:
thank you all!
local configs = {
ring_id = 26544,
delay_time = 5*60*1000,
delay_storage = 10000
}
local conditions = {
CONDITION_POISON,
CONDITION_FIRE,
CONDITION_ENERGY,
CONDITION_LIFEDRAIN,
CONDITION_HASTE,
CONDITION_PARALYZE,
CONDITION_OUTFIT,
CONDITION_INVISIBLE,
CONDITION_LIGHT,
CONDITION_MANASHIELD,
CONDITION_INFIGHT,
CONDITION_DRUNK,
CONDITION_DROWN,
CONDITION_BLEED,
}
function onPrepareDeath(cid, killer)
local ring_slot = getPlayerSlotItem(cid,CONST_SLOT_RING).itemid
if isPlayer(cid) then
if(ring_slot == configs.ring_id and getPlayerStorageValue(cid, configs.delay_storage) <= os.time())then
if doPlayerRemoveItem(cid, ring_slot, 1) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doPlayerAddMana(cid, getPlayerMaxMana(cid))
doPlayerSendTextMessage(cid,25,"REVIVED.")
doSendMagicEffect(getCreaturePosition(cid), 249)
return false
end
end
end
return true
end
This is the script, only the delay time is working:
thank you all!
local configs = {
ring_id = 26544,
delay_time = 5*60*1000,
delay_storage = 10000
}
local conditions = {
CONDITION_POISON,
CONDITION_FIRE,
CONDITION_ENERGY,
CONDITION_LIFEDRAIN,
CONDITION_HASTE,
CONDITION_PARALYZE,
CONDITION_OUTFIT,
CONDITION_INVISIBLE,
CONDITION_LIGHT,
CONDITION_MANASHIELD,
CONDITION_INFIGHT,
CONDITION_DRUNK,
CONDITION_DROWN,
CONDITION_BLEED,
}
function onPrepareDeath(cid, killer)
local ring_slot = getPlayerSlotItem(cid,CONST_SLOT_RING).itemid
if isPlayer(cid) then
if(ring_slot == configs.ring_id and getPlayerStorageValue(cid, configs.delay_storage) <= os.time())then
if doPlayerRemoveItem(cid, ring_slot, 1) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doPlayerAddMana(cid, getPlayerMaxMana(cid))
doPlayerSendTextMessage(cid,25,"REVIVED.")
doSendMagicEffect(getCreaturePosition(cid), 249)
return false
end
end
end
return true
end