Server upload

RD Core / Commit #2

Commit Server upload

Alex Alex committed 18/10/2026 23:38 main Patch
1,106 files +223,404 -0
A data/creaturescripts/scripts/dungeon_mod2.lua +37-0 View file
@@ -0,0 +1,37 @@
1+function modalDungeon(player)
2+
3+ player:registerEvent("DungeonSystem_Modal")
4+
5+ local window = ModalWindow(DUNGEON_SYSTEM.Modal.ID, DUNGEON_SYSTEM.Modal.Title, DUNGEON_SYSTEM.Modal.Msg)
6+
7+ window:addButton(200, "Confirm")
8+ window:addButton(201, "Details")
9+ window:addButton(202, "Exit")
10+
11+ for k,v in pairs(DUNGEON_SYSTEM.Dungeons) do
12+ window:addChoice(k, v.Name)
13+ end
14+
15+ window:setDefaultEnterButton(200)
16+ window:setDefaultEscapeButton(202)
17+
18+ window:sendToPlayer(player)
19+
20+end
21+
22+function onModalWindow(player, modalWindowId, buttonId, choiceId)
23+
24+ player:unregisterEvent("DungeonSystemType_Modal")
25+
26+ local dg = DUNGEON_SYSTEM.Dungeons
27+ local msg = DUNGEON_SYSTEM.Messages
28+ local modal = DUNGEON_SYSTEM.Modal
29+ local sto = DUNGEON_SYSTEM.Storages
30+
31+ if buttonId == 100 then
32+
33+ modalDungeon(player)
34+
35+ end
36+
37+end
Top