playerOriginalOutfit = nil
skill = nil
magic = nil
local function bloodCall (cid, times)
if isPlayer (cid) then
if times == 0 then
doCreatureChangeOutfit(cid, playerOriginalOutfit)
return true
else
doCreatureAddHealth(cid,(12*getCreatureMaxHealth(cid)/100)+(skill*6)+(magic*2))
doCreatureAddMana(cid,(12*getPlayerMaxMana(cid)/100)+(skill*6)+(magic*2))
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent (bloodCall, 1 * 2000, cid, times - 1)
end
end
end
local Speed = createConditionObject(CONDITION_HASTE)
setConditionParam(Speed, CONDITION_PARAM_TICKS, 30000)
setConditionFormula(Speed, 0, 6000, 0, 6000)
function onUse(cid, item, frompos, item2, topos)
chronos = { lookType = 251,lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons }
hazus = { lookType = 194,lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons }
kazard = { lookType = 262,lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons }
skill = getPlayerSkill(cid,0)
magic = getPlayerMagLevel(cid)
Blood = math.random(1,3)
-- Exhausted Settings --
local exhausted_seconds = 0 -- Segundos que o blood vai demorar para usar denovo
local exhausted_storagevalue = 4850 -- Storage Value do exhausted
local exhausted_seconds2 = 0 -- How many seconds
local exhausted_storagevalue2 = 9893 -- Storage Value
local exhausted_seconds3 = 0 -- How many seconds
local exhausted_storagevalue3 = 8162 -- Storage Value
local exhausted_seconds4 = 0 -- How many seconds
local exhausted_storagevalue4 = 6245 -- Storage Value
local exhausted_seconds5 = 0 -- How many seconds
local exhausted_storagevalue5 = 15555 -- Storage Value
-- Exhausted Settings END --
if getPlayerSoul(cid) <= 49 then
doPlayerSendTextMessage(cid,20,'Desculpe, você não tem Souls suficiente.')
return true
end
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doPlayerSendTextMessage(cid,20,'Você não pode usar um blood of gods durante o efeito de outro.')
return true
end
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue2)) then
doPlayerSendCancel(cid,"Você está muito cansado.")
return true
end
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue3)) then
doPlayerSendCancel(cid,"Você está muito cansado.")
return true
end
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue4)) then
doPlayerSendCancel(cid,"Está esgotado.")
return true
end
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue5)) then
doPlayerSendCancel(cid,"Você está muito cansado.")
return true
end
blood_configs = {
[1] = {
addHealth = 15 * getCreatureMaxHealth (cid) / 100,
addMana = 15 * getCreatureMaxHealth (cid) / 100,
creatureOutfit = chronos,
creatureName = "Chronos",
say = "~|Delicia|~!",
},
[2] = {
addHealth = 10 * getCreatureMaxHealth (cid) / 100,
addMana = 10 * getCreatureMaxHealth (cid) / 100,
creatureOutfit = kazard,
creatureName = "Kazard",
say = "~|Delicia|~",
},
[3] = {
addHealth =10 * getCreatureMaxHealth (cid) / 100,
addMana = 10 * getCreatureMaxHealth (cid) / 100,
creatureOutfit = hazus,
creatureName = "Hazus",
say = "~|Delicia|~",
},
}
if (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue)) and (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue2)) and (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue3)) and (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue4)) then
doCreatureAddHealth (cid, blood_configs[Blood].addHealth)
doCreatureAddMana (cid, blood_configs[Blood].addMana)
playerOriginalOutfit = getCreatureOutfit(cid)
doCreatureChangeOutfit(cid, blood_configs[Blood].creatureOutfit)
doSendMagicEffect (getCreaturePosition(cid), 12)
doPlayerSendTextMessage (cid, 20, "Voce usou um Food e se transformou em um ".. blood_configs[Blood].creatureName .. ". (Revitalization Ativado).")
doSendAnimatedText (getCreaturePosition(cid), blood_configs[Blood].say, TALKTYPE_ORANGE_1)
end
addEvent (bloodCall, 1 * 2000, cid, 15)
setPlayerStorageValue (cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doPlayerAddSoul(cid,-50)
doRemoveItem(item.uid,1)
return true
end