Fehler:Quote:
versuch's mal so, hab's ein wenig verbessert
PHP Code:-- ##############################
-- ##### #####
-- # For Server: EOS2 #
-- # Copyright by DJB 2013. #
-- ##### #####
-- ##############################
quest userpanel begin
state start begin
function main_menu()
local pcname = pc.get_name()
local allowed = {"[SA]ViCi"}
local auswahl={"Teleportieren", "Lager öffnen", "GM-Online Liste", "Informationen", "GM-Panel"}
for i = 1, table.getn(allowed) do
if pcname == allowed[i] then
check = (pcname == allowed[i])
table.remove(auswahl,table.getn(auswahl))
end
end
table.insert(auswahl,'Schließen')
say_title("Userpanel")
say("")
local sel = select_table(auswahl)
if sel == 1 then
userpanel.teleport()
elseif sel == 2 then
userpanel.save_box()
elseif sel == 3 then
cmdchat("ShowGMOnline")
elseif sel == 4 then
userpanel.info()
elseif sel == 5 and check then
userpanel.gm()
elseif sel == table.getn(auswahl) then
return
end
end
function teleport()
local warps = {"Map 1", "Map 2", "Orktal (Mitte)", "Eisland (Mitte)", "Spinnendungeon 1 (Ende)"}
local koord = {
{-- Map 1
{x,y}, -- rot
{x,y}, -- gelb
{x,y}, -- blau
},
{-- Map 2
{x,y}, -- rot
{x,y}, -- gelb
{x,y}, -- blau
},
{--Orktal
{x,y}, -- rot
{x,y}, -- gelb
{x,y}, -- blau
},
{-- Eisland
{x,y}, -- rot
{x,y}, -- gelb
{x,y}, -- blau
},
{-- SD1
{x,y}, -- rot
{x,y}, -- gelb
{x,y}, -- blau
},
}
say_title("Userpanel -> Teleportieren")
say("")
table.insert(warps,"Zurück zum Hauptmenü")
local sel = select_table(warps)
if sel == table.getn(sel) then
userpanel.main_menu()
else
pc.warp(koord[sel][pc.get_empire()][1], koord[sel][pc.get_empire()][2])
end
end
function save_box()
if pc.get_map_index() == 214 then
say_title("Userpanel - Warnung")
say("")
say("Auf dieser Map kannst du das Lager nicht[ENTER]öffnen.")
if select("Zurück", "Schließen") == 2 then return end
userpanel.main_menu()
else
game.open_safebox()
end
end
function info()
local infos = {
[1] = {"PLATZHALTER[ENTER]PLATZHALTER"},
[2] = {"PLATZHALTER[ENTER]PLATZHALTER"},
[3] = {"PLATZHALTER[ENTER]PLATZHALTER"},
[4] = {"PLATZHALTER[ENTER]PLATZHALTER"},
[5] = {"PLATZHALTER[ENTER]PLATZHALTER"},
}
say_title("Userpanel -> Informationen")
say("")
local tabelle = {"Kategorie 1", "Kategorie 2", "Kategorie 3", "Kategorie 4", "Kategorie 5", "Zurück zum Hauptmenü","Schließen"}
local sel = select_table(tabelle)
if sel == table.getn(tabelle) then
return
elseif sel <= 5 then
say_title("Informationen -> Kategorie "..sel)
say("")
say(string.format("%s", infos[sel]))
else
userpanel.main_menu()
end
end
function gm()
say_title("GM-Panel")
say_gold("Du bist im GM-Panel *-*")
local sel = select("Rates einstellen", "Zurück", "Schließen")
if sel == 1 then
say_title("Rates")
say("")
say("Reich?")
local sel = select("Alle", "Rotes Reich", "Gelbes Reich", "Blaues Reich", "Abbrechen")
if sel == 5 then return end
say_title("Rates")
say("")
say("Höhe (in Prozent):")
local inp = input()
if inp == "" or inp == nil then return end
say_title("Rates")
say("")
say("Zeit (in Stunden):")
local inp2 = input()
if inp == "" or inp == nil then return end
local wert = sel-1
command("priv_empire "..wert.." 1 "..inp.." "..inp2)
command("priv_empire "..wert.." 2 "..inp.." "..inp2)
command("priv_empire "..wert.." 4 "..inp.." "..inp2)
elseif sel == 2 then
userpanel.main_menu()
elseif sel == 3 then
return
end
end
when 91125.use begin
userpanel.main_menu()
end
end
end
Code:
userpanel.quest:146:assertion failure : nested==0 Error occured on compile userpanel.quest
MfG