Metin2 Offline Shop[LUA]

06/07/2015 10:22 thenemne0032#1
Hi all,

I decided to prepare this system, on the recommendation of a friend. I hope you enjoy, and you used. First, I do not think any bugs in the system. I tried to avoid any kind of bug that could, at least as far as I checked. If you encounter any bugs please let. The fix in a short time I publish a new one. In addition, the coding system for getting a bit of a hurry I could have done inexperience. Using the function, but was going to do it that way because I'm rushing. And it does not seem to have any problems in handy again.



What is the Offline Shopping System to do?


Players not in the game is a system that can even sell items.


How the system works?


Players throw on goods they want to sell NPC. Then, against the price, how long the information will remain on the sales and revenues which category you want to add. After making the selection of necessary attachments to exchange goods. Players may withdraw the goods and wills can update the prices of goods. It expires if the player's belongings after he blocked the sale of expired goods and goods sent to the player's safe entry and exit in the event of any game and is deleted from the shopping list. If a player of goods sold, Shopping Box of money is saved. If all merchandise sold money is kept there and wished you could take the money players.


If I'd let me share a detailed video on how the system works:




MySQL file "players" are adding to the database. You do not need to take any action. (After making the additions you do not need to take REBOOT)

Now we need to do another operation. "Player" table below, right click the "Design Table" call.

[Only registered and activated users can see links. Click Here To Register...]

Then, "we alisveris_para" We are adding to our database column name.


IMPORTANT NOTE: The default value of 0 must do! Very important.

[Only registered and activated users can see links. Click Here To Register...]


BETWEEN THE AMOUNT OF MONEY. (DOT) DO place:


Now between the amount of money. (Period) we came to put function. You also have to add this function. If you do not include this function the system work. According to him, it was coded. Now add to that function will show:

"questlib.lu" file, we are opening and closing, add the following code at the bottom. No need to reboot to take. No need to take any further action. "questlib.lu to" the bottom of the Simply add the code I have given below.


PHP Code:
function genel_veri(gelen_miktar)
    
gelen2 tostring(gelen_miktar)
    
local gelen gelen_miktar 
    local sayac 
10
    local basamak 
1
    local ilkhal 
basamak
    
while true do
        if 
gelen sayac >= 1 then
            basamak 
basamak 1
            sayac 
sayac 10
        
else
            break
        
end
    end
    t 
= {}
    
sonucText ""
    
for i=1string.len(gelen2) do
        
t[i]= (string.sub(gelen2,i,i))
    
end
    
for v in pairs(t) do--1324
        
if (basamak  == or basamak == or basamak == 3) and sonucText !=  "" then
            sonucText 
sonucText.."."
            
sonucText sonucText..v
        
else
            
sonucText sonucText..v
        end
        basamak 
basamak 1
    end
    
return sonucText
end 

After this process the bit "quest_functions" file and opens to the bottom "genel_ver" function, we are adding. We're done with this place.



LUA swipe file:


1) usr / game / share / locale / turkey / quests section "alisveris_sistemi.lu to" We put the file. Later;

2) We come to putty.

cd / usr / game / share / locale / turkey / quests are enterliy wrote. Then we write the following command.

./qc alisveris_sistemi.lua

We are done with putty.
3) We're going to the game and with a GM character "/ reload q" is suffering.
4) Then you can start using the Offline Shopping System.
06/07/2015 17:40 .Yacki#2
Taslar'dan sadece +4' olanlar mi var? ^^
_
Nettes Release, sitze an der Übersetzung für euch :rolleyes:
06/07/2015 17:52 freddyryks#3
very good! but it doesn't work ... I put everything navicat etc., you only see the item: \
[Only registered and activated users can see links. Click Here To Register...]



this is the sysser

06/07/2015 18:19 .Yacki#4
You don't have the right questlib to execute the mysql_query10 command, so the quest is trying to use it as a global variable.


Add this to your questlib:
Code:
mysql_query10 = function(query) 
    if not pre then 
        local rt = io.open('CONFIG','r'):read('*all') 
        pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)  %s(%S+).+','-h%1 -u%2 -p%3 -D%4') 
    end 
    math.randomseed(os.time()) 
    local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2  ^10),{},{} 
    --os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) -- für MySQL51 
    os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) -- für MySQL55 
    for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi); 
    for i = 2, table.getn(t) do table.foreach(t[i],function(a,b) 
        out[i-1]               = out[i-1] or {} 
        out[i-1][a]            = tostring(b) or b or 'NULL' 
        out[t[1][a]]           = out[t[1][a]] or {} 
        out[t[1][a]][i-1]      = tostring(b) or b or 'NULL' 
    end) end 
    return out 
end
06/07/2015 18:38 freddyryks#5
Quote:
Originally Posted by .Yacki View Post
You don't have the right questlib to execute the mysql_query10 command, so the quest is trying to use it as a global variable.


Add this to your questlib:
Code:
mysql_query10 = function(query) 
    if not pre then 
        local rt = io.open('CONFIG','r'):read('*all') 
        pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)  %s(%S+).+','-h%1 -u%2 -p%3 -D%4') 
    end 
    math.randomseed(os.time()) 
    local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2  ^10),{},{} 
    --os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) -- für MySQL51 
    os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) -- für MySQL55 
    for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi); 
    for i = 2, table.getn(t) do table.foreach(t[i],function(a,b) 
        out[i-1]               = out[i-1] or {} 
        out[i-1][a]            = tostring(b) or b or 'NULL' 
        out[t[1][a]]           = out[t[1][a]] or {} 
        out[t[1][a]][i-1]      = tostring(b) or b or 'NULL' 
    end) end 
    return out 
