serverınızdaki bir clanın üyeleriyle birlikte karus yada human mı olmasını istiyorsunuz ? işte kodumuz
NOT : bu kodu çalıştırırken clanda bulunanların oyunda olmaması gerekiyor.
Aşağıdaki prosedürleri kayıt ediyoruz öncelikle.
Kod:
CREATE PROCEDURE [clan_human]
@IDName char(21)
AS
-- webmsn
declare @IDNo smallint,@irk tinyint,@c1 char(21),@acc char(21),@acc1 char(21),@acc3 char(21)
select @IDNo = IDNum from Knights where IDName = @IDName
select @irk = Nation From Knights where IDNUM = @IDNo
select @c1 = strUserId from userdata where Knights = @IDNo
select @acc = strAccountID from account_char where strCharID1 = @c1
select @acc1 = strAccountID from account_char where strCharID2 = @c1
select @acc3 = strAccountID from account_char where strCharID3 = @c1
if @irk = 2
begin
print 'Zaten clan human'
end
if @irk = 1
begin
update account_char set bNation='2' where strAccountID = @acc
update account_char set bNation='2' where strAccountID = @acc1
update account_char set bNation='2' where strAccountID = @acc3
update Knights set Nation='2' where IDNum = @IDNo and Nation = 1
update userdata set Nation='2',Zone='21' where Knights = @IDNo and Nation = 1
update userdata set Race = '12' where Knights = @IDNo and Race = 1
update userdata set Race = '12' where Knights = @IDNo and Race = 2
update userdata set Race = '13' where Knights = @IDNo and Race = 3
update userdata set Race = '13' where Knights = @IDNo and Race = 4
update userdata set Class = '201' where Knights = @IDNo and Class = 101
update userdata set Class = '205' where Knights = @IDNo and Class = 105
update userdata set Class = '206' where Knights = @IDNo and Class = 106
update userdata set Class = '202' where Knights = @IDNo and Class = 102
update userdata set Class = '207' where Knights = @IDNo and Class = 107
update userdata set Class = '208' where Knights = @IDNo and Class = 108
update userdata set Class = '204' where Knights = @IDNo and Class = 104
update userdata set Class = '211' where Knights = @IDNo and Class = 111
update userdata set Class = '212' where Knights = @IDNo and Class = 112
update userdata set Class = '203' where Knights = @IDNo and Class = 103
update userdata set Class = '209' where Knights = @IDNo and Class = 109
update userdata set Class = '210' where Knights = @IDNo and Class = 110
end
GO
Kod:
CREATE PROCEDURE [clan_karus]
@IDName char(21)
AS
-- webmsn
declare @IDNum smallint,@irk tinyint,@c1 char(21),@acc char(21),@acc1 char(21),@acc3 char(21)
select @IDNum = IDNum from Knights where IDName = @IDName
select @irk = Nation From Knights where IDNUM = @IDNum
select @c1 = strUserId from userdata where Knights = @IDNum
select @acc = strAccountID from account_char where strCharID1 = @c1
select @acc1 = strAccountID from account_char where strCharID2 = @c1
select @acc3 = strAccountID from account_char where strCharID3 = @c1
if @irk = 1
begin
print 'Zaten clan karus'
end
if @irk = 2
begin
update account_char set bNation='1' where strAccountID = @acc
update account_char set bNation='1' where strAccountID = @acc1
update account_char set bNation='1' where strAccountID = @acc3
update Knights set Nation='1' where IDNum = @IDNum and Nation = 2
update userdata set Nation='1',Zone='21' where Knights = @IDNum and Nation = 2
update userdata set Race = '1',Class='101' where Knights = @IDNum and Race = 11 and Class = 201
update userdata set Race = '1',Class='105' where Knights = @IDNum and Race = 11 and Class = 205
update userdata set Race = '1',Class='106' where Knights = @IDNum and Race = 11 and Class = 206
update userdata set Race = '1',Class='101' where Knights = @IDNum and Race = 12 and Class = 201
update userdata set Race = '1',Class='105' where Knights = @IDNum and Race = 12 and Class = 205
update userdata set Race = '1',Class='106' where Knights = @IDNum and Race = 12 and Class = 206
update userdata set Race = '1',Class='101' where Knights = @IDNum and Race = 13 and Class = 201
update userdata set Race = '1',Class='105' where Knights = @IDNum and Race = 13 and Class = 205
update userdata set Race = '1',Class='106' where Knights = @IDNum and Race = 13 and Class = 206
update userdata set Race = '2',Class='102' where Knights = @IDNum and Race = 12 and Class = 202
update userdata set Race = '2',Class='102' where Knights = @IDNum and Race = 13 and Class = 202
update userdata set Race = '2',Class='107' where Knights = @IDNum and Race = 12 and Class = 207
update userdata set Race = '2',Class='107' where Knights = @IDNum and Race = 13 and Class = 207
update userdata set Race = '2',Class='108' where Knights = @IDNum and Race = 12 and Class = 208
update userdata set Race = '2',Class='108' where Knights = @IDNum and Race = 13 and Class = 208
update userdata set Race = '2',Class='104' where Knights = @IDNum and Race = 12 and Class = 204
update userdata set Race = '4',Class='104' where Knights = @IDNum and Race = 13 and Class = 204
update userdata set Race = '2',Class='111' where Knights = @IDNum and Race = 12 and Class = 211
update userdata set Race = '4',Class='111' where Knights = @IDNum and Race = 13 and Class = 211
update userdata set Race = '2',Class='112' where Knights = @IDNum and Race = 12 and Class = 212
update userdata set Race = '4',Class='112' where Knights = @IDNum and Race = 13 and Class = 212
update userdata set Race = '3',Class='103' where Knights = @IDNum and Race = 12 and Class = 203
update userdata set Race = '3',Class='103' where Knights = @IDNum and Race = 13 and Class = 203
update userdata set Race = '3',Class='109' where Knights = @IDNum and Race = 12 and Class = 209
update userdata set Race = '3',Class='109' where Knights = @IDNum and Race = 13 and Class = 209
update userdata set Race = '3',Class='110' where Knights = @IDNum and Race = 12 and Class = 210
update userdata set Race = '3',Class='110' where Knights = @IDNum and Race = 13 and Class = 210
end
GO
çalışma şekli
human bir clanı üyeleriyle birlikte karus yapmak için
HTML-Kodu:
exec clan_karus ClanAdı
karus bir clanı üyeleriyle birlikte human yapmak için
PHP- Kodu:
exec clan_human ClanAdı
Alıntı:
Örnek : exec clan_human VarYeMeZ yada exec clan_human 'VarYeMeZ' |
şeklinde kullanabilirsiniz.
Dip Not : Sadece clanda bulunan karakteriniz ırk dönüşümü olur. eğer
yan karakteriniz varsa vede ırk değişimi gerçekleşen clanda değilse
aynı şekliyle kalır.
Ekleme : işlem yapılırken account_char bölümü eski haliyle kalıyordu onu düzelttim.
ALINTIDIR!!!