diff --git a/data-otservbr-global/scripts/actions/other/dice.lua b/data-otservbr-global/scripts/actions/other/dice.lua deleted file mode 100644 index bd0c6c8f31a..00000000000 --- a/data-otservbr-global/scripts/actions/other/dice.lua +++ /dev/null @@ -1,18 +0,0 @@ -local dice = Action() - -function dice.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local dicePosition = item:getPosition() - local value = math.random(6) - local isInGhostMode = player:isInGhostMode() - - dicePosition:sendMagicEffect(CONST_ME_CRAPS, isInGhostMode and player) - local spectators = Game.getSpectators(dicePosition, false, true, 3, 3) - for i = 1, #spectators do - player:say(player:getName() .. " rolled a " .. value .. ".", TALKTYPE_MONSTER_SAY, isInGhostMode, spectators[i], dicePosition) - end - item:transform(5791 + value) - return true -end - -dice:id(5792, 5793, 5794, 5795, 5796, 5797) -dice:register() diff --git a/data-canary/scripts/actions/other/die.lua b/data/scripts/actions/items/die.lua similarity index 76% rename from data-canary/scripts/actions/other/die.lua rename to data/scripts/actions/items/die.lua index e7bc7316e9a..3e1ae42eaee 100644 --- a/data-canary/scripts/actions/other/die.lua +++ b/data/scripts/actions/items/die.lua @@ -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