Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adjusting file locations #2798

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions data-canary/scripts/actions/other/blessing_charms.lua

This file was deleted.

11 changes: 0 additions & 11 deletions data-canary/scripts/actions/other/blueberry_bush.lua

This file was deleted.

50 changes: 0 additions & 50 deletions data-canary/scripts/actions/other/clay_lump.lua

This file was deleted.

16 changes: 0 additions & 16 deletions data-canary/scripts/actions/other/piggy_bank.lua

This file was deleted.

9 changes: 0 additions & 9 deletions data-canary/scripts/actions/other/watch.lua

This file was deleted.

13 changes: 0 additions & 13 deletions data-canary/scripts/actions/other/waterpipe.lua

This file was deleted.

14 changes: 0 additions & 14 deletions data-canary/scripts/movements/cake.lua

This file was deleted.

19 changes: 0 additions & 19 deletions data-canary/scripts/movements/decay_to.lua

This file was deleted.

16 changes: 0 additions & 16 deletions data-canary/scripts/movements/dough.lua

This file was deleted.

54 changes: 0 additions & 54 deletions data-canary/scripts/movements/trap.lua

This file was deleted.

10 changes: 0 additions & 10 deletions data-otservbr-global/scripts/actions/other/check_bless.lua

This file was deleted.

15 changes: 0 additions & 15 deletions data-otservbr-global/scripts/actions/other/lottery_ticket.lua

This file was deleted.

14 changes: 0 additions & 14 deletions data-otservbr-global/scripts/actions/other/party_hat.lua

This file was deleted.

20 changes: 0 additions & 20 deletions data-otservbr-global/scripts/actions/other/sweet_heart.lua

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,29 @@ local config = {
local clayLump = Action()

function clayLump.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local random, tmpItem = math.random(0, 10000) * 0.01
for i = 1, #config do
tmpItem = config[i]
if random >= tmpItem.chance[1] and random < tmpItem.chance[2] then
local randomChance = math.random() * 100
for _, itemConfig in ipairs(config) do
if randomChance >= itemConfig.chance[1] and randomChance < itemConfig.chance[2] then
item:getPosition():sendMagicEffect(CONST_ME_POFF)

if tmpItem.remove then
if itemConfig.remove then
item:remove()
else
item:transform(tmpItem.transformId)
item:transform(itemConfig.transformId)
end

if tmpItem.sound then
player:say(tmpItem.sound, TALKTYPE_MONSTER_SAY, false, player)
if itemConfig.sound then
player:say(itemConfig.sound, TALKTYPE_MONSTER_SAY, false, player)
end

if tmpItem.description then
item:setDescription(tmpItem.description:gsub("|PLAYERNAME|", player:getName()))
if itemConfig.description then
item:setDescription(itemConfig.description:gsub("|PLAYERNAME|", player:getName()))
end

if tmpItem.achievement then
if itemConfig.achievement then
player:addAchievement("Clay Fighter")
player:addAchievementProgress("Clay to Fame", 5)
end

break
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function partyHat.onUse(player, item, fromPosition, target, toPosition, isHotkey
end

player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
player:addAchievementProgress("Party Animal", 200)
return true
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local cake = MoveEvent()

function cake.onAddItem(moveitem, tileitem, position)
-- has to be a candle
if moveitem.itemid ~= 2918 then
return true
end
Expand Down
Loading