-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/elsongabriel/canary into lo…
…gin-refactor # Conflicts: # data-otservbr-global/scripts/creaturescripts/others/login.lua
- Loading branch information
Showing
28 changed files
with
351 additions
and
379 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
data-otservbr-global/scripts/actions/other/door_shive1.lua
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
data-otservbr-global/scripts/actions/other/door_shive2.lua
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
data-otservbr-global/scripts/globalevents/others/hireling_save.lua
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
data-otservbr-global/scripts/globalevents/others/raids_schedule.lua
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 |
---|---|---|
@@ -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() |
59 changes: 0 additions & 59 deletions
59
data-otservbr-global/scripts/globalevents/spawn/grimvale_respawn.lua
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
data-otservbr-global/scripts/globalevents/spawn/mawhawk.lua
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
data-otservbr-global/scripts/globalevents/spawn/thawing_dragon_lord.lua
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.