Register for your free account! | Forgot your password?

You last visited: Today at 12:59

  • 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 10/08/2013, 19:12   #196
 
elite*gold: 0
Join Date: Feb 2011
Posts: 77
Received Thanks: 4
Quote:
Originally Posted by Mijago View Post
HowTo Einfügen
Ihr ladet euch die Datei questing.lua in euren Quest-Ordner.
Dann öffnet ihr die dortige "questlib.lua" und fügt oben folgende Zeile an:
Code:
dofile("locale/germany/quest/questing.lua")
Dürfte ich fragen, wo genau oben?...
pyccak96 is offline  
Old 10/08/2013, 22:19   #197
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
Ist egal.
Du kannst es sogar ganz unten einfügen, oder ganz oben, oder irgendwo sonst..
Ist wirklich egal

Aber interessant, dass du der erste bist, der es Fragt, ist eigentlich wirklich eine treffende Frage .
Mijago is offline  
Thanks
1 User
Old 10/12/2013, 12:22   #198
 
elite*gold: 0
Join Date: Nov 2010
Posts: 20
Received Thanks: 2
i have this error

Code:
 mysql: ambiguous option '--e=UPDATE account.account SET coins=500 WHERE id=1 ;' (enable_cleartext_plugin, execute)
when i used this

Code:
function pc.set_coins(x)
    mysql_query("UPDATE account.account SET coins="..x.." WHERE id="..pc.get_account_id().." ;",'root','pw','account','localhost')
    return true
end
and then
Code:
 pc.set_coins(500)
KroNiqS is offline  
Old 10/12/2013, 16:02   #199
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
You need the Code for mysql 5.6^^ Look @ the code. There are 2 os.execute lines, change them.
Mijago is offline  
Old 10/25/2013, 02:32   #200
 
elite*gold: 11
Join Date: Nov 2010
Posts: 1,709
Received Thanks: 3,828
Thanks, say2 will come handy when creating our multi language quest system
.Shōgun is offline  
Old 10/25/2013, 07:04   #201
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
Fine
Mijago is offline  
Old 10/25/2013, 12:00   #202
 
elite*gold: 0
Join Date: Oct 2013
Posts: 25
Received Thanks: 23
Endlich mal wieder womit ich was anfangen kann !
'Aljehry is offline  
Old 12/27/2013, 23:23   #203
 
elite*gold: 200
Join Date: Apr 2012
Posts: 577
Received Thanks: 290
I failed with my multilanguage System, because

Quote:
when 20018.chat.quest_title.cube(pc.getqf("language")) with pc.get_level() >= 15 begin
cant be used like this i you sadly you cant use () or [] when clauses.

Any help ?

Kind Regards
MartPwnS
MartPwnS is offline  
Old 12/27/2013, 23:56   #204
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
Try when 20018.click and write then instead your "when chat" clauses one select_table
Mijago is offline  
Thanks
1 User
Old 12/27/2013, 23:58   #205
 
elite*gold: 200
Join Date: Apr 2012
Posts: 577
Received Thanks: 290
Example please i never used this :S


But anyway thanks for this fking fast answer dude ;D

Kind Regards
MartPwnS
MartPwnS is offline  
Old 12/28/2013, 00:02   #206
 
Chikyou's Avatar
 
elite*gold: 0
Join Date: Oct 2012
Posts: 114
Received Thanks: 72
when 20018.click begin
say(quest_title.cube(pc.getqf("language")))
end

If the questflag language is defined in other quest, you should use pc.getf("questname", "language").
Chikyou is offline  
Thanks
1 User
Old 12/28/2013, 00:09   #207
 
elite*gold: 200
Join Date: Apr 2012
Posts: 577
Received Thanks: 290
Wait a second i want it to be the quest button if you click the NPC you get

BLABLA1 (translated)
BLABLA2 (translated)
BLABLA3 (translated)

and from there you can click this texts
MartPwnS is offline  
Old 12/28/2013, 00:11   #208
 
Chikyou's Avatar
 
elite*gold: 0
Join Date: Oct 2012
Posts: 114
Received Thanks: 72
As Mijago said, use select_table function.

when ... begin
local a = select_table(quest_title.cube(pc.getqf("language") )) -- Or whatever you want
if a == 1 then
...
elseif a == 2 then
...
end
end
Chikyou is offline  
Old 12/28/2013, 10:24   #209
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
Code:
-- in Questlib:
quest_title = {
    cube = {
        [1] = { -- eg German
            "Keks",
            "Baum",
            -- etc
        },
        [2] = { -- eg Eng
            "Cookie",
            "Tree"
        }
    },
    cancel = {
        [1] = "Abbrechen",
        [2] = "Cancel"
    }
}

-- In the quest

when 1234.click begin
    local s = select_table(quest_title.cube[pc.getqf("lang")])
    if s == 1 then
        -- Cookie
    elseif s == 2 then
        -- Tree
    end
end
Maybe you want to have a look at my select3 function:
You could also write some stuff like that:
Code:
when 1234.click begin
    local lang_tab = quest_title.cube[pc.getqf("lang")]
    local s = select(lang_tab[1],lang_tab[2],quest_title.cancel[pc.getqf("lang")])
    if s == 1 then
        -- Cookie
    elseif s == 2 then
        -- Tree
    end
end

But, i give you a better code than that above!
Code:
local quest_title = setmetatable({},{
    cube = {
        [1] = { -- eg German
            "Keks",
            "Baum",
            -- etc
        },
        [2] = { -- eg Eng
            "Cookie",
            "Tree"
        }
    },
    cancel = {
        [1] = "Abbrechen",
        [2] = "Cancel"
    },
    __index = function (me,name) 
        return (getmetatable(me)[name] or {})[pc.getqf("lang") or 1] or "" -- return "" if language not exists; always language 1 if not set!
    end
})
-- And now we can write the following:
when 1234.click begin
    local s = select(quest_title.cube[1],quest_title.cube[2],quest_title.cancel)
    if s == 3 then
        return
    elseif s == 1 then
        -- Cookie
    elseif s == 2 then
        -- Tree
    end
end
But please stop using this thread for such questions..
Open your own in the Question Section please o:



#Edit
Maybe the following code helps you more:
PHP Code:
quest_title setmetatable({},{
    
cube = {
        [
1] = { -- eg German
            
"Keks",
            
"Baum",
            -- 
etc
        
},
        [
2] = { -- eg Eng
            
"Cookie",
            
"Tree"
        
}
    },
    
cancel = {
        [
1] = "Abbrechen",
        [
2] = "Cancel"
    
},
    
__index = function (me,name
        
local ret = (getmetatable(me)[name] or {})[pc.getqf("lang") or 1] or "" -- return "" if language not existsalways language 1 if not set!
        if 
type(ret) == "table" then
            ret 
setmetatable(ret,{
                
__index = function(me,name)
                    
local _,_,typ,string.find(name,"(%D+)(%d+)")
                    if 
typ == "num" and p then
                        
return me[p] or {}
                    
end
                    
return nil
                end
            
})
        
end
        
return ret
    end
}) 
With that, you can M-A-Y-B-E write sth like that:
PHP Code:
when 1234.chat.quest_title.cube.num1 begin

end
when 1234.chat
.quest_title.cube.num2 begin

end 
The Examples above will also work with this code
Mijago is offline  
Thanks
2 Users
Old 02/11/2014, 18:15   #210
 
elite*gold: 0
Join Date: May 2009
Posts: 533
Received Thanks: 464
Ich kann die Questlib nicht runterladen ist die Seite down?
Stylo@Magic-mt3 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 +1. The time now is 13:00.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.