end

Inserted, but the problem hasn't changed. I enclose my questlib maybe I was wrong


Questlib :


Sysser :

06/07/2015 19:01 #H4x0r#6
Can you make a system like rise of atalia / wom2 etc. have :d With an true offline shop :p

Would be much cooler haha
06/07/2015 19:05 rollback#7
It's more like a auction house which was released a few years ago ...
06/07/2015 19:38 thenemne0032#8
Quote:
Originally Posted by freddyryks View Post
Inserted, but the problem hasn't changed. I enclose my questlib maybe I was wrong


Questlib :


Sysser :


Try this
06/07/2015 20:29 AnTii™#9
Quote:
Originally Posted by Silizium View Post
Can you make a system like rise of atalia / wom2 etc. have :d With an true offline shop :p

Would be much cooler haha

Better buy the Version from RoA or/and WoM etc.. :)

@anti_spam: Is not really an offline shopsystem but thanks for your published work
06/07/2015 20:37 thenemne0032#10
Add if there are problems:

Skype: bakikaansert
06/07/2015 21:19 .Yacki#11
German Translation ->


Habe auch noch die +0, +1, +2 und +3 Steine hinzugefügt. Auf dem Server wo es +5 oder höhere Steine gibt, sollten diese noch reineditiert werden.
06/07/2015 21:35 MrLibya#12
OMG
I Open The Quest So I see This

[Only registered and activated users can see links. Click Here To Register...]

Then i delete the quest
06/07/2015 22:17 AnTii™#13
Quote:
Originally Posted by .Yacki View Post
German Translation ->


Habe auch noch die +0, +1, +2 und +3 Steine hinzugefügt. Auf dem Server wo es +5 oder höhere Steine gibt, sollten diese noch reineditiert werden.
Hast aber den ein oder anderen Satz vergessen zu übersetzen :)
Zudem ist die Mysql Query alles andere wie Deutsch
06/08/2015 16:04 .Yacki#14
Quote:
Originally Posted by MrLibya View Post
OMG
I Open The Quest So I see This

[Only registered and activated users can see links. Click Here To Register...]

Then i delete the quest
Yes because its sending the account information to his servers hum?
Can you please explain me, in which line the information is being sent, or any other information is going to be transfered outside the quest?
:facepalm:
If you don't know a thing about lua, please don't announce such shitty comments. I red this script and there's no backdoor in it.
Ah and the information up there is to find out which item belongs to which account.


Quote:
Originally Posted by AnTii™ View Post
Hast aber den ein oder anderen Satz vergessen zu übersetzen :)
Zudem ist die Mysql Query alles andere wie Deutsch
Ja, aber ich wollte nicht auch noch die ganze Datenbank übersetzen und alles ändern in der Quest.

Ja kann sein dass ich den ein oder anderen Satz vergessen habe, aber freut euch doch einfach dass es überhaupt jemand gemacht hat. Das war nämlich nicht so einfach mal kurz alles übersichtliches übersetzen, weil ich schauen musste sogar zwischen den einzelnen Variablen, dass das auch wirklich ein Text ist und nicht nur eine Variable, die Türkisch bleiben muss weil ich sie sonst überall hätte abändern müssen. Dazu kommt noch, dass ich die Bonis übersetzen musste was die größte Drecksarbeit des Jahrhunderts war und na ja.. :D

Edit: So jetzt müsste oben alles übersetzt sein, wenn es noch Sachen gibt die auf Türkisch sind, sagt sie mir einfach, dann kann ich es abändern.
Und dass die ganzen Variablen etc. türkisch bleiben, sollte hoffentlich jedem klar sein. Aber keine Angst, es ist kein Backdoor drin.
06/08/2015 17:43 Nick#15
Quote:
Originally Posted by .Yacki View Post
Yes because its sending the account information to his servers hum?
Can you please explain me, in which line the information is being sent, or any other information is going to be transfered outside the quest?
:facepalm:
If you don't know a thing about lua, please don't announce such shitty comments. I red this script and there's no backdoor in it.
Ah and the information up there is to find out which item belongs to which account.




Ja, aber ich wollte nicht auch noch die ganze Datenbank übersetzen und alles ändern in der Quest.

Ja kann sein dass ich den ein oder anderen Satz vergessen habe, aber freut euch doch einfach dass es überhaupt jemand gemacht hat. Das war nämlich nicht so einfach mal kurz alles übersichtliches übersetzen, weil ich schauen musste sogar zwischen den einzelnen Variablen, dass das auch wirklich ein Text ist und nicht nur eine Variable, die Türkisch bleiben muss weil ich sie sonst überall hätte abändern müssen. Dazu kommt noch, dass ich die Bonis übersetzen musste was die größte Drecksarbeit des Jahrhunderts war und na ja.. :D

Edit: So jetzt müsste oben alles übersetzt sein, wenn es noch Sachen gibt die auf Türkisch sind, sagt sie mir einfach, dann kann ich es abändern.
Und dass die ganzen Variablen etc. türkisch bleiben, sollte hoffentlich jedem klar sein. Aber keine Angst, es ist kein Backdoor drin.
Der Themenersteller castet Strings in Strings und Numbers in Numbers, hierbei beißt sich die Katze in den Schwanz. MrLibya scheint sich nur unheimlich darüber aufgeregt zu haben, von Backdoors ist hier weniger die Rede.

lg