Skip to content

Commit

Permalink
refactor: die to core and add missing achievement
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires committed Mar 6, 2024
1 parent 07621d3 commit b1572ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
18 changes: 0 additions & 18 deletions data-otservbr-global/scripts/actions/other/dice.lua

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ function die.onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:say(player:getName() .. " rolled a " .. value .. ".", TALKTYPE_MONSTER_SAY, isInGhostMode, spectator, position)
end

player:kv():set("die-rolled-six", player:kv():get("die-rolled-six") + (value == 6 and 1 or 0))

if player:kv():get("die-rolled-six") == 3 then
player:addAchievement("Number of the Beast")
end

item:transform(5791 + value)
return true
end
Expand Down

0 comments on commit b1572ac

Please sign in to comment.