ich hab mir heute Nachmittag, als das Internet ausgefallen ist gedacht: was könnte ich euch heute schönes anbieten???
Da kam mir die Idee:
Eine Metin2 Kaiserwahl quest
Sie geht von Uriel aus und ist da komplett als GM zu steuern
Sie hat eine Kaiseranwährter begrenzung von 5 Leuten pro Reich, was sich allerding innerhalb von 5 minuten beliebig ändern läst
Außerdem hat sie ein Nummernverfahren, was auf-gut-glück wähler abschrecken soll
Ja jetzt will ich euch nicht weiter nerven ( wenn ihr das hier überhaupt gelesen habt ) hier ist die quest ( auch nochmal vorhanden in anhang ):
PHP Code:
-- Metin2 Pserver Monarch Quest BY Fabian1233
-- Geschrieben für den verbleib auf E*PvPers
quest monarch begin
state start begin
when 20011.chat."Ich möchte meine Rüstung" with game.get_event_flag("KaiserRot") == pc.get_vid() and pc.getqf("Rüssi") == 0 begin
say("Hallo "..pc.get_name())
say("Herzlichen Glückwunsch zur neuen Rüstung")
say("Ab Jetzt kannst du hier Server Notizen schreiben")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("Rüssi", 1)
end
when 20011.chat."Ich möchte meine Rüstung" with game.get_event_flag("KaiserGelb") == pc.get_vid() and pc.getqf("Rüssi") == 0 begin
say("Hallo "..pc.get_name())
say("Herzlichen Glückwunsch zur neuen Rüstung")
say("Ab Jetzt kannst du hier Server Notizen schreiben")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("Rüssi", 1)
end
when 20011.chat."Ich möchte meine Rüstung" with game.get_event_flag("KaiserBlau") == pc.get_vid() and pc.getqf("Rüssi") == 0 begin
say("Hallo "..pc.get_name())
say("Herzlichen Glückwunsch zur neuen Rüstung")
say("Ab Jetzt kannst du hier Server Notizen schreiben")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("Rüssi", 1)
end
when 20011.chat."Ich möchte an alle schreiben" with pc.qetqf("Rüssi") == 1 begin
say("Was möchtest du schreiben?")
notice_all(input())
end
when 20011.chat."Ich möchte die Kaiserwahl starten" with pc.is_gm() and game.get_event_flag("Monarch") == 0 begin
say("Hallo "..pc.get_name())
say("Möchtest du die Kaiserwahl starten?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
notice_all("Die Kaiserwahl hat begonnen")
server_timer("Wahl", 1*60)
game.set_event_flag("rot1", 0)
game.set_event_flag("rot2", 0)
game.set_event_flag("rot3", 0)
game.set_event_flag("rot4", 0)
game.set_event_flag("rot5", 0)
game.set_event_flag("blau1", 0)
game.set_event_flag("blau2", 0)
game.set_event_flag("blau3", 0)
game.set_event_flag("blau4", 0)
game.set_event_flag("blau5", 0)
game.set_event_flag("gelb1", 0)
game.set_event_flag("gelb2", 0)
game.set_event_flag("gelb3", 0)
game.set_event_flag("gelb4", 0)
game.set_event_flag("gelb5", 0)
game.set_event_flag("rot1votes", 0)
game.set_event_flag("rot2votes", 0)
game.set_event_flag("rot3votes", 0)
game.set_event_flag("rot4votes", 0)
game.set_event_flag("rot5votes", 0)
game.set_event_flag("blau1votes", 0)
game.set_event_flag("blau2votes", 0)
game.set_event_flag("blau3votes", 0)
game.set_event_flag("blau4votes", 0)
game.set_event_flag("blau5votes", 0)
game.set_event_flag("gelb1votes", 0)
game.set_event_flag("gelb2votes", 0)
game.set_event_flag("gelb3votes", 0)
game.set_event_flag("gelb4votes", 0)
game.set_event_flag("gelb5votes", 0)
game.set_event_flag("rotrest", 5)
game.set_event_flag("blaurest", 5)
game.set_event_flag("gelbrest", 5)
say("Das event wurde gestartet")
game.set_event_flag("Monarch", 1)
game.set_event_flag("KaiserRot", 0)
game.set_event_flag("KaiserBlau", 0)
game.set_event_flag("KaiserGelb", 0)
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich möchte das Abstimmen Beginnen" with pc.is_gm() and game.get_event_flag("Monarch") == 1 begin
say("Hallo "..pc.get_name())
say("Möchtest du die Abstimmung zum ")
say("neuen Kaiser beginnen?")
say("Im Moment sind noch:")
say(game.get_event_flag("rotrest").." Plätze im Roten")
say(game.get_event_flag("gelbrest").." Plätze im Gelben")
say(game.get_event_flag("blaurest").." Plätze im Blauen")
say("Ungenutzt")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
say("Okey die Abstimmung wird Begonnen")
game.set_event_flag("Monarch", 2)
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich möchte den Kaiser ernennen" with pc.is_gm() and game.get_event_flag("Monarch") == 2 begin
say("Hallo "..pc.get_name())
say("Möchtest du die Ernennung des Kaisers starten?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
say("Okey die Wahl wurde Beendet")
say("Die Neuen Kaiser sind: ")
if game.get_event_flag("rot1votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot3votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot1"))
local a = 1
elseif game.get_event_flag("rot2votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot3votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot2"))
local a = 2
elseif game.get_event_flag("rot3votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot3"))
local a = 3
elseif game.get_event_flag("rot4votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot4"))
local a = 4
elseif game.get_event_flag("rot5votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") and game.get_event_flag("rot5votes") > game.get_event_flag("rot1votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot5"))
local a = 5
end
if game.get_event_flag("gelb1votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb3votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb1"))
local b = 1
elseif game.get_event_flag("gelb2votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb3votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb2"))
local b = 2
elseif game.get_event_flag("gelb3votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb3"))
local b = 3
elseif game.get_event_flag("gelb4votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb4"))
local b = 4
elseif game.get_event_flag("gelb5votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") and game.get_event_flag("gelb5votes") > game.get_event_flag("gelb1votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb5"))
local b = 5
end
if game.get_event_flag("blau1votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau3votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau1"))
local c = 1
elseif game.get_event_flag("blau2votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau3votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau2"))
local c = 2
elseif game.get_event_flag("blau3votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau3"))
local c = 3
elseif game.get_event_flag("blau4votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau4"))
local c = 4
elseif game.get_event_flag("blau5votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") and game.get_event_flag("blau5votes") > game.get_event_flag("blau1votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau5"))
local c = 5
end
say("Rotes Reich: Liste "..a)
say("Gelbes Reich: Liste "..b)
say("Blaues Reich: Liste "..c)
wait()
notice_all("Die Gewinner der Kaiserwahl stehen fest:")
notice_all("Rotes Reich: Liste "..a)
notice_all("Gelbes Reich: Liste "..b)
notice_all("Blaues Reich: Liste "..c)
game.set_event_flag("Monarch", 0)
elseif sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich möchte die Kaiserwahl Beenden" with pc.is_gm() and game.get_event_flag("Monarch") != 0 begin
say("Hallo "..pc.get_name())
say("Möchtest du die Kaiserwahl beenden?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
say("Okey die Wahl wurde Beendet")
game.set_event_flag("Monarch", 0)
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when letter with game.get_event_flag("Monarch") == 1 begin
send_letter("Die Kaiserwahl hat begonnen!")
end
when info or button with game.get_event_flag("Monarch") == 1 begin
pc.remove_item(11971, 1)
pc.remove_item(11972, 1)
pc.remove_item(11973, 1)
pc.remove_item(11974, 1)
say("Hallo "..pc.get_name())
say("Hier auf dem Server hat jeder die Wahl")
say("Sich zum Kaiser machen zu lassen")
say("Das hat einige Vorteile")
say("Allerdings können sich nur 5 Spieler")
say("Pro Reich aufstellen lassen")
say("Wenn du Teilnehmen möchtest gehe zu Uriel")
pc.setqf("Gewählt", 0)
pc.setqf("Rüssi", 0)
if pc.get_level() > 99 then
say_reward("Du hast das Erforderliche Level zum Teilnehmen")
else
say_reward("Du must zum Teilnehmen noch ".. 100 - pc.get_level() .." Level aufsteigen")
end
end
when letter with game.get_event_flag("Monarch") == 2 begin
send_letter("Die Kaiserwahl hat begonnen!")
end
when info or button with game.get_event_flag("Monarch") == 2 begin
say("Hallo "..pc.get_name())
say("Hier auf dem Server hat jeder die Wahl")
say("Sich zum Kaiser machen zu lassen")
say("Das hat einige Vorteile")
say("Allerdings können sich nur 5 Spieler")
say("Pro Reich aufstellen lassen")
say("Das Aufstellen wurde Bereits Beendet")
say("Du kannst nun Abstimmen")
if pc.get_level() > 49 then
say_reward("Du hast das Erforderliche Level zum Teilnehmen")
else
say_reward("Du must zum Teilnehmen noch ".. 49 - pc.get_level() .." Level aufsteigen")
end
end
when Wahl.timer with game.get_event_flag("Monarch") == 1 begin
server_timer ("Wahl", 1*60)
notice_all("Es sind im Moment "..game.get_event_flag("rotrest").."Plätze im Roten Reich zum Bewerben frei")
notice_all("Es sind im Moment "..game.get_event_flag("gelbrest").."Plätze im Gelben Reich zum Bewerben frei")
notice_all("Es sind im Moment "..game.get_event_flag("blaurest").."Plätze im Blauen Reich zum Bewerben frei")
end
when Wahl.timer with game.get_event_flag("Monarch") == 2 begin
server_timer ("Wahl", 1*60)
notice_all("Das Abstimmen ist im Vollem Gange")
notice_all("Aktueller Stand:")
notice_all("Rot: Liste 1: "..game.get_event_flag("rot1votes").."Stimmen. Liste2: "..game.get_event_flag("rot2votes").."Stimmen. Liste3: "..game.get_event_flag("rot3votes").."Stimmen. Liste4: "..game.get_event_flag("rot5votes").."Stimmen. Liste5: "..game.get_event_flag("rot5votes").."Stimmen.")
notice_all("Gelb: Liste 1: "..game.get_event_flag("gelb1votes").."Stimmen. Liste2: "..game.get_event_flag("gelb2votes").."Stimmen. Liste3: "..game.get_event_flag("gelb3votes").."Stimmen. Liste4: "..game.get_event_flag("gelb5votes").."Stimmen. Liste5: "..game.get_event_flag("gelb5votes").."Stimmen.")
notice_all("Blau: Liste 1: "..game.get_event_flag("blau1votes").."Stimmen. Liste2: "..game.get_event_flag("blau2votes").."Stimmen. Liste3: "..game.get_event_flag("blau3votes").."Stimmen. Liste4: "..game.get_event_flag("blau5votes").."Stimmen. Liste5: "..game.get_event_flag("blau5votes").."Stimmen.")
end
when 20011.chat."Ich möchte mich als Kaiser Bewerben" with pc.get_level() > 99 and game.get_event_flag("Monarch") == 1 begin
say("Du willst dich also zum Kaiser aufstellen lassen?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
if pc.get_empire() == 1 then
if game.get_event_flag("rotrest") > 0 then
if game.get_event_flag("rotrest") == 5 then
game.set_event_flag("rot1", pc.get_vid())
local a = 1
elseif game.get_event_flag("rotrest") == 4 then
game.set_event_flag("rot2", pc.get_vid())
local a = 2
elseif game.get_event_flag("rotrest") == 3 then
game.set_event_flag("rot3", pc.get_vid())
local a = 3
elseif game.get_event_flag("rotrest") == 2 then
game.set_event_flag("rot4", pc.get_vid())
local a = 4
elseif game.get_event_flag("rotrest") == 1 then
game.set_event_flag("rot5", pc.get_vid())
local a = 5
end
game.set_event_flag("rotrest", game.get_event_flag("rotrest") - 1)
say("Du hast dich Erfolgreich eingetragen")
notice_all("Der Spieler "..pc.get_name().." hat sich an "..a.."ter Stelle im Roten Reich eingetragen")
else
say("Tut mir leid aber es sind keine Plätze mehr frei")
end
elseif pc.get_empire() == 2 then
if game.get_event_flag("gelbrest") > 0 then
if game.get_event_flag("gelbrest") == 5 then
game.set_event_flag("gelb1", pc.get_vid())
local a = 1
elseif game.get_event_flag("gelbrest") == 4 then
game.set_event_flag("gelb2", pc.get_vid())
local a = 2
elseif game.get_event_flag("gelbrest") == 3 then
game.set_event_flag("gelb3", pc.get_vid())
local a = 3
elseif game.get_event_flag("gelbrest") == 2 then
game.set_event_flag("gelb4", pc.get_vid())
local a = 4
elseif game.get_event_flag("gelbrest") == 1 then
game.set_event_flag("gelb5", pc.get_vid())
local a = 5
end
game.set_event_flag("gelbrest", game.get_event_flag("gelbrest") - 1)
say("Du hast dich Erfolgreich eingetragen")
notice_all("Der Spieler "..pc.get_name().." hat sich an "..a.."ter Stelle im Gelben Reich eingetragen")
else
say("Tut mir leid aber es sind keine Plätze mehr frei")
end
elseif pc.get_empire() == 3 then
if game.get_event_flag("blaurest") > 0 then
if game.get_event_flag("blaurest") == 5 then
game.set_event_flag("blau1", pc.get_vid())
local a = 1
elseif game.get_event_flag("blaurest") == 4 then
game.set_event_flag("blau2", pc.get_vid())
local a = 2
elseif game.get_event_flag("blaurest") == 3 then
game.set_event_flag("blau3", pc.get_vid())
local a = 3
elseif game.get_event_flag("blaurest") == 2 then
game.set_event_flag("blau4", pc.get_vid())
local a = 4
elseif game.get_event_flag("blaurest") == 1 then
game.set_event_flag("blau5", pc.get_vid())
local a = 5
end
game.set_event_flag("blaurest", game.get_event_flag("blaurest") - 1)
say("Du hast dich Erfolgreich eingetragen")
notice_all("Der Spieler "..pc.get_name().." hat sich an "..a.."ter Stelle im blauen Reich eingetragen")
else
say("Tut mir leid aber es sind keine Plätze mehr frei")
end
end
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich möchte an der Abstimmung Teilnehmen" with game.get_event_flag("Monarch") == 2 and pc.get_level() > 49 begin
say("Du hast bestimmt schon in den Chats")
say("Gehört das jeder Spieler eine Nummer hab")
say("So wollen wir willkührwahlen Verhindern")
say("Entscheide dich gut wen du wählen möchtest")
say("Willst du Fortfahren")
local sel = select("Fortfahren", "Abbrechen")
if sel == 1 then
if pc.getqf("Gewählt") == 0 then
if pc.get_empire() == 1 then
local sel = select("Liste 1","Liste 2","Liste 3","Liste 4","Liste 5", locale.cancel)
if sel == 1 then
game.set_event_flag("rot1votes", game.get_event_flag("rot1votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 2 then
game.set_event_flag("rot2votes", game.get_event_flag("rot2votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 3 then
game.set_event_flag("rot3votes", game.get_event_flag("rot3votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 4 then
game.set_event_flag("rot4votes", game.get_event_flag("rot4votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 5 then
game.set_event_flag("rot5votes", game.get_event_flag("rot5votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
end
elseif pc.get_empire() == 2 then
local sel = select("Liste 1","Liste 2","Liste 3","Liste 4","Liste 5", locale.cancel)
if sel == 1 then
game.set_event_flag("gelb1votes", game.get_event_flag("gelb1votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 2 then
game.set_event_flag("gelb2votes", game.get_event_flag("gelb2votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 3 then
game.set_event_flag("gelb3votes", game.get_event_flag("gelb3votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 4 then
game.set_event_flag("gelb4votes", game.get_event_flag("gelb4votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 5 then
game.set_event_flag("gelb5votes", game.get_event_flag("gelb5votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
end
elseif pc.get_empire() == 3 then
local sel = select("Liste 1","Liste 2","Liste 3","Liste 4","Liste 5", locale.cancel)
if sel == 1 then
game.set_event_flag("blau1votes", game.get_event_flag("blau1votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 2 then
game.set_event_flag("blau2votes", game.get_event_flag("blau2votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 3 then
game.set_event_flag("blau3votes", game.get_event_flag("blau3votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 4 then
game.set_event_flag("blau4votes", game.get_event_flag("blau4votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
elseif sel == 5 then
game.set_event_flag("blau5votes", game.get_event_flag("blau5votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gewählt", 1)
end
end
else
say("Du hast Bereits gewählt")
say("Komme erneut zu den nächsten Wahlen")
end
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
end
end
PHP Code:
-- ©Fabian1233 29.April.2013
quest monarch begin
state start begin
when 20011.chat."Ich m�chte meine R�stung" with game.get_event_flag("KaiserRot") == pc.get_vid() and pc.getqf("R�ssi") == 0 begin
say("Hallo "..pc.get_name())
say("Herzlichen Gl�ckwunsch zur neuen R�stung")
say("Ab Jetzt kannst du hier Server Notizen schreiben")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("R�ssi", 1)
end
when 20011.chat."Ich m�chte meine R�stung" with game.get_event_flag("KaiserGelb") == pc.get_vid() and pc.getqf("R�ssi") == 0 begin
say("Hallo "..pc.get_name())
say("Herzlichen Gl�ckwunsch zur neuen R�stung")
say("Ab Jetzt kannst du hier Server Notizen schreiben")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("R�ssi", 1)
end
when 20011.chat."Ich m�chte meine R�stung" with game.get_event_flag("KaiserBlau") == pc.get_vid() and pc.getqf("R�ssi") == 0 begin
say("Hallo "..pc.get_name())
say("Herzlichen Gl�ckwunsch zur neuen R�stung")
say("Ab Jetzt kannst du hier Server Notizen schreiben")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("R�ssi", 1)
end
when 20011.chat."Ich m�chte an alle schreiben" with pc.getqf("R�ssi") == 1 begin
say("Was m�chtest du schreiben?")
notice_all(input())
end
when 20011.chat."Ich m�chte die Kaiserwahl starten" with pc.is_gm() and game.get_event_flag("Monarch") == 0 begin
say("Hallo "..pc.get_name())
say("M�chtest du die Kaiserwahl starten?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
notice_all("Die Kaiserwahl hat begonnen")
server_timer("Wahl", 1*60)
game.set_event_flag("rot1", 0)
game.set_event_flag("rot2", 0)
game.set_event_flag("rot3", 0)
game.set_event_flag("rot4", 0)
game.set_event_flag("rot5", 0)
game.set_event_flag("blau1", 0)
game.set_event_flag("blau2", 0)
game.set_event_flag("blau3", 0)
game.set_event_flag("blau4", 0)
game.set_event_flag("blau5", 0)
game.set_event_flag("gelb1", 0)
game.set_event_flag("gelb2", 0)
game.set_event_flag("gelb3", 0)
game.set_event_flag("gelb4", 0)
game.set_event_flag("gelb5", 0)
game.set_event_flag("rot1votes", 0)
game.set_event_flag("rot2votes", 0)
game.set_event_flag("rot3votes", 0)
game.set_event_flag("rot4votes", 0)
game.set_event_flag("rot5votes", 0)
game.set_event_flag("blau1votes", 0)
game.set_event_flag("blau2votes", 0)
game.set_event_flag("blau3votes", 0)
game.set_event_flag("blau4votes", 0)
game.set_event_flag("blau5votes", 0)
game.set_event_flag("gelb1votes", 0)
game.set_event_flag("gelb2votes", 0)
game.set_event_flag("gelb3votes", 0)
game.set_event_flag("gelb4votes", 0)
game.set_event_flag("gelb5votes", 0)
game.set_event_flag("rotrest", 5)
game.set_event_flag("blaurest", 5)
game.set_event_flag("gelbrest", 5)
say("Das event wurde gestartet")
game.set_event_flag("Monarch", 1)
game.set_event_flag("KaiserRot", 0)
game.set_event_flag("KaiserBlau", 0)
game.set_event_flag("KaiserGelb", 0)
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich m�chte das Abstimmen Beginnen" with pc.is_gm() and game.get_event_flag("Monarch") == 1 begin
say("Hallo "..pc.get_name())
say("M�chtest du die Abstimmung zum ")
say("neuen Kaiser beginnen?")
say("Im Moment sind noch:")
say(game.get_event_flag("rotrest").." Pl�tze im Roten")
say(game.get_event_flag("gelbrest").." Pl�tze im Gelben")
say(game.get_event_flag("blaurest").." Pl�tze im Blauen")
say("Ungenutzt")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
say("Okey die Abstimmung wird Begonnen")
game.set_event_flag("Monarch", 2)
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich m�chte den Kaiser ernennen" with pc.is_gm() and game.get_event_flag("Monarch") == 2 begin
say("Hallo "..pc.get_name())
say("M�chtest du die Ernennung des Kaisers starten?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
say("Okey die Wahl wurde Beendet")
say("Die Neuen Kaiser sind: ")
if game.get_event_flag("rot1votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot3votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot1"))
local a = 1
elseif game.get_event_flag("rot2votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot3votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot2"))
local a = 2
elseif game.get_event_flag("rot3votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot3"))
local a = 3
elseif game.get_event_flag("rot4votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot4"))
local a = 4
elseif game.get_event_flag("rot5votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") and game.get_event_flag("rot5votes") > game.get_event_flag("rot1votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot5"))
local a = 5
end
if game.get_event_flag("gelb1votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb3votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb1"))
local b = 1
elseif game.get_event_flag("gelb2votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb3votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb2"))
local b = 2
elseif game.get_event_flag("gelb3votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb3"))
local b = 3
elseif game.get_event_flag("gelb4votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb4"))
local b = 4
elseif game.get_event_flag("gelb5votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") and game.get_event_flag("gelb5votes") > game.get_event_flag("gelb1votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb5"))
local b = 5
end
if game.get_event_flag("blau1votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau3votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau1"))
local c = 1
elseif game.get_event_flag("blau2votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau3votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau2"))
local c = 2
elseif game.get_event_flag("blau3votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau3"))
local c = 3
elseif game.get_event_flag("blau4votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau4"))
local c = 4
elseif game.get_event_flag("blau5votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") and game.get_event_flag("blau5votes") > game.get_event_flag("blau1votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau5"))
local c = 5
end
say("Rotes Reich: Liste "..a)
say("Gelbes Reich: Liste "..b)
say("Blaues Reich: Liste "..c)
wait()
notice_all("Die Gewinner der Kaiserwahl stehen fest:")
notice_all("Rotes Reich: Liste "..a)
notice_all("Gelbes Reich: Liste "..b)
notice_all("Blaues Reich: Liste "..c)
game.set_event_flag("Monarch", 0)
elseif sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich m�chte die Kaiserwahl Beenden" with pc.is_gm() and game.get_event_flag("Monarch") != 0 begin
say("Hallo "..pc.get_name())
say("M�chtest du die Kaiserwahl beenden?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
say("Okey die Wahl wurde Beendet")
game.set_event_flag("Monarch", 0)
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when letter with game.get_event_flag("Monarch") == 1 begin
send_letter("Die Kaiserwahl hat begonnen!")
end
when info or button with game.get_event_flag("Monarch") == 1 begin
pc.remove_item(11971, 1)
pc.remove_item(11972, 1)
pc.remove_item(11973, 1)
pc.remove_item(11974, 1)
say("Hallo "..pc.get_name())
say("Hier auf dem Server hat jeder die Wahl")
say("Sich zum Kaiser machen zu lassen")
say("Das hat einige Vorteile")
say("Allerdings k�nnen sich nur 5 Spieler")
say("Pro Reich aufstellen lassen")
say("Wenn du Teilnehmen m�chtest gehe zu Uriel")
pc.setqf("Gew�hlt", 0)
pc.setqf("R�ssi", 0)
if pc.get_level() > 99 then
say_reward("Du hast das Erforderliche Level zum Teilnehmen")
else
say_reward("Du must zum Teilnehmen noch ".. 100 - pc.get_level() .." Level aufsteigen")
end
end
when letter with game.get_event_flag("Monarch") == 2 begin
send_letter("Die Kaiserwahl hat begonnen!")
end
when info or button with game.get_event_flag("Monarch") == 2 begin
say("Hallo "..pc.get_name())
say("Hier auf dem Server hat jeder die Wahl")
say("Sich zum Kaiser machen zu lassen")
say("Das hat einige Vorteile")
say("Allerdings k�nnen sich nur 5 Spieler")
say("Pro Reich aufstellen lassen")
say("Das Aufstellen wurde Bereits Beendet")
say("Du kannst nun Abstimmen")
if pc.get_level() > 49 then
say_reward("Du hast das Erforderliche Level zum Teilnehmen")
else
say_reward("Du must zum Teilnehmen noch ".. 49 - pc.get_level() .." Level aufsteigen")
end
end
when Wahl.timer with game.get_event_flag("Monarch") == 1 begin
server_timer ("Wahl", 1*60)
notice_all("Es sind im Moment "..game.get_event_flag("rotrest").."Pl�tze im Roten Reich zum Bewerben frei")
notice_all("Es sind im Moment "..game.get_event_flag("gelbrest").."Pl�tze im Gelben Reich zum Bewerben frei")
notice_all("Es sind im Moment "..game.get_event_flag("blaurest").."Pl�tze im Blauen Reich zum Bewerben frei")
end
when Wahl.timer with game.get_event_flag("Monarch") == 2 begin
server_timer ("Wahl", 1*60)
notice_all("Das Abstimmen ist im Vollem Gange")
notice_all("Aktueller Stand:")
notice_all("Rot: Liste 1: "..game.get_event_flag("rot1votes").."Stimmen. Liste2: "..game.get_event_flag("rot2votes").."Stimmen. Liste3: "..game.get_event_flag("rot3votes").."Stimmen. Liste4: "..game.get_event_flag("rot5votes").."Stimmen. Liste5: "..game.get_event_flag("rot5votes").."Stimmen.")
notice_all("Gelb: Liste 1: "..game.get_event_flag("gelb1votes").."Stimmen. Liste2: "..game.get_event_flag("gelb2votes").."Stimmen. Liste3: "..game.get_event_flag("gelb3votes").."Stimmen. Liste4: "..game.get_event_flag("gelb5votes").."Stimmen. Liste5: "..game.get_event_flag("gelb5votes").."Stimmen.")
notice_all("Blau: Liste 1: "..game.get_event_flag("blau1votes").."Stimmen. Liste2: "..game.get_event_flag("blau2votes").."Stimmen. Liste3: "..game.get_event_flag("blau3votes").."Stimmen. Liste4: "..game.get_event_flag("blau5votes").."Stimmen. Liste5: "..game.get_event_flag("blau5votes").."Stimmen.")
end
when 20011.chat."Ich m�chte mich als Kaiser Bewerben" with pc.get_level() > 99 and game.get_event_flag("Monarch") == 1 begin
say("Du willst dich also zum Kaiser aufstellen lassen?")
local sel = select("Ja ich will", "Nein noch nicht")
if sel == 1 then
if pc.get_empire() == 1 then
if game.get_event_flag("rotrest") > 0 then
if game.get_event_flag("rotrest") == 5 then
game.set_event_flag("rot1", pc.get_vid())
local a = 1
elseif game.get_event_flag("rotrest") == 4 then
game.set_event_flag("rot2", pc.get_vid())
local a = 2
elseif game.get_event_flag("rotrest") == 3 then
game.set_event_flag("rot3", pc.get_vid())
local a = 3
elseif game.get_event_flag("rotrest") == 2 then
game.set_event_flag("rot4", pc.get_vid())
local a = 4
elseif game.get_event_flag("rotrest") == 1 then
game.set_event_flag("rot5", pc.get_vid())
local a = 5
end
game.set_event_flag("rotrest", game.get_event_flag("rotrest") - 1)
say("Du hast dich Erfolgreich eingetragen")
notice_all("Der Spieler "..pc.get_name().." hat sich an "..a.."ter Stelle im Roten Reich eingetragen")
else
say("Tut mir leid aber es sind keine Pl�tze mehr frei")
end
elseif pc.get_empire() == 2 then
if game.get_event_flag("gelbrest") > 0 then
if game.get_event_flag("gelbrest") == 5 then
game.set_event_flag("gelb1", pc.get_vid())
local a = 1
elseif game.get_event_flag("gelbrest") == 4 then
game.set_event_flag("gelb2", pc.get_vid())
local a = 2
elseif game.get_event_flag("gelbrest") == 3 then
game.set_event_flag("gelb3", pc.get_vid())
local a = 3
elseif game.get_event_flag("gelbrest") == 2 then
game.set_event_flag("gelb4", pc.get_vid())
local a = 4
elseif game.get_event_flag("gelbrest") == 1 then
game.set_event_flag("gelb5", pc.get_vid())
local a = 5
end
game.set_event_flag("gelbrest", game.get_event_flag("gelbrest") - 1)
say("Du hast dich Erfolgreich eingetragen")
notice_all("Der Spieler "..pc.get_name().." hat sich an "..a.."ter Stelle im Gelben Reich eingetragen")
else
say("Tut mir leid aber es sind keine Pl�tze mehr frei")
end
elseif pc.get_empire() == 3 then
if game.get_event_flag("blaurest") > 0 then
if game.get_event_flag("blaurest") == 5 then
game.set_event_flag("blau1", pc.get_vid())
local a = 1
elseif game.get_event_flag("blaurest") == 4 then
game.set_event_flag("blau2", pc.get_vid())
local a = 2
elseif game.get_event_flag("blaurest") == 3 then
game.set_event_flag("blau3", pc.get_vid())
local a = 3
elseif game.get_event_flag("blaurest") == 2 then
game.set_event_flag("blau4", pc.get_vid())
local a = 4
elseif game.get_event_flag("blaurest") == 1 then
game.set_event_flag("blau5", pc.get_vid())
local a = 5
end
game.set_event_flag("blaurest", game.get_event_flag("blaurest") - 1)
say("Du hast dich Erfolgreich eingetragen")
notice_all("Der Spieler "..pc.get_name().." hat sich an "..a.."ter Stelle im blauen Reich eingetragen")
else
say("Tut mir leid aber es sind keine Pl�tze mehr frei")
end
end
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
when 20011.chat."Ich m�chte an der Abstimmung Teilnehmen" with game.get_event_flag("Monarch") == 2 and pc.get_level() > 49 begin
say("Du hast bestimmt schon in den Chats")
say("Geh�rt das jeder Spieler eine Nummer hab")
say("So wollen wir willk�hrwahlen Verhindern")
say("Entscheide dich gut wen du w�hlen m�chtest")
say("Willst du Fortfahren")
local sel = select("Fortfahren", "Abbrechen")
if sel == 1 then
if pc.getqf("Gew�hlt") == 0 then
if pc.get_empire() == 1 then
local sel = select("Liste 1","Liste 2","Liste 3","Liste 4","Liste 5", locale.cancel)
if sel == 1 then
game.set_event_flag("rot1votes", game.get_event_flag("rot1votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 2 then
game.set_event_flag("rot2votes", game.get_event_flag("rot2votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 3 then
game.set_event_flag("rot3votes", game.get_event_flag("rot3votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 4 then
game.set_event_flag("rot4votes", game.get_event_flag("rot4votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 5 then
game.set_event_flag("rot5votes", game.get_event_flag("rot5votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
end
elseif pc.get_empire() == 2 then
local sel = select("Liste 1","Liste 2","Liste 3","Liste 4","Liste 5", locale.cancel)
if sel == 1 then
game.set_event_flag("gelb1votes", game.get_event_flag("gelb1votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 2 then
game.set_event_flag("gelb2votes", game.get_event_flag("gelb2votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 3 then
game.set_event_flag("gelb3votes", game.get_event_flag("gelb3votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 4 then
game.set_event_flag("gelb4votes", game.get_event_flag("gelb4votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 5 then
game.set_event_flag("gelb5votes", game.get_event_flag("gelb5votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
end
elseif pc.get_empire() == 3 then
local sel = select("Liste 1","Liste 2","Liste 3","Liste 4","Liste 5", locale.cancel)
if sel == 1 then
game.set_event_flag("blau1votes", game.get_event_flag("blau1votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 2 then
game.set_event_flag("blau2votes", game.get_event_flag("blau2votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 3 then
game.set_event_flag("blau3votes", game.get_event_flag("blau3votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 4 then
game.set_event_flag("blau4votes", game.get_event_flag("blau4votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
elseif sel == 5 then
game.set_event_flag("blau5votes", game.get_event_flag("blau5votes") + 1)
say("Erfolgreich Abgestimmt")
pc.setqf("Gew�hlt", 1)
end
end
else
say("Du hast Bereits gew�hlt")
say("Komme erneut zu den n�chsten Wahlen")
end
end
if sel == 2 then
say("Vielleicht ein anderes mal")
return
end
end
end
end
PHP Code:
-- ©Fabian1233 29.April.2013
quest monarch begin
state start begin
when 20011.chat."I want my armour" with game.get_event_flag("KaiserRot") == pc.get_vid() and pc.getqf("R�ssi") == 0 begin
say("Hello "..pc.get_name())
say("Congratulations for your new armour")
say("Since now you may write Server notices")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("R�ssi", 1)
end
when 20011.chat."I want my armour" with game.get_event_flag("KaiserGelb") == pc.get_vid() and pc.getqf("R�ssi") == 0 begin
say("Hello "..pc.get_name())
say("Congratulations for your new armour")
say("Since now you may write Server notices")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("R�ssi", 1)
end
when 20011.chat."I want my armour" with game.get_event_flag("KaiserBlau") == pc.get_vid() and pc.getqf("R�ssi") == 0 begin
say("Hello "..pc.get_name())
say("Congratulations for your new armour")
say("Since now you may write Server notices")
pc.give_item2(11971, 1)
pc.give_item2(11972, 1)
pc.give_item2(11973, 1)
pc.give_item2(11974, 1)
pc.setqf("R�ssi", 1)
end
when 20011.chat."I want to write to everyone" with pc.getqf("R�ssi") == 1 begin
say("What do u want to write?")
notice_all(input())
end
when 20011.chat."I want to start Monarch elevation" with pc.is_gm() and game.get_event_flag("Monarch") == 0 begin
say("Hello "..pc.get_name())
say("Do u want to start Monarch elevation?")
local sel = select("Yes I want", "Not now")
if sel == 1 then
notice_all("The Monarch elevation has started")
server_timer("Wahl", 1*60)
game.set_event_flag("rot1", 0)
game.set_event_flag("rot2", 0)
game.set_event_flag("rot3", 0)
game.set_event_flag("rot4", 0)
game.set_event_flag("rot5", 0)
game.set_event_flag("blau1", 0)
game.set_event_flag("blau2", 0)
game.set_event_flag("blau3", 0)
game.set_event_flag("blau4", 0)
game.set_event_flag("blau5", 0)
game.set_event_flag("gelb1", 0)
game.set_event_flag("gelb2", 0)
game.set_event_flag("gelb3", 0)
game.set_event_flag("gelb4", 0)
game.set_event_flag("gelb5", 0)
game.set_event_flag("rot1votes", 0)
game.set_event_flag("rot2votes", 0)
game.set_event_flag("rot3votes", 0)
game.set_event_flag("rot4votes", 0)
game.set_event_flag("rot5votes", 0)
game.set_event_flag("blau1votes", 0)
game.set_event_flag("blau2votes", 0)
game.set_event_flag("blau3votes", 0)
game.set_event_flag("blau4votes", 0)
game.set_event_flag("blau5votes", 0)
game.set_event_flag("gelb1votes", 0)
game.set_event_flag("gelb2votes", 0)
game.set_event_flag("gelb3votes", 0)
game.set_event_flag("gelb4votes", 0)
game.set_event_flag("gelb5votes", 0)
game.set_event_flag("rotrest", 5)
game.set_event_flag("blaurest", 5)
game.set_event_flag("gelbrest", 5)
say("The event has been started")
game.set_event_flag("Monarch", 1)
game.set_event_flag("KaiserRot", 0)
game.set_event_flag("KaiserBlau", 0)
game.set_event_flag("KaiserGelb", 0)
end
if sel == 2 then
say("Maybe later")
return
end
end
when 20011.chat."I want to start the agreement" with pc.is_gm() and game.get_event_flag("Monarch") == 1 begin
say("Hello "..pc.get_name())
say("Do you want to start the")
say("Agreement for the next Monarch?")
say("At the moment there are:")
say(game.get_event_flag("rotrest").." places in red")
say(game.get_event_flag("gelbrest").." places in yellow")
say(game.get_event_flag("blaurest").." places in blue")
say("available")
local sel = select("Yes I want", "Not now")
if sel == 1 then
say("Okey the agreement has started")
game.set_event_flag("Monarch", 2)
end
if sel == 2 then
say("Maybe later")
return
end
end
when 20011.chat."I want to select Monarch" with pc.is_gm() and game.get_event_flag("Monarch") == 2 begin
say("Hello "..pc.get_name())
say("Do u want to select new Monarch?")
local sel = select("Yes I want", "Not now")
if sel == 1 then
say("Okey the agreement has been closed")
say("Die Neuen Kaiser sind: ")
if game.get_event_flag("rot1votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot3votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot1votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot1"))
local a = 1
elseif game.get_event_flag("rot2votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot3votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot2votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot2"))
local a = 2
elseif game.get_event_flag("rot3votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot4votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot3"))
local a = 3
elseif game.get_event_flag("rot4votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot1votes") and game.get_event_flag("rot4votes") > game.get_event_flag("rot5votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot4"))
local a = 4
elseif game.get_event_flag("rot5votes") > game.get_event_flag("rot2votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") and game.get_event_flag("rot3votes") > game.get_event_flag("rot5votes") and game.get_event_flag("rot5votes") > game.get_event_flag("rot1votes") then
game.set_event_flag("KaiserRot", game.get_event_flag("rot5"))
local a = 5
end
if game.get_event_flag("gelb1votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb3votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb1votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb1"))
local b = 1
elseif game.get_event_flag("gelb2votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb3votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb2votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb2"))
local b = 2
elseif game.get_event_flag("gelb3votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb4votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb3"))
local b = 3
elseif game.get_event_flag("gelb4votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb1votes") and game.get_event_flag("gelb4votes") > game.get_event_flag("gelb5votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb4"))
local b = 4
elseif game.get_event_flag("gelb5votes") > game.get_event_flag("gelb2votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") and game.get_event_flag("gelb3votes") > game.get_event_flag("gelb5votes") and game.get_event_flag("gelb5votes") > game.get_event_flag("gelb1votes") then
game.set_event_flag("KaiserGelb", game.get_event_flag("gelb5"))
local b = 5
end
if game.get_event_flag("blau1votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau3votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau1votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau1"))
local c = 1
elseif game.get_event_flag("blau2votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau3votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau2votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau2"))
local c = 2
elseif game.get_event_flag("blau3votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau4votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau3"))
local c = 3
elseif game.get_event_flag("blau4votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau1votes") and game.get_event_flag("blau4votes") > game.get_event_flag("blau5votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau4"))
local c = 4
elseif game.get_event_flag("blau5votes") > game.get_event_flag("blau2votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") and game.get_event_flag("blau3votes") > game.get_event_flag("blau5votes") and game.get_event_flag("blau5votes") > game.get_event_flag("blau1votes") then
game.set_event_flag("KaiserBlau", game.get_event_flag("blau5"))
local c = 5
end
say("Red country: list "..a)
say("Yellow country: list "..b)
say("Blue country: list "..c)
wait()
notice_all("The winners of the Monarch elevation are:")
notice_all("Red country: list "..a)
notice_all("Yellow country: list "..b)
notice_all("Blue country: list "..c)
game.set_event_flag("Monarch", 0)
elseif sel == 2 then
say("Maybe later")
return
end
end
when 20011.chat."I want to stop Monarch elevatiin" with pc.is_gm() and game.get_event_flag("Monarch") != 0 begin
say("Hello "..pc.get_name())
say("Do u want to stop Monarch elevation?")
local sel = select("Yes I want", "Not now")
if sel == 1 then
say("Okey the elevation has been stopped")
game.set_event_flag("Monarch", 0)
end
if sel == 2 then
say("Maybe later")
return
end
end
when letter with game.get_event_flag("Monarch") == 1 begin
send_letter("The Monarch elevation has started")
end
when info or button with game.get_event_flag("Monarch") == 1 begin
pc.remove_item(11971, 1)
pc.remove_item(11972, 1)
pc.remove_item(11973, 1)
pc.remove_item(11974, 1)
say("Hello "..pc.get_name())
say("This server has an Monarch selection")
say("Being Monarch has a lot of benefits")
say("But there could only be 5 Monarchs")
say("each country for selection")
say("If u want to take a part go to Uriel")
pc.setqf("Gew�hlt", 0)
pc.setqf("R�ssi", 0)
if pc.get_level() > 99 then
say_reward("U have the requimed level to take a part")
else
say_reward("U need to get ".. 100 - pc.get_level() .." levelups before take a part")
end
end
when letter with game.get_event_flag("Monarch") == 2 begin
send_letter("The Monarch elevation has started!")
end
when info or button with game.get_event_flag("Monarch") == 2 begin
say("Hello "..pc.get_name())
say("This server has an Monarch selection")
say("Being Monarch has a lot of benefits")
say("But there could only be 5 Monarchs")
say("each country for selection")
say("You could vote now")
if pc.get_level() > 49 then
say_reward("U have the requimed level to take a part")
else
say_reward("U need to get ".. 50 - pc.get_level() .." levelups before take a part")
end
end
when Wahl.timer with game.get_event_flag("Monarch") == 1 begin
server_timer ("Wahl", 1*60)
notice_all("There are at the moment "..game.get_event_flag("rotrest").."places in red available")
notice_all("There are at the moment "..game.get_event_flag("gelbrest").."places in yellow available")
notice_all("There are at the moment "..game.get_event_flag("blaurest").."places in blue available")
end
when Wahl.timer with game.get_event_flag("Monarch") == 2 begin
server_timer ("Wahl", 1*60)
notice_all("Das Abstimmen ist im Vollem Gange")
notice_all("Aktueller Stand:")
notice_all("Red: list 1: "..game.get_event_flag("rot1votes").."votes. list2: "..game.get_event_flag("rot2votes").."votes. list3: "..game.get_event_flag("rot3votes").."votes. list4: "..game.get_event_flag("rot5votes").."votes. list5: "..game.get_event_flag("rot5votes").."votes.")
notice_all("Yellow: list 1: "..game.get_event_flag("gelb1votes").."votes. list2: "..game.get_event_flag("gelb2votes").."votes. list3: "..game.get_event_flag("gelb3votes").."votes. list4: "..game.get_event_flag("gelb5votes").."votes. list5: "..game.get_event_flag("gelb5votes").."votes.")
notice_all("Blue: list 1: "..game.get_event_flag("blau1votes").."votes. list2: "..game.get_event_flag("blau2votes").."votes. list3: "..game.get_event_flag("blau3votes").."votes. list4: "..game.get_event_flag("blau5votes").."votes. list5: "..game.get_event_flag("blau5votes").."votes.")
end
when 20011.chat."I want to get Monarch" with pc.get_level() > 99 and game.get_event_flag("Monarch") == 1 begin
say("Do you want to be Monarch??")
local sel = select("Yes I want", "Not now")
if sel == 1 then
if pc.get_empire() == 1 then
if game.get_event_flag("rotrest") > 0 then
if game.get_event_flag("rotrest") == 5 then
game.set_event_flag("rot1", pc.get_vid())
local a = 1
elseif game.get_event_flag("rotrest") == 4 then
game.set_event_flag("rot2", pc.get_vid())
local a = 2
elseif game.get_event_flag("rotrest") == 3 then
game.set_event_flag("rot3", pc.get_vid())
local a = 3
elseif game.get_event_flag("rotrest") == 2 then
game.set_event_flag("rot4", pc.get_vid())
local a = 4
elseif game.get_event_flag("rotrest") == 1 then
game.set_event_flag("rot5", pc.get_vid())
local a = 5
end
game.set_event_flag("rotrest", game.get_event_flag("rotrest") - 1)
say("You have succesfully take a part")
notice_all("The player "..pc.get_name().." has take a part at "..a..". place")
else
say("I'm sorry but there arn't anymore slotes")
end
elseif pc.get_empire() == 2 then
if game.get_event_flag("gelbrest") > 0 then
if game.get_event_flag("gelbrest") == 5 then
game.set_event_flag("gelb1", pc.get_vid())
local a = 1
elseif game.get_event_flag("gelbrest") == 4 then
game.set_event_flag("gelb2", pc.get_vid())
local a = 2
elseif game.get_event_flag("gelbrest") == 3 then
game.set_event_flag("gelb3", pc.get_vid())
local a = 3
elseif game.get_event_flag("gelbrest") == 2 then
game.set_event_flag("gelb4", pc.get_vid())
local a = 4
elseif game.get_event_flag("gelbrest") == 1 then
game.set_event_flag("gelb5", pc.get_vid())
local a = 5
end
game.set_event_flag("gelbrest", game.get_event_flag("gelbrest") - 1)
say("You have succesfully take a part")
notice_all("The player "..pc.get_name().." has take a part at "..a..". place")
else
say("I'm sorry but there arn't anymore slotes")
end
elseif pc.get_empire() == 3 then
if game.get_event_flag("blaurest") > 0 then
if game.get_event_flag("blaurest") == 5 then
game.set_event_flag("blau1", pc.get_vid())
local a = 1
elseif game.get_event_flag("blaurest") == 4 then
game.set_event_flag("blau2", pc.get_vid())
local a = 2
elseif game.get_event_flag("blaurest") == 3 then
game.set_event_flag("blau3", pc.get_vid())
local a = 3
elseif game.get_event_flag("blaurest") == 2 then
game.set_event_flag("blau4", pc.get_vid())
local a = 4
elseif game.get_event_flag("blaurest") == 1 then
game.set_event_flag("blau5", pc.get_vid())
local a = 5
end
game.set_event_flag("blaurest", game.get_event_flag("blaurest") - 1)
say("You have succesfully take a part")
notice_all("The player "..pc.get_name().." has take a part at "..a..". place")
else
say("I'm sorry but there arn't anymore slotes")
end
end
end
if sel == 2 then
say("Maybe later")
return
end
end
when 20011.chat."I want to vote" with game.get_event_flag("Monarch") == 2 and pc.get_level() > 49 begin
say("Select who you want to vote for")
say("Do you want to continue")
local sel = select("Continue", "Stop")
if sel == 1 then
if pc.getqf("Gew�hlt") == 0 then
if pc.get_empire() == 1 then
local sel = select("list 1","list 2","list 3","list 4","list 5", locale.cancel)
if sel == 1 then
game.set_event_flag("rot1votes", game.get_event_flag("rot1votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 2 then
game.set_event_flag("rot2votes", game.get_event_flag("rot2votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 3 then
game.set_event_flag("rot3votes", game.get_event_flag("rot3votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 4 then
game.set_event_flag("rot4votes", game.get_event_flag("rot4votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 5 then
game.set_event_flag("rot5votes", game.get_event_flag("rot5votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
end
elseif pc.get_empire() == 2 then
local sel = select("list 1","list 2","list 3","list 4","list 5", locale.cancel)
if sel == 1 then
game.set_event_flag("gelb1votes", game.get_event_flag("gelb1votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 2 then
game.set_event_flag("gelb2votes", game.get_event_flag("gelb2votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 3 then
game.set_event_flag("gelb3votes", game.get_event_flag("gelb3votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 4 then
game.set_event_flag("gelb4votes", game.get_event_flag("gelb4votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 5 then
game.set_event_flag("gelb5votes", game.get_event_flag("gelb5votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
end
elseif pc.get_empire() == 3 then
local sel = select("list 1","list 2","list 3","list 4","list 5", locale.cancel)
if sel == 1 then
game.set_event_flag("blau1votes", game.get_event_flag("blau1votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 2 then
game.set_event_flag("blau2votes", game.get_event_flag("blau2votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 3 then
game.set_event_flag("blau3votes", game.get_event_flag("blau3votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 4 then
game.set_event_flag("blau4votes", game.get_event_flag("blau4votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
elseif sel == 5 then
game.set_event_flag("blau5votes", game.get_event_flag("blau5votes") + 1)
say("Succesfully voted")
pc.setqf("Gew�hlt", 1)
end
end
else
say("You have already voted")
say("Come again to the next elevation")
end
end
if sel == 2 then
say("Maybe later")
return
end
end
end
end
mein letztes release
Neuste Version steht nicht in anhang sondern in Spoiler
Updates:
V1: Relase
V1.1: Fixes
V1.2: English Version added
V1.3: Fixes
V1.1: Fixes
V1.2: English Version added
V1.3: Fixes