mos craciun
- mariusadrian960
- Detinator Server
- Mesaje: 76
- Membru din: Dum Dec 03, 2023 10:12 am
- Status: Activ
mos craciun
mos craciun nu merge am si eu nevoie de questul cu mos craciun cu temnita de craciun va rog frumos
- RazVan
- Administrator
- Mesaje: 695
- Membru din: Mie Oct 19, 2022 5:25 pm
- Localitate: München
- Status: Activ
- Multumiri acordate: 12
- Multumiri primite: 18
- Contact:
Re: mos craciun
Salut, eu am 3 questuri, ti le las aici si iti iei care ai nevoie. Nu uita sa modifici ca pe unul din ele am vazut ca este check de nume.mariusadrian960 scrie: ↑Mie Ian 17, 2024 6:48 pm mos craciun nu merge am si eu nevoie de questul cu mos craciun cu temnita de craciun va rog frumos
Christmas2021_Dun_zone.lua
Cod: Selectaţi tot
quest Christmas2021Dun_zone begin
state start begin
when login with Christmas2021DunLIB.isActive() begin
local settings = Christmas2021DunLIB.Settings();
local Time = settings["time_to_destroy_stones"]
local minutes = math.floor(Time / 60)
if (party.is_party() and party.is_leader() or not party.is_party()) then
d.setf("Christmas2021Dun_NotFinished", 1);
d.setf("Christmas2021Dun_stage", 1);
d.setf("Christmas2021Dun_1f_stone", 1);
Christmas2021DunLIB.setOutCoords();
Christmas2021DunLIB.setReward();
Christmas2021DunLIB.spawnDoor();
Christmas2021DunLIB.setDungeonTimer();
d.spawn_mob_dir(9425, 664, 529, 5)
d.regen_file("data/dungeon/christmas2021_dungeon/regen_1f_stones.txt");
d.notice("Winterland: Destroy all stones to proceed!")
d.notice(string.format("Winterland: Do it in %s minutes! Otherwise the next spawned bosses will be much stronger!", minutes))
server_timer("Christmas2021Dun_First_Stone_timer", Time, d.get_map_index())
end
end
---------
-- 1. Floor
-- Players destroy first 3 stones (8714), monster wave is spawn after that
-------------
when 8714.kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 1 begin
local settings = Christmas2021DunLIB.Settings();
local Stone_count_1f = 3;
local Stone_count_2f = 6;
if d.getf("Christmas2021Dun_1f_stone") == 1 then
d.setf("Christmas2021Dun_stone_1", d.getf("Christmas2021Dun_stone_1")+1);
if (d.getf("Christmas2021Dun_stone_1") < Stone_count_1f) then
d.notice(string.format("Winterland: %d stones has left!", Stone_count_1f - d.getf("Christmas2021Dun_stone_1")));
else
clear_server_timer("Christmas2021Dun_First_Stone_timer", d.get_map_index());
d.setf("Christmas2021Dun_1f_stone", 0);
Christmas2021DunLIB.spawnFirstFloorWave();
end
elseif d.getf("Christmas2021Dun_1f_stone") == 2 then
d.setf("Christmas2021Dun_stone_2", d.getf("Christmas2021Dun_stone_2")+1);
if (d.getf("Christmas2021Dun_stone_2") < Stone_count_2f) then
d.notice(string.format("Winterland: %d stones has left!", Stone_count_2f - d.getf("Christmas2021Dun_stone_2")));
else
d.setf("Christmas2021Dun_1f_stone", 0);
d.setf("Christmas2021Dun_CanDestroyPillar", 1);
game.drop_item(30890, 1);
end
end
end
-------------
-- 1. Floor
-- If players didn't destroy all 3 stones until here, the next 2 bosses will have much HP
-------------
when Christmas2021Dun_First_Stone_timer.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("Christmas2021Dun_1f_stone") == 1 then
d.setf("Christmas2021Dun_1f_BossHP", 1)
d.notice("Winterland: You didn't destroy the stones in the time.")
d.notice("Winterland: It will be much harder for you now.")
end
end
end
---------
-- 1. Floor
-- Players kill first wave of monsters, then drop item to open a door
-------------
when kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 1 and d.getf("Christmas2021Dun_1f_monsters_k") == 1 begin
local settings = Christmas2021DunLIB.Settings();
local KILL_COUNT = settings["KILL_COUNT_1_WAVE"];
local n = d.getf("Christmas2021Dun_1f_monsters_c") + 1
d.setf("Christmas2021Dun_1f_monsters_c", n)
if n >= KILL_COUNT then
d.setf("Christmas2021Dun_1f_monsters_c", 0)
d.setf("Christmas2021Dun_1f_monsters_k", 0)
d.setf("Christmas2021Dun_Door_Destroy", 1)
game.drop_item(30889, 1)
d.notice(string.format("Winterland: You can open %s now!", mob_name(9424)));
end
end
---------
-- 1. Floor
-- Players open 2 doors with item dropped from wave of monsters
-------------
when 9424.take with Christmas2021DunLIB.isActive() and item.get_vnum() == 30889 and d.getf("Christmas2021Dun_stage") == 1 and d.getf("Christmas2021Dun_Door_Destroy") == 1 begin
local settings = Christmas2021DunLIB.Settings();
item.remove();
d.setf("Christmas2021Dun_Door_Destroy", 0);
d.setf("Christmas2021Dun_CanKill_1_Boss", 1);
Christmas2021DunLIB.spawnFirstBoss();
end
---------
-- 1. Floor
-- Players kill first boss (2x) and drop a special item to destroy the spawned pillar
-------------
when 4477.kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 1 and d.getf("Christmas2021Dun_CanKill_1_Boss") == 1 begin
local settings = Christmas2021DunLIB.Settings();
d.setf("Christmas2021Dun_CanDestroyPillar", 1)
d.setf("Christmas2021Dun_CanKill_1_Boss", 0)
game.drop_item(30890, 1)
d.notice(string.format("Winterland: Use the %s to destroy first part of %s.", item_name(30890), mob_name(9425)));
end
---------
-- 1. Floor
-- Players destroy first part of the pillar (9424)
-------------
when 9425.take with Christmas2021DunLIB.isActive() and item.get_vnum() == 30890 and d.getf("Christmas2021Dun_stage") == 1 and d.getf("Christmas2021Dun_CanDestroyPillar") == 1 begin
local settings = Christmas2021DunLIB.Settings();
item.remove();
d.spawn_mob_dir(9426, 664, 529, 5)
npc.kill();
d.setf("Christmas2021Dun_CanDestroyPillar", 0);
server_timer("Christmas2021Dun_SecondWaveSpawner", settings["time_to_proceed"], d.get_map_index())
end
---------
-- 1. Floor
-- Players destroy second part of the pillar (9424)
-------------
when 9426.take with Christmas2021DunLIB.isActive() and item.get_vnum() == 30890 and d.getf("Christmas2021Dun_stage") == 1 and d.getf("Christmas2021Dun_CanDestroyPillar") == 1 begin
local settings = Christmas2021DunLIB.Settings();
item.remove();
d.spawn_mob_dir(9427, 664, 529, 5)
npc.kill();
d.setf("Christmas2021Dun_CanDestroyPillar", 0);
d.setf("Christmas2021Dun_1f_stone", 2);
d.regen_file("data/dungeon/christmas2021_dungeon/regen_1f_stones2.txt");
d.notice("Winterland: Destroy all stones to proceed")
end
---------
-- 1. Floor
-- Players destroy third part of the pillar (9424)
-------------
when 9427.take with Christmas2021DunLIB.isActive() and item.get_vnum() == 30890 and d.getf("Christmas2021Dun_stage") == 1 and d.getf("Christmas2021Dun_CanDestroyPillar") == 1 begin
local settings = Christmas2021DunLIB.Settings();
Christmas2021DunLIB.clearDungeon();
item.remove();
d.notice("Winterland: You have succefully finished first stage")
d.notice("Winterland: You will proceed in few seconds")
server_timer("Christmas2021Dun_Jumper_timer", settings["time_to_proceed"], d.get_map_index())
end
-------------
-- 1. Floor
-- Second wave of monsters is spawned
-------------
when Christmas2021Dun_SecondWaveSpawner.server_timer begin
if d.select(get_server_timer_arg()) then
Christmas2021DunLIB.spawnFirstFloorWave();
end
end
-------------
-- 1. Floor
-- Players are teleported into second stage
-------------
when Christmas2021Dun_Jumper_timer.server_timer begin
if d.select(get_server_timer_arg()) then
Christmas2021DunLIB.jumpSecondFloor();
end
end
---------
-- 2. Floor
-- Players have to find real sock stone (8715) and drop an item (30891)
-------------
when 8715.kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 2 begin
local settings = Christmas2021DunLIB.Settings();
local Time = settings["time_to_proceed"]
if d.getf("Christmas2021Dun_CanDestroySock") == 1 then
if npc.get_vid() == d.get_unique_vid("real") then
d.purge_area(3116300, 2338700, 3148600, 2355000);
game.drop_item(30891, 1);
d.setf("Christmas2021Dun_CanDestroySock", 0)
d.setf("Christmas2021Dun_CanSpawnTrees", 1)
else
d.notice("Winterland: This was just an illusion!")
end
end
end
---------
-- 2. Floor
-- Players have to find real sock stone (8715) and drop an item (30891)
-------------
when 30891.use with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 2 and d.getf("Christmas2021Dun_CanSpawnTrees") == 1 begin
local settings = Christmas2021DunLIB.Settings();
item.remove();
d.setf("Christmas2021Dun_CanSpawnTrees", 0)
Christmas2021DunLIB.spawnTrees();
Christmas2021DunLIB.spawnHelper();
d.notice("Winterland: The trees have been uncovered! You have to decorate all of them!")
d.notice(string.format("Winterland: Start with kill of %s", mob_name(4478)));
server_timer("Christmas2021Dun_Tree_Decorating", settings["time_to_decorate_trees"], d.get_map_index())
end
---------
-- 2. Floor
-- Players kill second boss (4x) and drop a special item to decorate a tree
-------------
when 4478.kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 2 and d.getf("Christmas2021Dun_CanKillHelper") == 1 begin
local settings = Christmas2021DunLIB.Settings();
d.setf("Christmas2021Dun_CanKillHelper", 0)
d.setf("Christmas2021Dun_CanDecorateTree", 1)
game.drop_item(30892, 1)
d.notice(string.format("Winterland: Use the %s to decorate a tree!", item_name(30891)));
end
---------
-- 2. Floor
-- Players decorate a trees!
-------------
when 9430.take with Christmas2021DunLIB.isActive() and item.get_vnum() == 30892 and d.getf("Christmas2021Dun_stage") == 2 and d.getf("Christmas2021Dun_CanDecorateTree") == 1 begin
local settings = Christmas2021DunLIB.Settings();
Christmas2021DunLIB.decorateTree();
end
---------
-- 2. Floor
-- Players kill waves of monsters to be able to kill Santa's helper (4478)
-------------
when kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 2 and d.getf("Christmas2021Dun_2f_monsters_k") == 1 begin
local settings = Christmas2021DunLIB.Settings();
local KILL_COUNT = settings["KILL_COUNT_2_WAVE"];
local n = d.getf("Christmas2021Dun_2f_monsters_c") + 1
d.setf("Christmas2021Dun_2f_monsters_c", n)
if n >= KILL_COUNT then
d.setf("Christmas2021Dun_2f_monsters_c", 0)
d.setf("Christmas2021Dun_2f_monsters_k", 0)
d.setf("Christmas2021Dun_CanKillHelper", 1)
Christmas2021DunLIB.spawnHelper();
d.notice(string.format("Winterland: Kill %s again!", mob_name(4478)));
end
end
-------------
-- 2. Floor
-- If players wont decorate all trees in time limit, the reward chest wont be spawned
-------------
when Christmas2021Dun_Tree_Decorating.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("Christmas2021Dun_TreeDecorating") == 1 then
d.setf("Christmas2021Dun_NoRewardChest", 1)
d.notice("Winterland: You haven't decorated all trees in time limit.")
d.notice(string.format("Winterland: %s won't be spawned.", mob_name(9432)));
end
end
end
-------------
-- 2. Floor
-- Spawn of main boss
-------------
when Christmas2021Dun_MainBossSpawner.server_timer begin
if d.select(get_server_timer_arg()) then
local settings = Christmas2021DunLIB.Settings();
local Time = settings["time_to_kill_main_boss"]
local minutes = math.floor(Time / 60)
d.setf("Christmas2021Dun_CanKillMainBoss", 1)
d.spawn_mob(4479, 766, 950);
d.notice(string.format("Winterland: Kill %s!!! You have only %s minutes for that. Hurry up!", mob_name(4479), minutes));
d.notice("Winterland: If you won't kill him in that time, the whole dungoen is over.")
server_timer("Christmas2021Dun_TimeToKillMainBoss", Time, d.get_map_index())
end
end
---------
-- 2. Floor
-- Players kill main boss, chest reward is spawned.
-------------
when 4479.kill with Christmas2021DunLIB.isActive() and not npc.is_pc() and d.getf("Christmas2021Dun_stage") == 2 and d.getf("Christmas2021Dun_CanKillMainBoss") == 1 begin
local settings = Christmas2021DunLIB.Settings();
local SockTimer = settings["time_to_put_socks"]
local ExitTimer = settings["timer_to_exit_dungeon"]
local minutes = math.floor(ExitTimer / 60)
clear_server_timer("Christmas2021Dun_TimeToKillMainBoss", d.get_map_index());
clear_server_timer("Christmas2021Dun_DungeonExit", d.get_map_index());
d.setf("Christmas2021Dun_NotFinished", 0);
d.setf("Christmas2021Dun_CanKillMainBoss", 0);
d.setf("Christmas2021Dun_CanTakeReward", 1);
if d.getf("Christmas2021Dun_NoSocks") < 1 then
d.setf("Christmas2021Dun_CanUseSocks", 1);
end
if d.getf("Christmas2021Dun_NoRewardChest") < 1 then
d.spawn_mob_dir(9432, 735, 950, 3);
end
server_timer("Christmas2021Dun_TimeToPutSocks", SockTimer, d.get_map_index());
server_timer("Christmas2021Dun_FinalExit", ExitTimer, d.get_map_index());
d.notice(string.format("Winterland: You have %s seconds to put socks into any tree in this room.", SockTimer));
d.notice(string.format("Winterland: %s was also spawned, so you can pick your reward.", mob_name(9432)));
d.notice(string.format("Winterland: You will be teleported out of dungeon in %s minutes", ExitTimer));
end
-------------
-- 2. Floor
-- If players wont kill final boss in that time, dungeon is ended
-------------
when Christmas2021Dun_TimeToKillMainBoss.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("Christmas2021Dun_CanKillMainBoss") == 1 then
d.notice(string.format("Winterland: You haven't killed %s in limited time.", mob_name(4479)));
d.notice("Winterland: You won't be able to put socks on trees and get some rewards.");
d.setf("Christmas2021Dun_NoSocks", 1);
end
end
end
-----
--Players can take reward from the chest
-----
when 9432.chat."Take reward" with Christmas2021DunLIB.isActive() and d.getf("Christmas2021Dun_CanTakeReward") == 1 begin
setskin(NOWINDOW);
if d.getf(string.format("player_%d_reward_state", pc.get_player_id())) == 1 then
pc.give_item2(30893, 1);
d.setf(string.format("player_%d_reward_state", pc.get_player_id()), 0);
else
syschat("Winterland: You already took the reward!")
end
end
---------
-- Players decorate a trees!
-------------
when 9431.take with Christmas2021DunLIB.isActive() and item.get_vnum() == 30894 and d.getf("Christmas2021Dun_CanUseSocks") == 1 begin
local settings = Christmas2021DunLIB.Settings();
Christmas2021DunLIB.sockReward();
end
-------------
-- If this timer comes up, players are not able to put socks on trees anymore
-------------
when Christmas2021Dun_DungeonExit.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("Christmas2021Dun_NotFinished") == 1 then
d.notice("Winterland: You have failed.");
d.exit_all();
end
end
end
-------------
-- If this timer comes up, players are not able to put socks on trees anymore
-------------
when Christmas2021Dun_FinalExit.server_timer begin
if d.select(get_server_timer_arg()) then
d.exit_all();
end
end
-------------
-- If this timer comes up, whole dungeon is ended
-------------
when Christmas2021Dun_TimeToPutSocks.server_timer begin
if d.select(get_server_timer_arg()) then
d.setf("Christmas2021Dun_CanUseSocks", 0);
d.notice("Winterland: The magic is gone. You can't put the socks on trees anymore.")
end
end
------------
-- Set waiting time for next enter (1 hour - 3600 seconds)
------------
when logout with Christmas2021DunLIB.isActive() begin
local Items = {30889, 30890, 30891, 30892};
for index = 1, table.getn(Items) do
pc.remove_item(Items[index], pc.count_item(Items[index]));
end
if not pc.is_gm() then
Christmas2021DunLIB.setWaitingTime()
end
end
end
end
Cod: Selectaţi tot
quest santa begin
state start begin
when 9004.chat."Evenimentul de Craciun" with pc.is_gm() and pc.get_name() == "[SA]Umbra" or pc.get_name() == "[SA]KuDo" or pc.get_name() == "[SA]Claws" begin
say_title("Evenimentul de Craciun:")
if game.get_event_flag("xmas")==0 then
say("Evenimentul de Craciun este oprit.")
say("Vrei sa il pornesti?")
local s1 = select("Da", "Nu")
if s1 == 1 then
say("Evenimentul de Craciun a fost Pornit!")
game.set_event_flag("xmas", 1)
notice_all("Evenimentul de Craciun tocmai ce a inceput")
notice_all("Incepand de acum puteti dropa")
notice_all("sosete de la toti monstrii")
notice_all("Succes!")
else
return
end
else
say("Evenimentul de Craciun este pornit")
say("Vrei sa il opresti?")
local s2 = select("Da", "Nu")
if s2 == 1 then
say("Evenimentul de Craciun a fost oprit!")
game.set_event_flag("xmas", 0)
notice_all("Evenimentul de Craciun a luat sfarsit.")
notice_all("Speram ca ati castigat premii folositoare!")
end
end
end
when kill with game.get_event_flag("xmas")==1 and not npc.is_pc() begin
local drop = number(1, 75)
if drop == 1 then
game.drop_item_with_ownership(50010, 1)
end
end
end
end
Cod: Selectaţi tot
quest Christmas2021Dun_enter begin
state start begin
---Info about dungeon
when 9423.chat."Who are you?" with not Christmas2021DunLIB.isActive() begin
setbgimage("ch2020_quest_bg.tga"); addimage(240, 225, "ch2021_npc1.tga");
say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
say("Hello![ENTER]My name is Freya, i came from a secret and distant[ENTER]land called Winterland. The whole land is protected by[ENTER]Christmas spell so no one can visit us.[ENTER]We live there whole year, preparing for Christmas season[ENTER]in quiet and peace.")
say("But something bad has happened this year.[ENTER]We started to have a really wierd feeling.[ENTER]Many creatures has completly changed, like they were sick.[ENTER]But the worst thing is something else...[ENTER]Santa is gone! His room is occupied by [ENTER]evil creature. It calls Ghost of Santa itself.")
wait()
setbgimage("ch2020_quest_bg.tga"); addimage(240, 225, "ch2021_npc1.tga");
say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
say("We need your help! We need to save Christmas![ENTER]Please, help us! We haved removed the spell for now,[ENTER]so anyone can enter the Winterland.")
end
---Special elixir to stay longer in the dungeon
when 9423.chat."Winterland elixir" with not Christmas2021DunLIB.isActive() begin
local settings = Christmas2021DunLIB.Settings();
local ElixirName = item_name(settings["Item_elixir"])
local TimerElixir = settings["timer_to_get_next_elixir"]
setbgimage("ch2020_quest_bg.tga"); addimage(240, 225, "ch2021_npc1.tga");
say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
say_item(""..ElixirName.."", settings["Item_elixir"], "")
say("Winterland is really cold land.[ENTER]Even with the warmest clothes you can stay there[ENTER]only a little time. Of course there is a way[ENTER]to stay there longer. With our special elixir[ENTER]you can stay there for a little longer.")
if (select("Get elixir", "Close") == 1) then
if ((get_global_time() - pc.getf("christmas2021_getpotion","christmas2021_getpotion_again")) < TimerElixir) then
local remaining_wait_time = (pc.getf("christmas2021_getpotion","christmas2021_getpotion_again") - get_global_time() + TimerElixir)
setbgimage("ch2020_quest_bg.tga"); addimage(240, 225, "ch2021_npc1.tga");
say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
say(string.format("You have to wait until you can get[ENTER]another %s", ElixirName))
say_reward("You can get it again in: "..get_time_remaining(remaining_wait_time)..'[ENTER]')
return
else
setbgimage("ch2020_quest_bg.tga"); addimage(240, 225, "ch2021_npc1.tga");
say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
say_item(""..ElixirName.."", settings["Item_elixir"], "")
say("Here you go!")
pc.give_item2(settings["Item_elixir"], 1)
pc.setf("christmas2021_getpotion","christmas2021_getpotion_again", get_global_time())
pc.setqf("christmas2021_getpotion", get_time() + TimerElixir)
end
end
end
----Dungeon enter
when 9423.chat."Winterland" with not Christmas2021DunLIB.isActive() begin
local settings = Christmas2021DunLIB.Settings();
setbgimage("ch2020_quest_bg.tga"); addimage(240, 225, "ch2021_npc1.tga");
say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
say_reward("Do you really want to enter the dungeon?")
if (select("Yes!", "No") == 1) then
if Christmas2021DunLIB.checkEnter() then
Christmas2021DunLIB.CreateDungeon();
end
end
end
end
end
- mariusadrian960
- Detinator Server
- Mesaje: 76
- Membru din: Dum Dec 03, 2023 10:12 am
- Status: Activ