Skip to content

Commit

Permalink
ops..
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires committed Feb 19, 2024
1 parent ddd791c commit 3ed4646
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3089,7 +3089,6 @@ GlobalStorage = {
OberonEventTime = 65009,
PrinceDrazzakEventTime = 65010,
ScarlettEtzelEventTime = 65011,
CobraBastionFlask = 65012,
Inquisition = 65013,
Yasir = 65014,
IceCrack = 65016,
Expand Down
1 change: 1 addition & 0 deletions data/libs/core/global_storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ Global = {
Storage = {
FamiliarSummonEvent10 = 30054,
FamiliarSummonEvent60 = 30055,
CobraFlask = 30055,
},
}
6 changes: 3 additions & 3 deletions data/scripts/actions/items/cobra_flask.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ local applyCobraFlaskEffectOnMonsterSpawn = EventCallback()

applyCobraFlaskEffectOnMonsterSpawn.monsterOnSpawn(monster, position)
if table.contains({"cobra scout", "cobra vizier", "cobra assassin"}, monster:getName():lower()) then
if Game.getStorageValue(GlobalStorage.CobraBastionFlask) >= os.time() then
if Game.getStorageValue(Global.Storage.CobraFlask) >= os.time() then
monster:setHealth(monster:getMaxHealth() * 0.75)
monster:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
else
Game.setStorageValue(GlobalStorage.CobraBastionFlask, -1)
Game.setStorageValue(Global.Storage.CobraFlask, -1)
end
end
return true
Expand All @@ -21,7 +21,7 @@ function cobraFlask.onUse(player, item, fromPosition, target, toPosition, isHotk
target:getPosition():sendMagicEffect(CONST_ME_GREENSMOKE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You carefully pour just a tiny, little, finely dosed... and there goes the whole content of the bottle. Stand back!")
item:transform(31297)
Game.setStorageValue(GlobalStorage.CobraBastionFlask, os.time() + 30 * 60)
Game.setStorageValue(Global.Storage.CobraFlask, os.time() + 30 * 60)
end
return true
end
Expand Down

0 comments on commit 3ed4646

Please sign in to comment.