Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/elsongabriel/canary into lo…
Browse files Browse the repository at this point in the history
…gin-refactor

# Conflicts:
#	data-otservbr-global/scripts/creaturescripts/others/login.lua
  • Loading branch information
elsongabriel committed Feb 15, 2024
2 parents 38ed37e + 446a915 commit ee56754
Show file tree
Hide file tree
Showing 28 changed files with 351 additions and 379 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,15 @@ config.lua
config_canary.lua
client_assertions.txt
.env
otservbr.otbm
canary.otbm
otservbr-custom.otbm

# Extensions
*.ini
*.otb
*.exe
*.manifest
*.otbm
*.rar
*-house.xml
*-monster.xml
Expand Down
38 changes: 0 additions & 38 deletions data-canary/scripts/actions/other/spellbook.lua

This file was deleted.

7 changes: 0 additions & 7 deletions data-otservbr-global/raids/darashia/tyrn.xml

This file was deleted.

6 changes: 0 additions & 6 deletions data-otservbr-global/raids/roshamuul/mawhawk.xml

This file was deleted.

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

This file was deleted.

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

This file was deleted.

58 changes: 0 additions & 58 deletions data-otservbr-global/scripts/actions/spellbook.lua

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
local raidSchedule = {
["Tuesday"] = {
["16:00"] = { raidName = "Midnight Panther" },
},
["Wednesday"] = {
["12:00"] = { raidName = "Draptor" },
},
["Thursday"] = {
["19:00"] = { raidName = "Undead Cavebear" },
},
["Friday"] = {
["06:00"] = { raidName = "Titanica" },
},
["Saturday"] = {
["20:00"] = { raidName = "Draptor" },
},
["Sunday"] = {
["15:00"] = { raidName = "Midnight Panther" },
["13:00"] = { raidName = "Orc Backpack" },
},
["31/10"] = {
["16:00"] = { raidName = "Halloween Hare" },
},
}

local spawnRaidsEvent = GlobalEvent("SpawnRaidsEvent")

function spawnRaidsEvent.onThink(interval, lastExecution, thinkInterval)
local currentDayOfWeek, currentDate = os.date("%A"), getRealDate()
local raidsToSpawn = {}

if raidSchedule[currentDayOfWeek] then
raidsToSpawn[#raidsToSpawn + 1] = raidSchedule[currentDayOfWeek]
end

if raidSchedule[currentDate] then
raidsToSpawn[#raidsToSpawn + 1] = raidSchedule[currentDate]
end

if #raidsToSpawn > 0 then
for i = 1, #raidsToSpawn do
local currentRaidSchedule = raidsToSpawn[i][getRealTime()]
if currentRaidSchedule and not currentRaidSchedule.alreadyExecuted then
Game.startRaid(currentRaidSchedule.raidName)
currentRaidSchedule.alreadyExecuted = true
end
end
end
return true
end

spawnRaidsEvent:interval(60000)
spawnRaidsEvent:register()

This file was deleted.

18 changes: 0 additions & 18 deletions data-otservbr-global/scripts/globalevents/spawn/mawhawk.lua

This file was deleted.

65 changes: 0 additions & 65 deletions data-otservbr-global/scripts/globalevents/spawn/raids.lua

This file was deleted.

This file was deleted.

Loading

0 comments on commit ee56754

Please sign in to comment.