-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
21 changed files
with
465 additions
and
291 deletions.
There are no files selected for viewing
224 changes: 0 additions & 224 deletions
224
data-otservbr-global/scripts/actions/other/jean_pierre_food.lua
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
data-otservbr-global/scripts/movements/others/drowning.lua
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local bananaChocolateShake = Action() | ||
|
||
function bananaChocolateShake.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if player:hasExhaustion("special-foods-cooldown") then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait before using it again.") | ||
return true | ||
end | ||
|
||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't really know what this did to you, but suddenly you feel very happy.") | ||
player:say("Slurp.", TALKTYPE_MONSTER_SAY) | ||
player:getPosition():sendMagicEffect(CONST_ME_HEARTS) | ||
player:setExhaustion("special-foods-cooldown", 10 * 60) | ||
item:remove(1) | ||
return true | ||
end | ||
|
||
bananaChocolateShake:id(9083) | ||
bananaChocolateShake:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
local blessedSteak = Action() | ||
|
||
function blessedSteak.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if player:hasExhaustion("special-foods-cooldown") then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait before using it again.") | ||
return true | ||
end | ||
|
||
player:addMana(player:getMaxMana()) | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your mana has been refilled.") | ||
player:say("Chomp.", TALKTYPE_MONSTER_SAY) | ||
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) | ||
player:setExhaustion("special-foods-cooldown", 10 * 60) | ||
item:remove(1) | ||
return true | ||
end | ||
|
||
blessedSteak:id(9086) | ||
blessedSteak:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
local distanceCondition = Condition(CONDITION_ATTRIBUTES) | ||
distanceCondition:setParameter(CONDITION_PARAM_SUBID, JeanPierreDistance) | ||
distanceCondition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) | ||
distanceCondition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000) | ||
distanceCondition:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 10) | ||
distanceCondition:setParameter(CONDITION_PARAM_FORCEUPDATE, true) | ||
|
||
local carrotCake = Action() | ||
|
||
function carrotCake.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if player:hasExhaustion("special-foods-cooldown") then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait before using it again.") | ||
return true | ||
end | ||
|
||
player:addCondition(distanceCondition) | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You feel more focused.") | ||
player:say("Mmmm.", TALKTYPE_MONSTER_SAY) | ||
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) | ||
player:setExhaustion("special-foods-cooldown", 10 * 60) | ||
item:remove(1) | ||
return true | ||
end | ||
|
||
carrotCake:id(9087) | ||
carrotCake:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
local coconutShrimpBake = Action() | ||
|
||
function coconutShrimpBake.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if player:hasExhaustion("special-foods-cooldown") then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait before using it again.") | ||
return true | ||
end | ||
|
||
local headItem = player:getSlotItem(CONST_SLOT_HEAD) | ||
if not headItem then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should only eat this dish when wearing a helmet of the deep or a depth galea and walking underwater.") | ||
return true | ||
end | ||
|
||
local acceptableHelmets = { 5460, 11585, 13995 } | ||
if not table.contains(acceptableHelmets, headItem:getId()) then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should only eat this dish when wearing a helmet of the deep or a depth galea and walking underwater.") | ||
return true | ||
end | ||
|
||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your underwater walking speed while wearing a " .. headItem:getName() .. " has increased for twenty-four hours.") | ||
player:say("Yum.", TALKTYPE_MONSTER_SAY) | ||
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) | ||
player:setExhaustion("special-foods-cooldown", 10 * 60) | ||
player:setExhaustion("coconut-shrimp-bake", 24 * 60 * 60) | ||
item:remove(1) | ||
return true | ||
end | ||
|
||
coconutShrimpBake:id(11584) | ||
coconutShrimpBake:register() |
Oops, something went wrong.