Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Procedure: Nation Transfer

Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
Human NT
Code:
USE [KN_online]
GO
/****** Object:  StoredProcedure [dbo].[humanNT]    Script Date: 08/18/2008 09:50:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[humanNT]
@Account char(30)
 
AS DECLARE @clannumber smallint, @length int,@row int,@i int,@dwid int,@pos int,@dur int,@dur1 int,@ext int,@StackSize1 int,@strName varchar(30),@strExtName varchar(30),@Cdwid varbinary(4),@cdur varchar(2),@cstack varchar(2)
begin tran
declare @char1 varchar(21)
set @char1 = (select strcharid1 from account_char where straccountid = @account)
declare @char2 varchar(21)
set @char2 = (select strcharid2 from account_char where straccountid = @account)
declare @char3 varchar(21)
set @char3 = (select strcharid3 from account_char where straccountid = @account)
declare @clannumber1 smallint
set @clannumber1 = (select idnum from knights where chief = @char1)
declare @clannumber2 smallint
set @clannumber2 = (select idnum from knights where chief = @char2)
declare @clannumber3 smallint
set @clannumber3 = (select idnum from knights where chief = @char3)
update account_char set bnation = '2' where bnation = '1' and straccountid = @Account
update userdata set nation = '2' where nation = '1' and struserid = @char1
update userdata set race = '11' where race = '1' and class in ('101','105','106') and struserid = @char1
Update userdata set race = '12' where race = '2' and class in ('107','111','102','104','112','108') and struserid = @char1
update userdata set race = '13' where race = '3' and class in ('103','109','110') and struserid = @char1
update userdata set race = '13' where race = '4' and class in ('104','111','112') and struserid = @char1
update userdata set class = '205' where class = '105' and struserid = @char1
update userdata set class = '207' where class = '107' and struserid = @char1
update userdata set class = '209' where class = '109' and struserid = @char1
update userdata set class = '211' where class = '111' and struserid = @char1
update userdata set class = '201' where class = '101' and struserid = @char1
update userdata set class = '202' where class = '102' and struserid = @char1
update userdata set class = '203' where class = '103' and struserid = @char1
update userdata set class = '204' where class = '104' and struserid = @char1
update userdata set class = '212' where class = '112' and struserid = @char1
update userdata set class = '206' where class = '106' and struserid = @char1
update userdata set class = '208' where class = '108' and struserid = @char1
update userdata set class = '210' where class = '110' and struserid = @char1
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char1
delete from knights where chief = @char1
delete from knights_user where sidnum = @clannumber1
delete from knights_rating where shindex = @clannumber1
update userdata set knights = 0, fame = 0 where knights = @clannumber1
update userdata set nation = '2' where nation = '1' and struserid = @char2
update userdata set race = '11' where race = '1' and class in ('101','105','106') and struserid = @char2
Update userdata set race = '12' where race = '2' and class in ('107','111','102','104','112','108') and struserid = @char2
update userdata set race = '13' where race = '3' and class in ('103','109','110') and struserid = @char2
update userdata set race = '13' where race = '4' and class in ('104','111','112') and struserid = @char2
update userdata set class = '205' where class = '105' and struserid = @char2
update userdata set class = '207' where class = '107' and struserid = @char2
update userdata set class = '209' where class = '109' and struserid = @char2
update userdata set class = '211' where class = '111' and struserid = @char2
update userdata set class = '201' where class = '101' and struserid = @char2
update userdata set class = '202' where class = '102' and struserid = @char2
update userdata set class = '203' where class = '103' and struserid = @char2
update userdata set class = '204' where class = '104' and struserid = @char2
update userdata set class = '212' where class = '112' and struserid = @char2
update userdata set class = '206' where class = '106' and struserid = @char2
update userdata set class = '208' where class = '108' and struserid = @char2
update userdata set class = '210' where class = '110' and struserid = @char2
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char2
delete from knights where chief = @char2
delete from knights_user where sidnum = @clannumber2
delete from knights_rating where shindex = @clannumber2
update userdata set knights = 0, fame = 0 where knights = @clannumber2
update userdata set nation = '2' where nation = '1' and struserid = @char3
update userdata set race = '11' where race = '1' and class in ('101','105','106') and struserid = @char3
Update userdata set race = '12' where race = '2' and class in ('107','111','102','104','112','108') and struserid = @char3
update userdata set race = '13' where race = '3' and class in ('103','109','110') and struserid = @char3
update userdata set race = '13' where race = '4' and class in ('104','111','112') and struserid = @char3
update userdata set class = '205' where class = '105' and struserid = @char3
update userdata set class = '207' where class = '107' and struserid = @char3
update userdata set class = '209' where class = '109' and struserid = @char3
update userdata set class = '211' where class = '111' and struserid = @char3
update userdata set class = '201' where class = '101' and struserid = @char3
update userdata set class = '202' where class = '102' and struserid = @char3
update userdata set class = '203' where class = '103' and struserid = @char3
update userdata set class = '204' where class = '104' and struserid = @char3
update userdata set class = '212' where class = '112' and struserid = @char3
update userdata set class = '206' where class = '106' and struserid = @char3
update userdata set class = '208' where class = '108' and struserid = @char3
update userdata set class = '210' where class = '110' and struserid = @char3
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char3
delete from knights where chief = @char3
delete from knights_user where sidnum = @clannumber3
delete from knights_rating where shindex = @clannumber3
update userdata set knights = 0, fame = 0 where knights = @clannumber3
update userdata set knights = 0, fame = 0 where struserid = @char1
update userdata set knights = 0, fame = 0 where struserid = @char2
update userdata set knights = 0, fame = 0 where struserid = @char3
Update knights set vicechief_1 = '' where vicechief_1 = @char1
Update knights set vicechief_2 = '' where vicechief_2 = @char1
Update knights set vicechief_3 = '' where vicechief_3 = @char1
Update knights set vicechief_1 = '' where vicechief_1 = @char2
Update knights set vicechief_2 = '' where vicechief_2 = @char2
Update knights set vicechief_3 = '' where vicechief_3 = @char2
Update knights set vicechief_1 = '' where vicechief_1 = @char3
Update knights set vicechief_2 = '' where vicechief_2 = @char3
Update knights set vicechief_3 = '' where vicechief_3 = @char3
delete from knights_user where struserid = @char1
delete from knights_user where struserid = @char2
delete from knights_user where struserid = @char3
commit tran

Karus NT

Code:
USE [KN_online]
GO
/****** Object:  StoredProcedure [dbo].[karusNT]    Script Date: 08/18/2008 09:50:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE procedure [dbo].[karusNT]
@Account char(30)
 
AS DECLARE @clannumber smallint, @length int,@row int,@i int,@dwid int,@pos int,@dur int,@dur1 int,@ext int,@StackSize1 int,@strName varchar(30),@strExtName varchar(30),@Cdwid varbinary(4),@cdur varchar(2),@cstack varchar(2)
 
begin tran
 
declare @char1 varchar(21)
set @char1 = (select strcharid1 from account_char where straccountid = @account)
declare @char2 varchar(21)
set @char2 = (select strcharid2 from account_char where straccountid = @account)
declare @char3 varchar(21)
set @char3 = (select strcharid3 from account_char where straccountid = @account)
declare @clannumber1 smallint
set @clannumber1 = (select idnum from knights where chief = @char1)
declare @clannumber2 smallint
set @clannumber2 = (select idnum from knights where chief = @char2)
declare @clannumber3 smallint
set @clannumber3 = (select idnum from knights where chief = @char3)
 
update account_char set bnation = '1' where bnation = '2' and straccountid = @Account
 
update userdata set nation = '1' where nation = '2' and struserid = @char1
Update userdata set race = '1' where race = '11' and class in ('201','205','206') and struserid = @char1
Update userdata set race = '1' where race = '12' and class in ('201','205','206') and struserid = @char1
Update userdata set race = '1' where race = '13' and class in ('201','205','206') and struserid = @char1
Update userdata set race = '2' where race = '12' and class in ('207','211','202','204','212','208') and struserid = @char1
update userdata set race = '2' where race = '13' and class in ('202','207','208') and struserid = @char1
update userdata set race = '3' where race = '12' and class in ('203','209','210') and struserid = @char1
update userdata set race = '3' where race = '13' and class in ('203','209','210') and struserid = @char1
update userdata set race = '4' where race = '13' and class in ('204','211','212') and struserid = @char1
update userdata set class = '105' where class = '205' and struserid = @char1
update userdata set class = '107' where class = '207' and struserid = @char1
update userdata set class = '109' where class = '209' and struserid = @char1
update userdata set class = '111' where class = '211' and struserid = @char1
update userdata set class = '101' where class = '201' and struserid = @char1
update userdata set class = '102' where class = '202' and struserid = @char1
update userdata set class = '103' where class = '203' and struserid = @char1
update userdata set class = '104' where class = '204' and struserid = @char1
update userdata set class = '112' where class = '212' and struserid = @char1
update userdata set class = '106' where class = '206' and struserid = @char1
update userdata set class = '108' where class = '208' and struserid = @char1
update userdata set class = '110' where class = '210' and struserid = @char1
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char1
delete from knights where chief = @char1
delete from knights_user where sidnum = @clannumber1
delete from knights_rating where shindex = @clannumber1
update userdata set knights = 0, fame = 0 where knights = @clannumber1
 
update userdata set nation = '1' where nation = '2' and struserid = @char2
Update userdata set race = '1' where race = '11' and class in ('201','205','206') and struserid = @char2
Update userdata set race = '1' where race = '12' and class in ('201','205','206') and struserid = @char2
Update userdata set race = '1' where race = '13' and class in ('201','205','206') and struserid = @char2
Update userdata set race = '2' where race = '12' and class in ('207','211','202','204','212','208') and struserid = @char2
update userdata set race = '2' where race = '13' and class in ('202','207','208') and struserid = @char2
update userdata set race = '3' where race = '12' and class in ('203','209','210') and struserid = @char2
update userdata set race = '3' where race = '13' and class in ('203','209','210') and struserid = @char2
update userdata set race = '4' where race = '13' and class in ('204','211','212') and struserid = @char2
update userdata set class = '105' where class = '205' and struserid = @char2
update userdata set class = '107' where class = '207' and struserid = @char2
update userdata set class = '109' where class = '209' and struserid = @char2
update userdata set class = '111' where class = '211' and struserid = @char2
update userdata set class = '101' where class = '201' and struserid = @char2
update userdata set class = '102' where class = '202' and struserid = @char2
update userdata set class = '103' where class = '203' and struserid = @char2
update userdata set class = '104' where class = '204' and struserid = @char2
update userdata set class = '112' where class = '212' and struserid = @char2
update userdata set class = '106' where class = '206' and struserid = @char2
update userdata set class = '108' where class = '208' and struserid = @char2
update userdata set class = '110' where class = '210' and struserid = @char2
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char2
delete from knights where chief = @char2
delete from knights_user where sidnum = @clannumber2
delete from knights_rating where shindex = @clannumber2
update userdata set knights = 0, fame = 0 where knights = @clannumber2
 
update userdata set nation = '1' where nation = '2' and struserid = @char3
Update userdata set race = '1' where race = '11' and class in ('201','205','206') and struserid = @char3
Update userdata set race = '1' where race = '12' and class in ('201','205','206') and struserid = @char3
Update userdata set race = '1' where race = '13' and class in ('201','205','206') and struserid = @char3
Update userdata set race = '2' where race = '12' and class in ('207','211','202','204','212','208') and struserid = @char3
update userdata set race = '2' where race = '13' and class in ('202','207','208') and struserid = @char3
update userdata set race = '3' where race = '12' and class in ('203','209','210') and struserid = @char3
update userdata set race = '3' where race = '13' and class in ('203','209','210') and struserid = @char3
update userdata set race = '4' where race = '13' and class in ('204','211','212') and struserid = @char3
update userdata set class = '105' where class = '205' and struserid = @char3
update userdata set class = '107' where class = '207' and struserid = @char3
update userdata set class = '109' where class = '209' and struserid = @char3
update userdata set class = '111' where class = '211' and struserid = @char3
update userdata set class = '101' where class = '201' and struserid = @char3
update userdata set class = '102' where class = '202' and struserid = @char3
update userdata set class = '103' where class = '203' and struserid = @char3
update userdata set class = '104' where class = '204' and struserid = @char3
update userdata set class = '112' where class = '212' and struserid = @char3
update userdata set class = '106' where class = '206' and struserid = @char3
update userdata set class = '108' where class = '208' and struserid = @char3
update userdata set class = '110' where class = '210' and struserid = @char3
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char3
delete from knights where chief = @char3
delete from knights_user where sidnum = @clannumber3
delete from knights_rating where shindex = @clannumber3
update userdata set knights = 0, fame = 0 where knights = @clannumber3
update userdata set knights = 0, fame = 0 where struserid = @char1
update userdata set knights = 0, fame = 0 where struserid = @char2
update userdata set knights = 0, fame = 0 where struserid = @char3
Update knights set vicechief_1 = '' where vicechief_1 = @char1
Update knights set vicechief_2 = '' where vicechief_2 = @char1
Update knights set vicechief_3 = '' where vicechief_3 = @char1
Update knights set vicechief_1 = '' where vicechief_1 = @char2
Update knights set vicechief_2 = '' where vicechief_2 = @char2
Update knights set vicechief_3 = '' where vicechief_3 = @char2
Update knights set vicechief_1 = '' where vicechief_1 = @char3
Update knights set vicechief_2 = '' where vicechief_2 = @char3
Update knights set vicechief_3 = '' where vicechief_3 = @char3
delete from knights_user where struserid = @char1
delete from knights_user where struserid = @char2
delete from knights_user where struserid = @char3
 
commit tran

[HOWTO]
For example account: lol = Human, and u want it to be karus.
then execute this:

Code:
exec KarusNT 'lol'

Same for karus but reversed like:

Code:
exec HumanNT 'lol'

Can also be easily put in a tool, i recommend a tool wich costs kc to execute, otherwise players will spam it and heave lag will occur...........
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
57
Reaction score
0
Re: [Share] Procedure: Nation Transfer

Already created this procedure so that I can monitor NT transfers and keep sides balanced. :p

But GG
 
Newbie Spellweaver
Joined
Mar 24, 2007
Messages
79
Reaction score
0
Re: [Share] Procedure: Nation Transfer

how to add dis and use? sry i m nood.
 
Experienced Elementalist
Joined
Jan 3, 2008
Messages
299
Reaction score
1
Re: [Share] Procedure: Nation Transfer

how to add dis and use? sry i m nood.
Toss both into the Query Analyzer and press Execute. Then, whenever you want to Nation Transfer someone, open the Query Analyzer again, then put this in(filling in accountname) and hit execute.

a) If they want to be Karus:
Code:
exec karusnt 'accountid'

b) If they want to be El Morad:
Code:
exec humannt 'accountid'

ON-TOPIC: Very nice, thx
 
Back
Top