Register for your free account! | Forgot your password?

You last visited: Today at 02:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Questlib-Erweiterung

Discussion on [Release] Questlib-Erweiterung within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old 12/07/2011, 15:20   #31
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Um euch den Spaß zu bieten die Datei zu decompilen
Mijago is offline  
Old 12/07/2011, 15:56   #32
 
elite*gold: 0
Join Date: Oct 2010
Posts: 73
Received Thanks: 2
Quote:
Originally Posted by Mijago View Post
Um euch den Spaß zu bieten die Datei zu decompilen
Verschlüsselt werde ich es aber garantiert nicht hochladen, theoretisch kann da ja alles drin stehen.
Soll nichts gegen dich sein, aber ich wüsste schon gerne was die neuen Funktionen genau machen.

Kannst du bitte noch die dekompilierte Version anhängen?


€: LuaDec gibt den Fehler bad header aus.. xD
Tofus is offline  
Old 12/07/2011, 16:03   #33
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
LuaDec ist für 5.1 oder 5.0.2

Compiled with Lua 5.0.3..
Mijago is offline  
Old 12/07/2011, 16:05   #34
 
elite*gold: 0
Join Date: Oct 2010
Posts: 73
Received Thanks: 2
Gibt's ne andere Möglichkeit?
Tofus is offline  
Old 12/07/2011, 16:58   #35
 
.Nagato's Avatar
 
elite*gold: 1
Join Date: Mar 2011
Posts: 1,473
Received Thanks: 1,382
Hm.. du sagtest ja, dass du hier was pubst, mir aber die Final Version gibst. xD
Also ganz nice.
.Nagato is offline  
Old 12/07/2011, 17:30   #36
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Wenn es überhaupt ne Final version geben wird, mache ja andauernd neues rein xD
Mijago is offline  
Old 12/08/2011, 00:20   #37
 
elite*gold: 0
Join Date: Sep 2009
Posts: 10
Received Thanks: 4
This complicated but at the end of the file throws an error. Is editing the same compiler that you used already finished? This file can have any collateral?
So much I could do.
Sorry for my english I'm from Polish.


@Add my decommpiler
Attached Files
File Type: rar QBA-96.rar (27.9 KB, 46 views)
File Type: rar luadec.rar (61.0 KB, 45 views)
Testerek is offline  
Old 12/08/2011, 09:31   #38
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Quote:
Originally Posted by Testerek View Post
This complicated but at the end of the file throws an error. Is editing the same compiler that you used already finished? This file can have any collateral?
So much I could do.
Sorry for my english I'm from Polish.


@Add my decommpiler
Looks funny
So you can see, There aren't any bad things in it^^
Mijago is offline  
Old 12/08/2011, 11:29   #39
 
xMichiix's Avatar
 
elite*gold: 435
Join Date: Nov 2009
Posts: 602
Received Thanks: 195
hallo,

bei mir kommt wen ich die IS.quest einfügen will "Calls undeclared function"
aber die erweiterung ist eingefügt ....
xMichiix is offline  
Old 12/08/2011, 11:40   #40
 
.Delta's Avatar
 
elite*gold: 26
Join Date: Mar 2010
Posts: 3,765
Received Thanks: 2,661
hast du denn auch die functionen in die quest_functions eingetragen?
.Delta is offline  
Thanks
1 User
Old 12/08/2011, 12:05   #41

 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,471
Received Thanks: 5,622
Die writelog funktion is mal richtig Sinnlos sys_err und sys_log reichen doch
Aber sonst recht nice

rawscript("[TEXT_HORIZONTAL_ALIGN_CENTER]")
gibts übrigens auch

PHP Code:
print("Questlib by Mijago")
ql = {}
col = {}
zt = {}
proc = {}
local old_print = print
do
   if 
pc == nil then
      pc 
= {}
      
pc.get_name = function()
         return 
"-name-"
      
