Ir para conteúdo

exaustion para colocar novamente


MonsterB0SS

Posts Recomendados

olá pessoas no meu ot tenho um ring que duplica o hp/mana da +50 de todas as skills....

E ele recupera todo o hp/maa ao usar e tipo quando o palyer tem 5% de vida ja usando o anel e tirar e colocar aumenta tudo de novo e tá uó no ot esse "BUG" então queria que 3 minutos para usar novamente o item EX:adm usou o ring ele ta 5% de vida e ele desequipo e tento equipar dae vem uma msg você só pode usar depois de 3 minutos...
se precisar do script:

-- >> Config --

local outfit =
{
-- Girls
{
lookType = 12,
lookHead = 19,
lookBody = 53,
lookLegs = 92,
lookFeet = 79,
lookAddons = 0
},
-- Boys
{
lookType = 12,
lookHead = 19,
lookBody = 79,
lookLegs = 3,
lookFeet = 81,
lookAddons = 0
}
}
local coinID = ITEM_GOLD_COIN
local wastingInterval = 1000
local wastingQuantity = 1
local triggerQuantity = 100
local warnOnLowSupply = TRUE
local lowSupplyMargin = 200
local storage = 50780
-- Config << --
local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 50)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS, 50)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 180)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 180)
local condition2 = createConditionObject(CONDITION_HASTE)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionFormula(condition2, 2.5, 0, 3.0, 0)
local area = createCombatArea({
{0, 0, 0, 1, 0, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 2, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 0, 1, 0, 0, 0}
})
local animCombat =
{
createCombatObject(),
createCombatObject()
}
local sexyEffect =
{
CONST_ME_FIREWORK_RED,
CONST_ME_FIREWORK_YELLOW,
CONST_ME_MAGIC_RED,
CONST_ME_MAGIC_GREEN
}
setCombatParam(animCombat[2], COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(animCombat[2], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatParam(animCombat[1], COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_RED)
setCombatParam(animCombat[1], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(animCombat[2], area)
setCombatArea(animCombat[1], area)
local function StopSuperForm(cid)
if (getPlayerStorageValue(cid, storage) == 1) then
setPlayerStorageValue(cid, storage, 0)
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
doRemoveCondition(cid, CONDITION_HASTE)
end
return TRUE
end
local function SuperForm(cid, sexIndex)
if (isCreature(cid)) then
if (getPlayerStorageValue(cid, storage) == 1) then
local goldLeft = getPlayerItemCount(cid, coinID)
if (goldLeft >= wastingQuantity) then
local position = getCreaturePosition(cid)
doPlayerRemoveItem(cid, coinID, wastingQuantity)
doSendMagicEffect(position, sexyEffect[sexIndex + 2])
doSendMagicEffect(position, sexyEffect[sexIndex])
if (goldLeft <= lowSupplyMargin and warnOnLowSupply == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Coins left: " ..(goldLeft - wastingQuantity) .. "!")
end
addEvent(SuperForm, wastingInterval, cid, sexIndex)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your bangle has been destroyed!")
doPlayerRemoveItem(cid, 2127, 1)
return StopSuperForm(cid)
end
end
end
end
function onEquip(cid, item, slot)
if (getPlayerItemCount(cid, coinID) > triggerQuantity and getPlayerStorageValue(cid, storage) ~= 1) then
local sexIndex = getPlayerSex(cid) + 1
doCombat(cid, animCombat[sexIndex], numberToVariant(cid))
doSetCreatureOutfit(cid, outfit[sexIndex], -1)
setPlayerStorageValue(cid, storage, 1)
doAddCondition(cid, condition1)
doAddCondition(cid, condition2)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
doPlayerAddMana(cid, getPlayerMaxMana(cid) - getPlayerMana(cid))
doPlayerRemoveItem(cid, coinID, triggerQuantity)
SuperForm(cid, sexIndex)
elseif (getPlayerStorageValue(cid, storage) == 1) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You cannot equip this now!")
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You do not have enough coins!")
end
return TRUE
end
function onDeEquip(cid, item, slot)
return StopSuperForm(cid)

end

Link para o comentário
Compartilhar em outros sites

Tenta assim:

-- >> Config --
local config = {
	storage = 99488,
	tempo = 3 -- em minutos
}
 
local outfit =
{
    -- Girls
    {
        lookType   = 12,
        lookHead   = 19,
        lookBody   = 53,
        lookLegs   = 92,
        lookFeet   = 79,
        lookAddons = 0
    },
    -- Boys
    {
        lookType   = 12,
        lookHead   = 19,
        lookBody   = 79,
        lookLegs   = 3,
        lookFeet   = 81,
        lookAddons = 0
    }
}
 
local coinID          = ITEM_GOLD_COIN
local wastingInterval = 1000
local wastingQuantity = 1
local triggerQuantity = 100
local warnOnLowSupply = TRUE
local lowSupplyMargin = 200
local storage         = 50780
 
-- Config << --
 
local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST,                50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING,             50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB,                50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD,               50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE,                 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE,            50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD,              50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING,             50)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS,          50)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT,  180)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 180)
 
