So, habe glaube ich mal einen speziellen Fehler;
Mein Warpring ist trotz allem nicht anklickbar:
-Quest wird compiled
-Code hat soweit ich blöd bin keinen Fehler
-Warpring ist auf Type 18
-Quest_list ist aktuell
-Quest_functions ist alles eingetragen
-Questing.lua ist soweit ich weiß alles eingetragen
-Es werden keine Fehler angezeigt
-Auf anderen Items funktioniert es auch nicht
-Kein anderer gleicher "state ... start" Name belegt
Was nun ? Hier mal die verschiedenen Codes bzw Dateien;
Code: questing.lua
- --[[
- @name TS3-Funktionen
- @author Mijago
- @descr
- Funktionen zum Starten, Stoppen und Neustarten eines TS3 Servers.
- --]]
- proc=proc or {}
- proc.ts3_start = function(path)
- os.execute('cd '..path..' && sh ts3server_startscript.sh start')
- end
- proc.ts3_stop = function(path)
- os.execute('cd '..path..' && sh ts3server_startscript.sh stop')
- end
- proc.ts3_restart = function(path)
- os.execute('cd '..path..' && sh ts3server_startscript.sh restart')
- end
- function warp(tbl)
- local level = pc.get_level()
- if tbl.minlevel and level < tbl.minlevel then
- say("Dein Level ist zu niedrig, um diese Map zu betreten.")
- say("Minimal Level: "..tbl.minlevel)
- select("Abbrechen")
- return
- elseif tbl.maxlevel and level > tbl.maxlevel then
- say("Dein Level ist zu hoch, um diese Map zu betreten.")
- say("Maximal Level: "..tbl.maxlevel)
- select("Abbrechen")
- return
- end
- while not pc.can_warp() do
- say("Du kannst dich noch nicht teleportieren, da du in")
- say("den letzten 10 Sekunden gehandelt hast.")
- if select("Erneut versuchen", "Abbrechen") == 2 then return end
- end
- local warpneedstrings = warpring.get_warpneedstrings(tbl)
- if table.getn(warpneedstrings) > 0 then
- say("Um diese Map zu betreten benötigst du folgende")
- say("Dinge:")
- for _,v in ipairs(warpneedstrings) do
- say(v)
- end
- say("")
- say("Möchtest du trotzdem fortfahren?")
- if select("Teleportieren", "Abbrechen") == 2 then return end
- end
- if not warpring.check_and_remove_warpneeds(tbl) then
- say("Dir fehlt mindestens eins der benötigten Dinge.")
- select("Abbrechen")
- return
- end
- pc.warp(tbl.koord[1], tbl.koord[2])
- end
- function get_warpneedstrings(tbl)
- local warpneeds = {}
- if tbl.itemneed and table.getn(tbl.itemneed) > 0 then
- for _,v in ipairs(tbl.itemneed) do
- table.insert(warpneeds, "- "..v[2].."x "..item_name(v[1]))
- end
- end
- if tbl.goldneed and tbl.goldneed > 0 then
- table.insert(warpneeds, "- "..tbl.goldneed.." Yang")
- end
- return warpneeds
- end
- function check_warpneeds(tbl)
- if tbl.itemneed and table.getn(tbl.itemneed) > 0 then
- for _,v in ipairs(tbl.itemneed) do
- if pc.count_item(v[1]) < v[2] then
- return false
- end
- end
- end
- if tbl.goldneed and tbl.goldneed > 0 then
- if pc.get_gold() < tbl.goldneed then
- return false
- end
- end
- return true
- end
- function remove_warpneeds(tbl)
- if tbl.itemneed and table.getn(tbl.itemneed) > 0 then
- for _,v in ipairs(tbl.itemneed) do
- pc.remove_item(v[1], v[2])
- end
- end
- if tbl.goldneed and tbl.goldneed > 0 then
- pc.change_gold(-tbl.goldneed)
- end
- end
- function check_and_remove_warpneeds(tbl)
- if not warpring.check_warpneeds(tbl) then
- return false
- end
- warpring.remove_warpneeds(tbl)
- return true
- end
- function get_warpnames(tbl)
- local level = pc.get_level()
- local names = {}
- for _,v in ipairs(tbl) do
- if v.minlevel and level < v.minlevel then
- v.name = v.name.." (ab Lv. "..v.minlevel..")"
- elseif v.maxlevel and level > v.maxlevel then
- v.name = v.name.." (bis Lv. "..v.maxlevel..")"
- end
- table.insert(names, v.name)
- end
- return names
- end
- function showwarps(tbl)
- local warpnames = warpring.get_warpnames(tbl)
- local s = tbl[select3(warpnames)] or false
- if not s then return end
- if s.koord then
- warpring.warp(s)
- return
- end
- warpring.showwarps(s)
- end
Code
- quest neunuenue begin
- state start begin
- when 70007.use begin
- local warp = {
- {--Map1
- name = "Map 1",
- {--Rotes Reich
- name = "Rotes Reich",
- koord = {965784, 275242},
- minlevel = 50,
- maxlevel = 80,
- goldneed = 10000
- },
- {--Gelbes Reich
- name = "Gelbes Reich",
- koord = {965784, 275242},
- minlevel = 10,
- maxlevel = 105,
- goldneed = 10000
- },
- {--Blaues Reich
- name = "Blaues Reich",
- koord = {965784, 275242},
- minlevel = 1,
- maxlevel = 105,
- goldneed = 10000
- },
- },
- {--Map2
- name = "Map 2",
- {--Rotes Reich
- name = "Rotes Reich",
- koord = {965784, 275242},
- minlevel = 1,
- maxlevel = 105,
- goldneed = 10000
- },
- {--Gelbes Reich
- name = "Gelbes Reich",
- koord = {965784, 275242},
- minlevel = 1,
- maxlevel = 105,
- goldneed = 10000
- },
- {--Blaues Reich
- name = "Blaues Reich",
- koord = {965784, 275242},
- minlevel = 1,
- maxlevel = 105,
- goldneed = 10000
- },
- },
- {-- Low-Maps
- name = "Level 1 bis Level 75",
- {
- name = "Orktal",
- koord = {3330, 7464},
- minlevel = 50,
- maxlevel = 80,
- goldneed = 10000
- },
- {
- name = "Wüste",
- koord = {2962, 5475, 1},
- minlevel = 50,
- maxlevel = 105,
- goldneed = 10000
- },
- {
- name = "Eisland",
- koord = {4357, 2141, 1},
- minlevel = 50,
- maxlevel = 80,
- goldneed = 10000
- },
- {
- name = "Feuerland",
- koord = {6005, 6873, 1},
- minlevel = 50,
- maxlevel = 105,
- goldneed = 10000
- },
- {
- name = "Spinnendungeon",
- koord = {920, 5251},
- minlevel = 50,
- maxlevel = 80,
- goldneed = 10000
- },
- {
- name = "Spinnendungeon 2",
- koord = {6656, 4352},
- minlevel = 50,
- maxlevel = 105,
- goldneed = 10000
- },
- {
- name = "Lungsam",
- koord = {2909, 58},
- minlevel = 50,
- maxlevel = 90,
- goldneed = 10000
- },
- {
- name = "Roter Wald",
- koord = {11187, 690},
- minlevel = 50,
- maxlevel = 99,
- goldneed = 10000
- },
- },
- {-- High-Maps
- name = "Level 75 bis Level 100+",
- {
- name = "Land der Riesen",
- koord = {8291, 7637},
- minlevel = 50,
- maxlevel = 99,
- goldneed = 10000
- },
- {
- name = "Grotte 1",
- koord = {0, 12032,},
- minlevel = 75,
- maxlevel = 90,
- goldneed = 10000,
- itemneed = {30190, 1}
- },
- {
- name = "Grotte 2",
- koord = {1536, 12032},
- minlevel = 75,
- maxlevel = 100,
- goldneed = 10000,
- itemneed = {30190, 1}
- },
- {
- name = "Nephritenbucht",
- koord = {10496, 15104},
- minlevel = 90,
- maxlevel = 105,
- goldneed = 50000000
- },
- {
- name = "Kap des Drachenfeuers",
- koord = {10240, 16640},
- minlevel = 90,
- maxlevel = 105,
- goldneed = 50000000
- },
- {
- name = "Donnerberge",
- koord = {11264, 15104},
- minlevel = 90,
- maxlevel = 105,
- goldneed = 50000000
- },
- {
- name = "Gautamakliff",
- koord = {11776, 16640},
- minlevel = 90,
- maxlevel = 105,
- goldneed = 50000000
- },
- {
- name = "Spinnendungeon 3",
- koord = {469, 79},
- minlevel = 100,
- maxlevel = 105,
- itemneed = {80007, 1}, {76019, 10}
- },
- },
- {-- Runs
- name = "Dungeons und Run's ab Level 40",
- {
- name = "Dämonenturm",
- koord = {5904, 1109},
- minlevel = 40,
- maxlevel = 105,
- goldneed = 10000
- },
- {
- name = "Devils Catacomb",
- koord = {5913, 994},
- minlevel = 75,
- maxlevel = 105,
- goldneed = 10000000
- },
- {
- name = "Beran Setaou",
- koord = {1809, 12207},
- minlevel = 75,
- maxlevel = 105,
- goldneed = 10000000
- },
- {
- name = "Rotdrachenfestung",
- koord = {6007, 7073},
- minlevel = 100,
- maxlevel = 105
- },
- }
- }
- warpring.showwarps(warp)
- end
- function warp(tbl)
- local level = pc.get_level()
- if tbl.minlevel and level < tbl.minlevel then
- say("Dein Level ist zu niedrig, um diese Map zu betreten.")
- say("Minimal Level: "..tbl.minlevel)
- select("Abbrechen")
- return
- elseif tbl.maxlevel and level > tbl.maxlevel then
- say("Dein Level ist zu hoch, um diese Map zu betreten.")
- say("Maximal Level: "..tbl.maxlevel)
- select("Abbrechen")
- return
- end
- while not pc.can_warp() do
- say("Du kannst dich noch nicht teleportieren, da du in")
- say("den letzten 10 Sekunden gehandelt hast.")
- if select("Erneut versuchen", "Abbrechen") == 2 then return end
- end
- local warpneedstrings = warpring.get_warpneedstrings(tbl)
- if table.getn(warpneedstrings) > 0 then
- say("Um diese Map zu betreten benötigst du folgende")
- say("Dinge:")
- for _,v in ipairs(warpneedstrings) do
- say(v)
- end
- say("")
- say("Möchtest du trotzdem fortfahren?")
- if select("Teleportieren", "Abbrechen") == 2 then return end
- end
- if not warpring.check_and_remove_warpneeds(tbl) then
- say("Dir fehlt mindestens eins der benötigten Dinge.")
- select("Abbrechen")
- return
- end
- pc.warp(tbl.koord[1], tbl.koord[2])
- end
- function get_warpneedstrings(tbl)
- local warpneeds = {}
- if tbl.itemneed and table.getn(tbl.itemneed) > 0 then
- for _,v in ipairs(tbl.itemneed) do
- table.insert(warpneeds, "- "..v[2].."x "..item_name(v[1]))
- end
- end
- if tbl.goldneed and tbl.goldneed > 0 then
- table.insert(warpneeds, "- "..tbl.goldneed.." Yang")
- end
- return warpneeds
- end
- function check_warpneeds(tbl)
- if tbl.itemneed and table.getn(tbl.itemneed) > 0 then
- for _,v in ipairs(tbl.itemneed) do
- if pc.count_item(v[1]) < v[2] then
- return false
- end
- end
- end
- if tbl.goldneed and tbl.goldneed > 0 then
- if pc.get_gold() < tbl.goldneed then
- return false
- end
- end
- return true
- end
- function remove_warpneeds(tbl)
- if tbl.itemneed and table.getn(tbl.itemneed) > 0 then
- for _,v in ipairs(tbl.itemneed) do
- pc.remove_item(v[1], v[2])
- end
- end
- if tbl.goldneed and tbl.goldneed > 0 then
- pc.change_gold(-tbl.goldneed)
- end
- end
- function check_and_remove_warpneeds(tbl)
- if not warpring.check_warpneeds(tbl) then
- return false
- end
- warpring.remove_warpneeds(tbl)
- return true
- end
- function get_warpnames(tbl)
- local level = pc.get_level()
- local names = {}
- for _,v in ipairs(tbl) do
- if v.minlevel and level < v.minlevel then
- v.name = v.name.." (ab Lv. "..v.minlevel..")"
- elseif v.maxlevel and level > v.maxlevel then
- v.name = v.name.." (bis Lv. "..v.maxlevel..")"
- end
- table.insert(names, v.name)
- end
- return names
- end
- function showwarps(tbl)
- local warpnames = warpring.get_warpnames(tbl)
- local s = tbl[select3(warpnames)] or false
- if not s then return end
- if s.koord then
- warpring.warp(s)
- return
- end
- warpring.showwarps(s)
- end
- end
- end
Code
- item2.get_attr
- item2.set_attr
- lines
- os.execute
- pc.get_empty_inventory_count
- string.sub
- table.remove
- write
- bio_quests
- bio_get_current_table
- warpring.warp
- warpring.get_warpneedstrings
- warpring.check_warpneeds
- warpring.remove_warpneeds
- warpring.check_and_remove_warpneeds
- warpring.get_warpnames
- warpring.showwarps
Danke schon mal vorab. Wird zu 90% wieder ein Leichtsinnsfehler sein.