end
   end
   
if wait == nil then
      wait 
= function()
      
old_print("<wait>")
   
end
   end
   
if say == nil then
      say 
= function(txt)
      
old_print("<say>"txt)
   
end
   end
   
if chat == nil then
      chat 
= function(txt)
      
old_print("<Chat>"txt)
   
end
   end
   
if notice == nil then
      notice 
= function(txt)
      
old_print("<notice>"txt)
   
end
   end
   
if notice_all == nil then
      notice_all 
= function(txt)
      
old_print("<notice_all>"txt)
   
end
   end
end

doit 
os.execute
arraytoselect 
= function(arrabbr)
   
local d "sel = select("
   
local i 0
   
for 1getn(arr) do
      
.. "\\\"" .. arr[i] .. "\\\","
      
if abbr ~= nil and == getn(arrthen
         d 
.. "\\\"" .. abbr .. "\\\""
      
end
   end
   d 
.. ")\\nreturn sel"
   
return assert(loadstring(d))()
end

writelog 
= function(text, var, file)
   if var == 
nil then
      
var = 1
   end
   
if var == 1 then
      local data 
io.open("syserr""a+")
      
data:write(os.date() .. "::\t" .. text .. "\n")
      
data:close()
   elseif var == 
2 then
      local data 
io.open("syslog""a+")
      
data:write(os.date() .. "::\t" .. text .. "\n")
      
data:close()
   elseif var == 
3 then
      local data 
io.open(file"a+")
      
data:write(os.date() .. "::\t" .. text .. "\n")
      
data:close()
   
end
end

pci 
= {}
pci.new = function(selfname)
   
local out = {}
   
local info mysql_query("SELECT * FROM player.player WHERE name = '" .. name
 
.. "' LIMIT 1")
   
local reich mysql_query("select player_index.empire FROM player.player INNE
R JOIN player.player_index ON player.account_id = player_index.id WHERE player.n
ame = '" 
.. pc.get_name() .. "'")
   
out.name name
   out
.level info.level[1]
   
out.playtime info.playtime[1]
   
out.job info.job[1]
   
out.account_id info.account_id[1]
   
out.id info.id[1]
   
out.voice info.voice[1]
   
out.dir info.dir[1]
   
out.info.x[1]
   
out.info.y[1]
   
out.info.z[1]
   
out.map_index info.map_index[1]
   
out.exit_y info.exit_y[1]
   
out.exit_x info.exit_x[1]
   
out.exit_map_index info.exit_map_index[1]
   
out.hp info.hp[1]
   
out.mp info.mp[1]
   
out.stamina info.stamina[1]
   
out.random_hp info.random_hp[1]
   
out.random_sp info.random_sp[1]
   
out.level_step info.level_step[1]
   
out.st info.st[1]
   
out.ht info.ht[1]
   
out.dx info.dx[1]
   
out.iq info.iq[1]
   
out.exp info.exp[1]
   
out.gold info.gold[1]
   
out.stat_point info.stat_point[1]
   
out.skill_point info.skill_point[1]
   
out.ip info.ip[1]
   
out.part_main info.part_main[1]
   
out.part_hair info.part_hair[1]
   
out.skill_group info.skill_group[1]
   
out.last_play info.last_play[1]
   
out.alignment info.alignment[1]
   
out.change_name info.change_name[1]
   
out.sub_skill_point info.sub_skill_point[1]
   
out.horse_skill_point info.horse_skill_point[1]
   
out.horse_riding info.horse_riding[1]
   
out.horse_hp_droptime info.horse_hp_droptime[1]
   
out.horse_level info.horse_level[1]
   
out.horse_stamina info.horse_stamina[1]
   
out.horse_hp info.horse_hp[1]
   
out.stat_reset_count info.stat_reset_count[1]
   
out.empire reich.empire[1]
   
setmetatable(out, {__index pci})
   print(
"Daten f\252r " .. name .. " erfolgreich geladen!")
   return 
out
end

pci
.update = function(self)
   
local info mysql_query("SELECT * FROM player.player WHERE name = '" .. self
.name .. "' LIMIT 1")
   
self.level info.level[1]
   
self.playtime info.playtime[1]
   
self.job info.job[1]
   
self.account_id info.account_id[1]
   
self.id info.id[1]
   
self.voice info.voice[1]
   
self.dir info.dir[1]
   
self.info.x[1]
   
self.info.y[1]
   
self.info.z[1]
   
self.map_index info.map_index[1]
   
self.exit_y info.exit_y[1]
   
self.exit_x info.exit_x[1]
   
self.exit_map_index info.exit_map_index[1]
   
self.hp info.hp[1]
   
self.mp info.mp[1]
   
self.stamina info.stamina[1]
   
self.random_hp info.random_hp[1]
   
self.random_sp info.random_sp[1]
   
self.level_step info.level_step[1]
   
self.st info.st[1]
   
self.ht info.ht[1]
   
self.dx info.dx[1]
   
self.iq info.iq[1]
   
self.exp info.exp[1]
   
self.gold info.gold[1]
   
self.stat_point info.stat_point[1]
   
self.skill_point info.skill_point[1]
   
self.ip info.ip[1]
   
self.part_main info.part_main[1]
   
self.part_hair info.part_hair[1]
   
self.skill_group info.skill_group[1]
   
self.last_play info.last_play[1]
   
self.alignment info.alignment[1]
   
self.change_name info.change_name[1]
   
self.sub_skill_point info.sub_skill_point[1]
   
self.horse_skill_point info.horse_skill_point[1]
   
self.horse_riding info.horse_riding[1]
   
self.horse_hp_droptime info.horse_hp_droptime[1]
   
self.horse_level info.horse_level[1]
   
self.horse_stamina info.horse_stamina[1]
   
self.horse_hp info.horse_hp[1]
   
self.stat_reset_count info.stat_reset_count[1]
   print(
"Daten f\252r " .. self.name .. " erfolgreich geupdated!")
end

mysql_query 
= function(queryuserpwdbip)
   
local var = {}
   var.
pre ""
   
if ip ~= nil then
      
var.pre = var.pre .. " -h" .. ip
   end
   
if user ~= nil then
      
var.pre = var.pre .. " -u" .. user
   end
   
if pw ~= nil then
      
var.pre = var.pre .. " -p" .. pw
   end
   
if db ~= nil then
      
var.pre = var.pre .. " -D" .. db
   end
   
var.scriptfile "sc_" .. pc.get_name()
   var.
outputfile "op_" .. pc.get_name()
   
query string.gsub(query"\"""'")
   var.
str "mysql " .. var.pre .. " < " .. var.scriptfile .. " > " .. var.outputfile
   script 
io.open(var.scriptfile"w")
   
script:write(query)
   
script:close()
   
os.execute(var.str)
   
local g = {}
   
local f io.open(var.outputfile)
   
g.0
   g
.li = {}
   
g.out = {}
   
g.count 0
   
for line in f:lines() do
      
g.g.1
      g
.li[g.i] = line
   end
   
if g.li[1] == nil then
      
return "ERROR"
   
end
   
if string.len(g.li[1]) == 0 then
      
return "ERROR"
   
end
   g
.fields split(g.li[1], "\t")
   
table.foreachi(g.fields, function(lbln)
      
g.out[ln] = {}
   
end)
   
table.foreachi(g.li, function(ou1ou2)
      if 
ou1 1 then
         local la 
split(ou2"\t")
         do
            
g.count g.count 1
            table
.foreachi(g.fields, function(lbln)
               
g.out[ln][ou1 1] = la[lb]
            
end)
         
end
      end
   end
)
   
f:close()
   
g.out.__data = {}
   
g.out.__data.fields g.fields
   g
.out.__data.lines g.count
   g
.out.__data.user user
   g
.out.__data.pass pw
   g
.out.__data.host ip
   g
.out.__data.db db
   g
.out.__data.query query
   os
.execute("rm " .. var.scriptfile)
   
os.execute("rm " .. var.outputfile)
   return 
g.out
end

mysql_query2 
= function(queryuserpwdbip)
   
local var = {}
   var.
pre ""
   
if ip ~= nil then
      
var.pre = var.pre .. " -h" .. ip
   end
   
if user ~= nil then
      
var.pre = var.pre .. " -u" .. user
   end
   
if pw ~= nil then
      
var.pre = var.pre .. " -p" .. pw
   end
   
if db ~= nil then
      
var.pre = var.pre .. " -D" .. db
   end
   query 
string.gsub(query"\"""'")
   
os.execute("mysql -s" .. var.pre .. " -e=\\\"" .. query .. "\\\"")
end

mysql 
= {}
mysql.connect = function(selfipuserpasswddb)
   
local out = {}
   
out.ip ip
   out
.user user
   out
.pass passwd
   out
.db db
   out
.querycount 0
   out
.querylist = {}
   
out.ql = {}
   
setmetatable(out, {__index mysql})
   return 
out
end

mysql
.query = function(selfquery)
   
self.lastquery 
   (
queryself.userself.passself.dbself.ip)
   
self.lq self.lastquery
   self
.querycount self.querycount 1
   self
.querylist[self.querycount] = self.lq
   self
.ql self.querylist
   
return self.lastquery
end

mysql
.setcfg = function(selfipuserpassdb)
   if 
ip ~= nil then
      self
.ip ip
   end
   
if user ~= nil then
      self
.user user
   end
   
if pass ~= nil then
      self
.pass pass
   end
   self
.db db
end 
;/ das auslesen scheitert bei mir an der Farbtabelle oder was das darstellen soll


FUFU xD ist ja ne decompilte version angehängt
.Alpha. is offline  
Old 12/08/2011, 12:41   #42
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Quote:
FUFU xD ist ja ne decompilte version angehängt
xD jaa, vll erst nachsehen o:

Nunja, ich schreibe gerne Funktionen selbst nach - einerseits aus langeweile (getn ist das selbe wie table.getn) oder, um zusätzliche dinge einzubringen (wie bei writelog)
Mijago is offline  
Old 12/08/2011, 12:47   #43

 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,471
Received Thanks: 5,622
Quote:
Originally Posted by Mijago View Post
xD jaa, vll erst nachsehen o:

Nunja, ich schreibe gerne Funktionen selbst nach - einerseits aus langeweile (getn ist das selbe wie table.getn) oder, um zusätzliche dinge einzubringen (wie bei writelog)
Ja, mache ich auch gelegentlich^^ Allerdings verlasse ich mich mehr auf die Funktionen die "Hard Coded" sind weil die meistens schneller sind.

Das mit pci ist interessant so könnte man die pc table um einige werte erweitern wie z.B pc.ip. Wenn man es einfach beim Login Event neu lädt. Notfalls speichert man es zwischen.
.Alpha. is offline  
Old 12/08/2011, 13:04   #44
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Quote:
Originally Posted by .Nova. View Post
Ja, mache ich auch gelegentlich^^ Allerdings verlasse ich mich mehr auf die Funktionen die "Hard Coded" sind weil die meistens schneller sind.

Das mit pci ist interessant so könnte man die pc table um einige werte erweitern wie z.B pc.ip. Wenn man es einfach beim Login Event neu lädt. Notfalls speichert man es zwischen.
pc. ist ja eine tabelle^^
Dh:
pc.ip = mysql_select("select ip from player.player WHERE name = \'"..pc.get_name().."\'")["ip"][1]
und du hast die IP..

Oder so wie alle andren, als funktion: (nur ohne die vid-funktion)
PHP Code:
pc.ip = function(name) if name == '' then name pc.get_name() end return mysql_select("select ip from player.player WHERE name = \'"..name.."\'")["ip"][1end 
(ja, das fungiert auch als Einzeiler

pc.ip() = IP des jetzigen Charakters
pc.ip('Mijago') = Meine IP (Wann ich das letzte mal on war auf dem Sv..^^)

Danke für die idee!
wird gleich mal gemacht xP


Da ich mit Lua auch meinen Laptop "etwas" automatisiert habe und Funktionen für ihn geschrieben habe, hab ich einige Erfahrung mit Lua.
Mijago is offline  
Old 12/08/2011, 13:30   #45

 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,471
Received Thanks: 5,622
Quote:
Originally Posted by Mijago View Post
pc. ist ja eine tabelle^^
Dh:
pc.ip = mysql_select("select ip from player.player WHERE name = \'"..pc.get_name().."\'")["ip"][1]
und du hast die IP..

Oder so wie alle andren, als funktion: (nur ohne die vid-funktion)
PHP Code:
pc.ip = function(name) if name == '' then name pc.get_name() end return mysql_select("select ip from player.player WHERE name = \'"..name.."\'")["ip"][1end 
(ja, das fungiert auch als Einzeiler

pc.ip() = IP des jetzigen Charakters
pc.ip('Mijago') = Meine IP (Wann ich das letzte mal on war auf dem Sv..^^)

Danke für die idee!
wird gleich mal gemacht xP


Da ich mit Lua auch meinen Laptop "etwas" automatisiert habe und Funktionen für ihn geschrieben habe, hab ich einige Erfahrung mit Lua.
Naja das wären zu viele Querys ich würde eher auf einen Query zum holen aller werte setzen beim Login Event.
.Alpha. is offline  
Reply

Tags
mijago questlib metin


Similar Threads Similar Threads
[Ideensammlung] für Questlib
11/15/2011 - Metin2 Private Server - 18 Replies
Hallihallo, e*PvP Ich schreibe derzeit eine Questlib - eine Ansammlung nützlicher Funktionen für Quests. Wenn diese fertig ist, wird sie das Questen um einiges erleichtern (denke ich ;) ) Derzeit habe ich folgende Funktionen eingebaut: -- -> Gibt Text in say() farbig aus. Englische Farbnamen! (Beinhaltet 281 Farben) note(text) -> Entspricht notice_all('|>~ TEXT') local_pc_setqf(name,qf,wert) -> Setzt bei einem Anderen...
questlib error
10/30/2011 - Metin2 Private Server - 0 Replies
hallo hab ein problem mit meiner questlib bekomme denn fehler: SYSERR: Oct 27 21:43:06 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down. SYSERR: Oct 27 22:43:01 :: InitializeLua: LOAD_QUESTLIB_FAILURE(locale/germany/quest/questli b.lua) woran liegt das hab ma meine questlib unten hochgeladen.
questlib
09/07/2011 - Metin2 Private Server - 5 Replies
hallo ich suche die questlib für denn questbfehle DragonLair.startRaid da ich irgendwie zu blöd bin
questlib erweitern?
05/27/2011 - Metin2 Private Server - 5 Replies
Jo, hab eine kurze Frage. Was für eine function muss ich in die questlib packen, damit ich "logout" in quests packen kann? bzw. wie muss die aussehen? thy.
[RELEASE]Dämonenturm Erweiterung
03/26/2011 - Metin2 PServer Guides & Strategies - 18 Replies
Meine DT-Erweiterung Extras: - 100% kein Zeitbug - Reichsteleporter in dem Wächter - individuelle Anpassung möglich Ablauf: Teil 1:- Bis zum Sensenmann normal - Alle unter Lvl 90 werden rausgeportet



All times are GMT +2. The time now is 02:45.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.