Benötigt: Lua Installation Getestet mit: Lua 5.0 Befehl zum Ausführen: cd /usr/.../quest && lua compile_quests.lua
Screens
Ich habe mal ein kleines Lua-Script geschrieben, um den questcompiler anzusprechen. Verwaltet wird das ganze über die Datei quest_list.lua, welche die Pfade zu den Quests beinhaltet.
Wenn ihr Keys setzt, wie im Beispiel zu sehen, könnt ihr auch einzelne Kategorien compilen, z.B. alle Quests in der Kategorie Biologe.
beachtet hierbei, dass die Keys (z.B. "Biologe", "Biologe1") nichts mit der Ordnerstruktur zu tun haben müssen!
Das Script (compile_quests.lua)
Code:
local qcname = "qc_x64"
local luaquest_list = "quest_list.lua"
--[[
#########################
####### Functions #######
#########################
]]
local println = function(text)
io.write(text.."\n")
end
local function file_exists(name)
return os.rename(name, name)
end
-- ##################################################
-- Check if required files exist
if not file_exists(qcname) then
println("Can't find the qc: "..qcname)
io.flush()
return
elseif not file_exists(luaquest_list) then
println("Can't find the quest_list: "..luaquest_list)
io.flush()
return
end
-- Chekc if required files exist end
-- ##################################################
local function in_list(compare, list)
for _,v in ipairs(list) do
if compare == v then return true end
end
return false
end
local function compile(dir)
println("Compiling: "..dir)
os.execute("./"..qcname.." "..dir)
end
local function compile_tbl(value)
if type(value) == "string" then
compile(value)
return
end
for k,v in pairs(value) do
if type(v) == "table" then
compile_tbl(v)
else
compile(v)
end
end
end
local function compile_all()
os.execute("rm -R object")
compile_tbl(quest_list)
end
--[[
#####################
####### Menus #######
#####################
]]
local function compile_by_directory_menu()
println("")
println("What's the directory of the quest you want to compile?")
io.flush()
local dir = io.read()
if not file_exists(dir) then
local answer = ""
local possible_answers = {"1", "exit"}
repeat
println("")
println("The directory doesnt exist: "..dir)
println(" ("..possible_answers[1]..") new directory")
println(" ("..possible_answers[2]..") exit")
io.flush()
answer = io.read()
until in_list(answer, possible_answers)
if answer == possible_answers[1] then --new directory
compile_by_directory_menu()
return
else
return
end
end
compile(dir)
end
local function compile_by_category_menu(srctable)
println("")
println("What's key to the quest(s) you want to compile?")
io.flush()
local key = io.read()
local result = srctable[key]
if not result then
local answer = ""
local possible_answers = {"1", "exit"}
repeat
println("")
println("Can't find a value matching to the key: "..key)
println(" ("..possible_answers[1]..") new key")
println(" ("..possible_answers[2]..") exit")
io.flush()
answer = io.read()
until in_list(answer, possible_answers)
if answer == possible_answers[1] then --new key
compile_by_category_menu(srctable)
return
else
return
end
elseif type(result) == "table" then
local answer = ""
local possible_answers = {"1", "2", "exit"}
repeat
println("")
println("The value matching to your key is a table")
println(" ("..possible_answers[1]..") compile all quests in this category and it's subcategories")
println(" ("..possible_answers[2]..") go deeper (insert subcategory)")
println(" ("..possible_answers[3]..") exit")
io.flush()
answer = io.read()
until in_list(answer, possible_answers)
if answer == possible_answers[1] then --compile all quests in this category
compile_tbl(result)
return
elseif answer == possible_answers[2] then --go deeper
compile_by_category_menu(result)
return
else
return
end
end
compile_tbl(result)
end
local function main_menu()
local answer = ""
local possible_answers = {"1", "2", "3", "exit"}
repeat
println("What do you want to do?")
println(" ("..possible_answers[1]..") Compile all quests")
println(" ("..possible_answers[2]..") Compile quest(s) by key")
println(" ("..possible_answers[3]..") Compile quest by directory")
println(" ("..possible_answers[4]..") exit")
io.flush()
answer = io.read()
until in_list(answer, possible_answers)
if answer == possible_answers[1] then --compile all quests
compile_all()
elseif answer == possible_answers[2] then --compile all quests by category
compile_by_category_menu(quest_list)
elseif answer == possible_answers[3] then --compile quest by directory
compile_by_directory_menu()
else
return
end
end
--[[
############################
####### Calling menu #######
############################
]]
dofile(luaquest_list)
main_menu()
Ich muss ehrlich gesagt sagen, dass ich den Sinn daran nicht ganz verstehe :/
Du kannst deine Quests in der quest_list in Kategorien unterteilen und diese Kategorien einzeln compilen.
Beispiel:
Du hast eine Änderung an einer Funktion gemacht, die nur Dungeons betrifft, und möchtest nicht alle Quests neu compilen sondern nur die Dungeons.
Dann machst du eine Kategorie mit "Dungeons" und schreibst dort alle Verweise zu Dungone-Quests rein und kannst mit dem Script alle Quests aus der Kategorie compilen lassen.
@Sensi schönes Release. Da ich mich mit Lua nicht grade auskenne, könntest du das Script auch ohne Menü zur verfügung stellen, dass einfach alle Quest einmal kompiliert werden?
@Sensi schönes Release. Da ich mich mit Lua nicht grade auskenne, könntest du das Script auch ohne Menü zur verfügung stellen, dass einfach alle Quest einmal kompiliert werden?
einfach ganz unten main_menu() durch compile_all() ersetzen
[Release][GC PH] Script and Char script 10/22/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 27 Replies Here's the Script and Char_script with yellow lines hope it helped paki crch2 na lang po kasi na delete ko ung crch2 ko if any problems paki post na lang agad
Credits to :handsdown::handsdown:Brian~ and Craymel:handsdown::handsdown:
Btw... pang range po yan pede rin ung jump attack(Down) ng Dk,ragna bolt,block attack ng Ak,jump attack ng lass ung iba ko pang d nsabi paki banggit na rin