•         

            

            

  • HyperFilter | DoS Protection | DDoS Protection | DoS Mitigation | DDoS Mitigation | AntiDoS | AntiDDoS | Proxy Shielding

Matrix1536 strQuest düzenleme (Decode/Encode prosedürler, tablo vs.)

bigahega

Administrator
Yönetici
KoCuce.Com
Katılım
7 Mart 2012
Mesajlar
12,842
matrikisin yaptığı "v1.1 Görev editleyici" diye geçen bir editör.

programa koymus prosedürleri paylasmamak icin fakat ..



az üstünde ugrasmanız gerekecek full orjinal kodlar su an, işini gören olabilir.



Decode

Kod:
declare @nick varchar(21)

declare @questcount int , @a int , @matrix varchar(400) , @ko tinyint

 set @nick='nero'

delete from ko_quests where nick=@nick 



set @a=0

select @matrix=strquest,@questcount=squestcount from userdata where struserid=@nick

set @questcount=@questcount*3

declare @berkin varchar(50)

declare @mjsamet tinyint



while @a<@questcount

begin

set @ko=cast(cast(substring(@matrix,@a+1,1) as varbinary(1)) as tinyint)

set @mjsamet=cast(cast(substring(@matrix,@a+3,1) as varbinary(1)) as tinyint)

select @berkin=Ad from quests where gorevno=@ko

insert into ko_quests (nick,no,tamamlandimi,isim,sira) values (@nick,@ko,@mjsamet-1,@berkin,@a/3)

set @a=@a+3

end



Encode

Kod:
declare @questcount int , @a int , @matrix varchar(400) , @ko tinyint , @nick varchar(21)

set @a=0

 set @nick=''

set  @matrix=''

select @questcount=count(*) from ko_quests where nick=@nick

declare @mjsamet tinyint

while @a<@questcount

begin

select @mjsamet=tamamlandimi , @ko=no from ko_quests where nick=@nick and sira=@a



set @matrix=substring(@matrix,1,@a*3)+cast(cast(@ko as varbinary(1)) as varchar(1))+cast(cast(0 as varbinary(1)) as varchar(1))+cast(cast(@mjsamet+1 as varbinary(1)) as varchar(1))

set @a=@a+1

end

update userdata set strquest=@matrix , squestcount=@a where struserid=@nick



Tablolar

Kod:
CREATE TABLE [ko_quests] (

	[nick] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

	[no] [int] NULL ,

	[tamamlandimi] [int] NULL ,

	[isim] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

	[sira] [int] NULL 

) ON [PRIMARY]

GO



CREATE TABLE [quests] (

	[gorevno] [tinyint] NULL ,

	[Level] [tinyint] NULL ,

	[Class] [tinyint] NULL ,

	[Ad] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

	[Aciklama] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

	[Malzemeler] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 

) ON [PRIMARY]

GO



Tablo içeriği

View hidden content is available for registered users!



eklemeden yapamıcam cok berbat kodlanmıs hangi kafayla yazmıs acaba 😀
 
Geri
Üst