local condition2 = createConditionObject(CONDITION_HASTE)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionFormula(condition2, 2.5, 0, 3.0, 0)
 
local area = createCombatArea({
    {0, 0, 0, 1, 0, 0, 0},
    {0, 1, 0, 0, 0, 1, 0},
    {0, 0, 0, 0, 0, 0, 0},
    {1, 0, 0, 2, 0, 0, 1},
    {0, 0, 0, 0, 0, 0, 0},
    {0, 1, 0, 0, 0, 1, 0},
    {0, 0, 0, 1, 0, 0, 0}
})
 
local animCombat =
{
    createCombatObject(),
    createCombatObject()
}
 
local sexyEffect =
{
    CONST_ME_FIREWORK_RED,
    CONST_ME_FIREWORK_YELLOW,
    CONST_ME_MAGIC_RED,
    CONST_ME_MAGIC_GREEN
}
 
setCombatParam(animCombat[2], COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(animCombat[2], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatParam(animCombat[1], COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_RED)
setCombatParam(animCombat[1], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
 
setCombatArea(animCombat[2], area)
setCombatArea(animCombat[1], area)
 
local function StopSuperForm(cid)
    if (getPlayerStorageValue(cid, storage) == 1) then
        setPlayerStorageValue(cid, storage, 0)
        doRemoveCondition(cid, CONDITION_OUTFIT)
        doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        doRemoveCondition(cid, CONDITION_HASTE)
    end
    return TRUE
end
 
local function SuperForm(cid, sexIndex)
    if (isCreature(cid)) then
        if (getPlayerStorageValue(cid, storage) == 1) then
            local goldLeft = getPlayerItemCount(cid, coinID)
            if (goldLeft >= wastingQuantity) then
                local position = getCreaturePosition(cid)
                doPlayerRemoveItem(cid, coinID, wastingQuantity)
                doSendMagicEffect(position, sexyEffect[sexIndex + 2])
                doSendMagicEffect(position, sexyEffect[sexIndex])
                if (goldLeft <= lowSupplyMargin and warnOnLowSupply == TRUE) then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Coins left: " ..(goldLeft - wastingQuantity) .. "!")
                end
                addEvent(SuperForm, wastingInterval, cid, sexIndex)
            else
                doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your bangle has been destroyed!")
                doPlayerRemoveItem(cid, 2127, 1)
                return StopSuperForm(cid)
            end
        end
    end
end
 
function onEquip(cid, item, slot)
	if getPlayerStorageValue(cid, config.storage) > os.time () then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You cannot equip this now!")
		return false
	end

    if (getPlayerItemCount(cid, coinID) > triggerQuantity and getPlayerStorageValue(cid, storage) ~= 1) then
        local sexIndex = getPlayerSex(cid) + 1
        doCombat(cid, animCombat[sexIndex], numberToVariant(cid))
        doSetCreatureOutfit(cid, outfit[sexIndex], -1)
        setPlayerStorageValue(cid, storage, 1)
        doAddCondition(cid, condition1)
        doAddCondition(cid, condition2)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doPlayerAddMana(cid, getPlayerMaxMana(cid) - getPlayerMana(cid))
        doPlayerRemoveItem(cid, coinID, triggerQuantity)
		setPlayerStorageValue(tid, config.storage, os.time() + (config.tempo * 60))
        SuperForm(cid, sexIndex)
    elseif (getPlayerStorageValue(cid, storage) == 1) then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You cannot equip this now!")
    else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You do not have enough coins!")
    end
    return true
end
 
function onDeEquip(cid, item, slot)
    return StopSuperForm(cid)
end
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

Tente assim...

 

 

-- >> Config --

local storage = 50847
tempo = 3 * 60 -- Modifique apenas o primeiro número, está em minutos (se quiser em segundos, apague o * 60)
local outfit =
{
-- Girls
{
lookType = 12,
lookHead = 19,
lookBody = 53,
lookLegs = 92,
lookFeet = 79,
lookAddons = 0
},
-- Boys
{
lookType = 12,
lookHead = 19,
lookBody = 79,
lookLegs = 3,
lookFeet = 81,
lookAddons = 0
}
}
local coinID = ITEM_GOLD_COIN
local wastingInterval = 1000
local wastingQuantity = 1
local triggerQuantity = 100
local warnOnLowSupply = TRUE
local lowSupplyMargin = 200
-- Config << --
local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 50)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 50)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS, 50)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 180)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 180)
local condition2 = createConditionObject(CONDITION_HASTE)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionFormula(condition2, 2.5, 0, 3.0, 0)
local area = createCombatArea({
{0, 0, 0, 1, 0, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 2, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 0, 1, 0, 0, 0}
})
local animCombat =
{
createCombatObject(),
createCombatObject()
}
local sexyEffect =
{
CONST_ME_FIREWORK_RED,
CONST_ME_FIREWORK_YELLOW,
CONST_ME_MAGIC_RED,
CONST_ME_MAGIC_GREEN
}
setCombatParam(animCombat[2], COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(animCombat[2], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatParam(animCombat[1], COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_RED)
setCombatParam(animCombat[1], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(animCombat[2], area)
setCombatArea(animCombat[1], area)
local function StopSuperForm(cid)
if (getPlayerStorageValue(cid, storage) == 1) then
setPlayerStorageValue(cid, storage, 0)
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
doRemoveCondition(cid, CONDITION_HASTE)
end
return TRUE
end
local function SuperForm(cid, sexIndex)
if (isCreature(cid)) then
if (getPlayerStorageValue(cid, storage) == 1) then
local goldLeft = getPlayerItemCount(cid, coinID)
if (goldLeft >= wastingQuantity) then
local position = getCreaturePosition(cid)
doPlayerRemoveItem(cid, coinID, wastingQuantity)
doSendMagicEffect(position, sexyEffect[sexIndex + 2])
doSendMagicEffect(position, sexyEffect[sexIndex])
if (goldLeft <= lowSupplyMargin and warnOnLowSupply == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Coins left: " ..(goldLeft - wastingQuantity) .. "!")
end
addEvent(SuperForm, wastingInterval, cid, sexIndex)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your bangle has been destroyed!")
doPlayerRemoveItem(cid, 2127, 1)
return StopSuperForm(cid)
end
end
end
end
function onEquip(cid, item, slot)
if (getPlayerItemCount(cid, coinID) > triggerQuantity and getPlayerStorageValue(cid, 50847) >= os.time()) then
local sexIndex = getPlayerSex(cid) + 1
doCombat(cid, animCombat[sexIndex], numberToVariant(cid))
doSetCreatureOutfit(cid, outfit[sexIndex], -1)
setPlayerStorageValue(cid, 50847, os.time() + tempo)
doAddCondition(cid, condition1)
doAddCondition(cid, condition2)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
doPlayerAddMana(cid, getPlayerMaxMana(cid) - getPlayerMana(cid))
doPlayerRemoveItem(cid, coinID, triggerQuantity)
SuperForm(cid, sexIndex)
elseif (getPlayerStorageValue(cid, storage) < os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You cannot equip this now!")
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You do not have enough coins!")
end
return TRUE
end
function onDeEquip(cid, item, slot)
return StopSuperForm(cid)
end

 

Editado por Cheveko
Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...

O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...