-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle prayer activation and deactivation separately
- Loading branch information
Showing
5 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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
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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
--- Handles activating the thick spin prayer. | ||
-- @param player The player who activated the prayer | ||
function prayer_thick_skin(player) | ||
player:toggle_prayer(PRAYER_THICK_SKIN, 3) | ||
-- @param activate true if the prayer should be activated, false if deactivated | ||
function prayer_thick_skin(player, activate) | ||
if activate then | ||
local ok = skill_level_minimum(player, SKILL_PRAYER, 1, "You need prayer level 1 to use this prayer.") | ||
if not ok then | ||
return true | ||
end | ||
|
||
player:activate_prayer(PRAYER_THICK_SKIN, 3) | ||
else | ||
player:deactivate_prayer(PRAYER_THICK_SKIN) | ||
end | ||
end |