Register for your free account! | Forgot your password?

You last visited: Today at 19:05

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

Advertisement



[R]Character Swap 2.0

Discussion on [R]Character Swap 2.0 within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 505
Thumbs up [R]Character Swap 2.0





Hi Guys
Quest:

PHP Code:
----------------------------------------------------------
--- 
Character Swap System
--- HaveBeen™ - NRY WORK
--- www.elitepvpers.com
----------------------------------------------------------
quest swap begin
    state start begin
        
function load_settings()
            
local data = {
                {}
            }
            
data.Settings = {activate 1,get_time 86400,minimum_level 50maximum_level 105,Use_To_GM false}
            return 
data
        end
        
function swap(sname,name)
            
local find find_pc_by_name(sname)
            
local old pc.select(find)
            
local id pc.get_account_id()
            
pc.select(old)
            
local data swap.load_settings()
            
local s mysql_query("select * from account.account where id = '"..id.."'")
            
local m mysql_query("select * from account.account where id = '"..pc.get_account_id().."'")
            
data.Sname = {accountname s.login[1],password s.password[1]}
            
data.My = {accountname m.login[1],password m.password[1]}
            
mysql_query("update from account.account password = '"..data.Sname.password.."' where id = '"..pc.get_account_id().."'")
            
mysql_query("update from account.account password = '"..data.My.password.."' where id = '"..id.."' ")
            
local x pc.select(find)
                
say_title("Information:")
                
say("")
                ---
                
say("Accountname: "..data.My.accountname)
                
say("")
                
say_reward("Your password is same.")
                
say_reward("Thanks. Good day!")
                
pc.setqf("time",get_global_time())
                
command("quit")
            
pc.select(x)
            
say_title("Information:")
            
say("")
            ---
            
say("Accountname: "..data.Sname.accountname)
            
say("")
            
say_reward("Your password is same.")
            
say_reward("Thanks. Good day!")
            
pc.setqf("time",get_global_time())
            
command("quit")
        
end
        when 9006.chat
."Character Swap" begin
            say_title
(mob_name(npc.get_race())..":")
            
say("")
            ---
            
local data swap.load_settings()
            if(
pc.is_gm() and data.Settings.Use_To_GM == falsethen
                say_reward
("You don't use to this system.")
                return
            elseif(
data.Settings.get_time get_global_time() - pc.getqf("time")) then
                say_reward
("Unfortunately you can't swap characters.")
                
say_reward("")
                return
            elseif(
not pc.get_level() > data.Settings.minimum_level and not pc.get_level() <= data.Settings.maximum_levelthen
                say_reward
("You can't swap characters.")
                
say_reward("Level isn't enough / "..data.Settings.maximum_level.." levels is higher for.")
return
end
            say
("Enter name of your character swap.")
            
say("")
            
local sname input()
            
local find find_pc_by_name(sname)
            
say_title(mob_name(npc.get_race())..":")
            
say("")
            --
            if(
sname == "" or tostring(sname) == nilthen
                say_reward
("You need to write a name.")
                
say_reward("If you don't , you can't swap characters.")
            elseif(
find == 0then
                say_reward
("This person is someone that isn't open or doesn't exists.")
                
say_reward("")
                return
            
end
            say
("Please wait while request is being transmitted.")
            
say("")
            
local agree confirm(find,"Do you want to swap with "..pc.name.." character",30)
            
say_title(mob_name(npc.get_race())..":")
            
say("")
            --
            if(
agree != CONFIRM_OKthen
                say
(sname.." didn't accept your request.")
                
say("")
                return
            
end
            swap
.swap(sname,pc.name)
        
end
    end
end 
Questlib:

PHP Code:
function split(strdelimmaxNb)  
    if 
str == nil then return str end  
    
if string.find(strdelim) == nil then return { str end  
    
if maxNb == nil or maxNb 1 then maxNb 0 end  
    local result 
= {}  
    
local pat "(.-)" .. delim .. "()"  
    
local nb 0  
    local lastPos  
    
for partpos in string.gfind(strpat) do  
        
nb nb 1  
        result
[nb] = part  
        lastPos 
pos  
        
if nb == maxNb then break end  
    end  
    
if nb ~= maxNb then result[nb 1] = string.sub(strlastPosend  
    
return result  
end  



mysql_query 
= function(query)  
    
local rt io.open('CONFIG','r'):read('*all')  
    
local prestring.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')  
    
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)    
    for 
av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) endos.remove(fi);  
    for 
2table.getn(t) do table.foreach(t[i],function(a,b)  
        
out[i-1]        = out[i-1] or {}  
        
out[i-1][a]        = b  
        out
[t[1][a]]    = out[t[1][a]] or {}  
        
out[t[1][a]][i-1]    = b  
    end
end  
    
return out  
end 

Mfg HaveBeen™
King Regards



HaveBeen™ is offline  
Thanks
4 Users
Old 08/12/2013, 13:31   #2
 
elite*gold: 200
Join Date: Apr 2012
Posts: 577
Received Thanks: 290
What does it do sry i didnt Get it.
MartPwnS is offline  
Old 08/12/2013, 13:49   #3
 
Summex's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 738
Received Thanks: 227
Quote:
Originally Posted by MartPwnS View Post
What does it do sry i didnt Get it.
I think it is a system to give your friend your character when you stop playing or but you don't want to give him the full acount with the password and everything.

-

Ich denke es ist ein System um z.B. einem Freund seinen Charakter rüberzu "tauschen" ohne ihm dafür den ganzen Account mit Passwort usw. zu geben.
Summex is offline  
Thanks
1 User
Old 08/12/2013, 14:20   #4
 
elite*gold: 0
Join Date: Apr 2008
Posts: 59
Received Thanks: 2
It's a quest to swap characters is that hard to understand?
Swap = Trade
Trade Chars with other account!
Nunuh91 is offline  
Reply

Tags
character, swap


Similar Threads Similar Threads
|WTS| 80+ Character with 8m+ for Guildwars |SWAP|
03/11/2010 - Runescape Trading - 10 Replies
Hello, I am trading this miniature main account for guild wars items and cash. The picture is not that good but there is 8.1 almost 8.2mill on that picture below. http://i65.photobucket.com/albums/h235/e4sykillx/ money-1.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ stats-5.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ norecovery2.jpg
-Swap- Trading 120 rs acc for Aion Wings code for GW -swap-
02/19/2010 - Aion Trading - 8 Replies
Trading this account for gw stuff. http://i65.photobucket.com/albums/h235/e4sykillx/ rsacc.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ rsbank.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ norecovery2.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ blackmarks.jpg
|SWAP| Swaping this for Possibly Aion Wings Code |SWAP|
02/19/2010 - Aion Trading - 2 Replies
Hello, I am trading this miniature main account for guild wars items and cash. The picture is not that good but there is 8.1 almost 8.2mill on that picture below. http://i65.photobucket.com/albums/h235/e4sykillx/ money-1.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ stats-5.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ norecovery2.jpg
-Swap- 8 Digit Steam Acc -Swap-
02/18/2010 - Steam Trading - 10 Replies
I am trading this account for guild wars it is an 8 digit account ending in 1337 which is cool for collectors I guess here is a picture Steam_0:0:1XXX1337 http://i65.photobucket.com/albums/h235/e4sykillx/ Untitled-28.jpg http://i65.photobucket.com/albums/h235/e4sykillx/ steamacc.jpg I only want guildwars gold items worth the value of the steam acc hopefully



All times are GMT +1. The time now is 19:05.


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.