Duyuru:YORUM YAPMAYI UNUTMAYIN İYİ KÖTÜ YORUMLARINIZI BEKLİYORUZ SAYGILARIMLA
GÜNCELL HİLELER İÇİN BİZİ FACEBOOK KANALIMIZDAN TAKİP EDİN reklam

Soacs V41 FULL ve KANAT





Server Files Download Link:SOACS

Kanat Patch Download Link:KanatPatch

SOACS TBL EDITOR Download Link:KOTBL



PROSEDÜRLER

Kod:
CREATE PROCEDURE [dbo].[SOACS_LOGIN [MENTION=15298]account[/MENTION]ID varchar(21) [MENTION=41673]pass[/MENTION]word varchar(13),@IpAddress varchar(50),@HwID  varchar(50),@nRet  smallint OUTPUTAS
if(exists(select * from HardwareBanList where ltrim(rtrim(HWID)) = ltrim(rtrim(@HwID))))begin -- Blocked HardwareID SET @nRet = 4 RETURNendIF dbo.IsValidCharacters [MENTION=15298]account[/MENTION]ID) = 1BEGIN SET @nRet = 2 -- Hesap Bulunamady. RETURNEND
IF dbo.IsValidCharacters [MENTION=41673]pass[/MENTION]word) = 1BEGIN SET @nRet = 3 -- ?ifreniz Hatalydyr. RETURNEND
-- Oto Üyelikselect @nRet = count(straccountid) from tb_user where straccountid = [MENTION=15298]account[/MENTION]ID
if @nRet = 0BEGIN INSERT INTO TB_USER (strAccountID, strPasswd, strSocNo, iDays) VALUES  [MENTION=15298]account[/MENTION]ID, [MENTION=41673]pass[/MENTION]word, 1, '6')END
------- Database By_Bts Tarafindan Hazirlanmistir. --------DECLARE [MENTION=199867]nat[/MENTION]ion tinyint, [MENTION=82071]cha[/MENTION]rNum smallintSET [MENTION=199867]nat[/MENTION]ion = 0SET [MENTION=82071]cha[/MENTION]rNum = 0DECLARE @pwd varchar(13)SET @pwd = nullSELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = [MENTION=15298]account[/MENTION]IDIF @pwd IS nullBEGIN SET @nRet = 0 RETURNENDELSE IF @pwd <> [MENTION=41673]pass[/MENTION]wordBEGIN SET @nRet = 0 RETURNEND--CurrentUserdan Silelimdelete from currentuser where straccountid = [MENTION=15298]account[/MENTION]ID--Currentuser bitis---Login bilgilerini kaydetInsert Into HardwareLog values  [MENTION=15298]account[/MENTION]ID,@IpAddress,ltrim(rtrim(@HwID)),getdate())--Login bilgileri bitisSELECT [MENTION=199867]nat[/MENTION]ion = bNation, [MENTION=82071]cha[/MENTION]rNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = [MENTION=15298]account[/MENTION]IDIF @@ROWCOUNT = 0BEGIN SET @nRet = 1 RETURNENDIF [MENTION=82071]cha[/MENTION]rNum >= 0BEGIN SET @nRet = 1 RETURNENDELSEBEGIN SET @nRet = [MENTION=199867]nat[/MENTION]ion+1 RETURNEND

Kod:

CREATE FUNCTION [dbo].[IsValidCharacters] [MENTION=49706]sda[/MENTION]ta varchar(8000))RETURNS INT AS
BEGIN
 DECLARE [MENTION=49706]sda[/MENTION]taLen int DECLARE @Loop int DECLARE [MENTION=40184]Letter[/MENTION] varchar(1) DECLARE @RXLetters varchar(8000) DECLARE @Match tinyint  SET @RXLetters = 'qwertyuopasdfghjklizxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890_' SET [MENTION=49706]sda[/MENTION]taLen = LEN [MENTION=49706]sda[/MENTION]ta) SET @Loop = 1 SET @Match = 0  WHILE @Loop <  [MENTION=49706]sda[/MENTION]taLen + 1) BEGIN   SET [MENTION=40184]Letter[/MENTION] = RTRIM(LTRIM(SUBSTRING [MENTION=49706]sda[/MENTION]ta,@Loop,1)))
  IF CHARINDEX [MENTION=40184]Letter[/MENTION],@RXLetters) = 0  BEGIN   SET @Match = 1   BREAK  END   SET @Loop = @Loop + 1 END  RETURN @MatchEND


Kod:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[HardwareBanList]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[HardwareBanList]GO
CREATE TABLE [dbo].[HardwareBanList] ( [strAccountID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [HWID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Time] [datetime] NULL ) ON [PRIMARY]GO


Kod:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[HardwareLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[HardwareLog]GO
CREATE TABLE [dbo].[HardwareLog] ( [AccountID] [char] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [IP] [char] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [HWID] [char] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [LoginTime] [datetime] NULL ) ON [PRIMARY]GO

Kod:
create PROCEDURE [dbo].[HWBAN]  -- Add the parameters for the stored procedure here@AccountID varchar(21),@HwID  varchar(50)ASBEGIN SET NOCOUNT ON;
    -- Insert statements for procedure here Insert Into HardwareBanList values  [MENTION=15298]account[/MENTION]ID,@HwID,GETDATE()) PRINT [MENTION=15298]account[/MENTION]ID  + ' hesabina ait ' + @HwID + ' seri no banlandi'END

içinde server filesler ve client klasörü vardır client klasörünü patch olarak atın.
server ip sini server.ini yazın değişir.

18xx Serverda Symbol,Grade Reset,Database sıfırlama ve Kral ekleme

NK SET nElmoCheck = @DifferenceBetweenUser WHERE nRank = @Index + 1            END         SET @Index = @Index + 1             FETCH NEXT FROM RANKING_CRS INTO @strUserId,@LoyaltyMonthly END CLOSE RANKING_CRS DEALLOCATE RANKING_CRS  UPDATE USER_PERSONAL_RANK SET nSalary = REPLACE(nElmoLoyaltyMonthly - nKarusLoyaltyMonthly,'-','')  COMMIT TRAN
 KOD
  CREATE PROCEDURE OYUNCU_SIRALAMA_Reset AS  DECLARE @strUserId char(21) DECLARE @Loyalty int DECLARE @Knights int DECLARE @KnightName char(50) DECLARE @IsValidKnight int DECLARE @Index smallint DECLARE @IsValidCount tinyint DECLARE @RankName varchar(30)  SELECT @IsValidCount = Count(*) FROM USER_KNIGHTS_RANK  IF @IsValidCount < 100 BEGIN     SET @Index = 1     WHILE @Index < 101    BEGIN        IF @Index = 1       BEGIN          SET @RankName = 'Gold Knight'       END       IF @Index > 1 AND @Index <= 4       BEGIN          SET @RankName = 'Silver Knight'       END       IF @Index > 4 AND @Index <= 9       BEGIN          SET @RankName = 'Mirage Knight'       END       IF @Index > 9 AND @Index <= 25       BEGIN          SET @RankName = 'Shadow Knight'       END       IF @Index > 25 AND @Index <= 50       BEGIN          SET @RankName = 'Mist Knight'       END       IF @Index > 50 AND @Index <= 100       BEGIN          SET @RankName = 'Training Knight'       END              INSERT INTO USER_KNIGHTS_RANK (shIndex,strName,strElmoUserID,strElmoKnightsName,nElmoLoyalty,strKarusUserID,strKarusKnightsName,nKarusLoyalty,nMoney) VALUES (@Index,@RankName,NULL,NULL,0,NULL,NULL,0,1000000)           SET @Index = @Index + 1    END END  SET @Index = 1 SET @strUserId = NULL SET @Loyalty = 0 SET @Knights = 0  DECLARE RANKING_CRS CURSOR FOR  SELECT TOP 100 strUserId,Loyalty,Knights FROM USERDATA WHERE Nation = 1 AND Authority = 1 ORDER BY Loyalty DESC  OPEN RANKING_CRS FETCH NEXT FROM RANKING_CRS INTO @strUserId,@Loyalty,@Knights WHILE @@FETCH_STATUS = 0  BEGIN  SET @KnightName = NULL SET @IsValidKnight = 0  IF @Knights <> 0 BEGIN    SELECT @IsValidKnight = COUNT(IDName) FROM KNIGHTS WHERE IDNum = @Knights         IF @IsValidKnight <> 0     BEGIN       SELECT @KnightName = IDName FROM KNIGHTS WHERE IDNum = @Knights     END END         UPDATE USER_KNIGHTS_RANK SET strKarusUserID = @strUserId, strKarusKnightsName = @KnightName, nKarusLoyalty = @Loyalty WHERE shIndex = @Index         SET @Index = @Index + 1             FETCH NEXT FROM RANKING_CRS INTO @strUserId,@Loyalty,@Knights END CLOSE RANKING_CRS DEALLOCATE RANKING_CRS  SET @Index = 1 SET @strUserId = NULL SET @Loyalty = 0 SET @Knights = 0  DECLARE RANKING_CRS CURSOR FOR  SELECT TOP 100 strUserId,Loyalty,Knights FROM USERDATA WHERE Nation = 2 AND Authority = 1 ORDER BY Loyalty DESC  OPEN RANKING_CRS FETCH NEXT FROM RANKING_CRS INTO @strUserId,@Loyalty,@Knights WHILE @@FETCH_STATUS = 0  BEGIN  SET @KnightName = NULL SET @IsValidKnight = 0  IF @Knights <> 0 BEGIN    SELECT @IsValidKnight = COUNT(IDName) FROM KNIGHTS WHERE IDNum = @Knights         IF @IsValidKnight <> 0     BEGIN       SELECT @KnightName = IDName FROM KNIGHTS WHERE IDNum = @Knights     END END         UPDATE USER_KNIGHTS_RANK SET strElmoUserID = @strUserId, strElmoKnightsName = @KnightName, nElmoLoyalty = @Loyalty WHERE shIndex = @Index         SET @Index = @Index + 1             FETCH NEXT FROM RANKING_CRS INTO @strUserId,@Loyalty,@Knights END CLOSE RANKING_CRS DEALLOCATE RANKING_CRS

Db Temizleme
 KOD
truncate table account_char go truncate table currentuser go truncate table knights go truncate table knights_rating go truncate table knights_user go truncate table tb_user go truncate table userdata go truncate table warehouse go
Son olarak aşağıdaki kodları query anylser yapıştırıp f5 yapıyoruz.



 KOD
exec UPDATE_KNIGHTS_RATING exec UPDATE_USER_KNIGHTS_RANK exec UPDATE_USER_PERSONAL_RANK exec OYUNCU_IRK_SIRALAMASI_Reset exec OYUNCU_SIRALAMA_Reset exec KRAL_EKLE @CharID=KarusGameMaster  ----- "KarusGameMaster" yazan yere kral yapıcağınız kişinin nicki yazılcak.
 KOD
Kilit açıldı - Tadını çıkarın!
G (Basılı Tutarsanız Çok Hızlı Bi Şekilde Hareket Edersiniz +open2 ---------- 2 numaralı savaşı başlatır değerler= 1 - 2 -3 - 4- 5 - 6 +close ---------- Savaşı kapatır. +exp_add 255% ---------- Exp event başlatır maxdeğer=255 +money_add 255% ---------- Para event başlatır maxdeğer=255 +monsummon 1250 ---------- Boss atar.. +zonechange 21 ---------- Numaralı zoneye gider.. /ATTACKDISABLE Seçtiğiniz Kullanıcıya Atack İzni Vermez /ATTAKCENABLE Seçtiğiniz Kullanıcıya Atack İzni Verir /forbidconnect Ahmet ---------- Ahmet İsimli Kullanıcıyı banlar. /summonuser Ahmet ---------- Kullanıcıyı Yanına Çeker.. /notice Selam ---------- Alttan yazı yazar.. /Noticeall Selam ---------- Üstten yazı yazar.. /time 10 ---------- (0-24)(Oyun saatini ayarlarsınız mesela 24 yapınca gece olur) ---- Zone ---- Lufer -- 1 Elmorad -- 2 Karus Eslant -- 11 Elmorad Eslant -- 12 Maradon -- 21 Battle1 -- 61 64 Battle2 -- 62 65 Battle3 -- 63 66 Andream -- 72 RonarkLandBase -- 73 ---- Bifrost Canavarlar --- Ego -- 5851 Glutton -- 5951 Wratch -- 6051 Sloth -- 6151 Lust -- 6251 Envy -- 6351 Greed -- 6451 ---- Juraid Mountain Canavarlar ---- Deva. Bird 8106 ---- Bosslar ---- İsiloon -- 5501 Felankor -- 7035 Ultima -- 6551 Volcanic Rock -- 3891 Diğer Hell Fire -- 8401 Enigma -- 8402 Havoc -- 8403 Cruel -- 8404 Pelerin Görevleri Caitharos(Görev) -- 2690 İsilonn(Görev) -- 5701 Felankor(Görev) -- 5702 Ebenzer Komutları /Open2 ---------- 2 numaralı savaşı başlatır değerler= 1 - 2 -3 - 4- 5 - 6 /Close ---------- Savaşı Kapatır. /kill Ahmet ---------- Nickli oyuncuyu server'dan dc eder. /captain <-- savas taki kaptani belirler

DB yi Tek Kodla Temizleme

Zorluk Cekmemeniz için size tek kodla db Temizleme yöntemini  gösterdim 

Kolaylıkla Uygulayablirsiniz.

ANLATIM


KOD:
CREATE PROCEDURE [DB_Temizle]
BEGIN
truncate table  ACCOUNT_CHAR
truncate table BATTLE
truncate table CurrentUser
truncate  table FRIEND_LIST
truncate table KING_SYSTEM
truncate table  knights
truncate table knights_user
truncate table  knights_alliance
truncate table knights_rating
truncate table  np_kings
truncate table np_kings2
truncate table TB_USER
truncate  table USERDATA
truncate table user_saved_magic
truncate table  userdata_skillshortcut
truncate table warehouse
truncate table  warehouse_bu
END
GO


Bu kodu girdikten sonra databaseyi temizlemek için Qaya Girilecek Kod :



       KOD:
EXEC  DB_Temizle

Servera Monster Summon Staf Ekleme (Resimli Anlatım)

Bir çoğunuz Pvp Serverınızda Monster Summon Staff'ı kullanıyor yahut biliyor ama nasıl yeni bosslar eklersiniz bunu bilmeyenler olabilir burdan öğrenebilirsiniz.
Bir şekilde Serverinize Canlılık Getirir ve Farklı şeyler yapabilir. Pus oluşturup üzerinden para dahi kazanabilirsiniz zor serverlar için birebirdir.


                                                                                
                                                        Anlatım 








                                                                   



Servera Trina Eklemek ve Çalıştırmak (Usko Stil)

ilk olarak Db'mizde Trina varsa Siliyoruz:
DELETE FROM ITEM
WHERE (Num = 700002000) OR
(Num = 700002000)
Daha Sonra Trinamızı Db mize ekliyoruz:
Insert Into [ITEM] Values (700002000,'Trinas Piece (+0)                                ',255,15,0,0,0,0,0,1,1,2500,0,0,0,0,255,1,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)


Şimdi Trinamızı Çalışır duruma getirmek:

UPDATE ITEM_UPGRADE SET nGenRate='8000'
WHERE nOriginItem like '%8' AND nReqItem1='700002000'

* 8000 +8'e Geçerken Kullanacağız %'sidir.
* %8 +9 Veya +10 Veya +7 Ayarlayıp Geçireği Upgrade oranıdır.

Yani şu demek: +8'e Geçerken %8000 'i Artır...

Not: Trinasız Belirlediğiniz Upgrade Oranlarının üstüne eklememektedir. Trinada Belirlediğiniz Upgrade Oranı Geçerlidir.

3 Farklı Çeşit Destek İtem Eklemek

                                B.S.G. Support Item



Özellikleri:
3 Farklı çeşitte mevcuttur.
PK Server'lara uygun olarak ayarlanmıştır
BOC'lu Mage Serverlar'a göre özellikler yetersizdir editleyebilirsiniz.

Destek itemi alan ezici güçte olmaz.
Test edilmiştir ve soruna rastlanmamıştır.
Item türü unique'dir.

Bronze Support: Kötü Seviye
Silver Support: Orta Seviye
Gold Support: En iyi Seviye

Veritabanı'na eklemek için;
Query Analyzer'e giriş işlemini yapın, ardından bu kodları ekleyiniz.




PHP- Kodu:
insert into item values (939910031 '(R) Gold Support' 12 120 300 30000 2100000 500 99 103 20 150 150 150 150 200 200 200 200 150 200 200 200 200 200200 200)  insert into item values (939910030 '(R) Silver Support' 12 80 200 30000 2100000 300 99 103 10 100 100 100 100 150 150 150 150 100 150 150 150 150 150 150 150)  insert into item values (939910029 '(R) Bronze Support ' 12 40 100 30000 2100000 200 99 103 50 50 50 50 100 100 100 200 80 80 80 80 80 ,80)  
Veritabanı'ndan kaldırmak için;
Query Analyzer'e giriş işlemini yapın, ardından bu kodları ekleyiniz.

PHP- Kodu:
Delete from item where num '939910031' Delete from item where num '939910030' Delete from item where num '939910029'  
Oyundaki kullanıcılara eklemek için;
Karekter editör'den kullanıcıyı seçiniz , ardından destek itemi sağ küpenin altındaki yere ekleyiniz.
Not: Invertory'e eklemeyiniz.

Yapımcı: Ridaz (Faruk Ender)

Database Sıfırlama Kodu (Sorunsuz)


Bu işlev için verilen birçok kod yetersiz kalıyor, üyelerin bilgilerinin bulunduğu çoğu tabloyu ellemiyor bile. Bu yüzden aşağıdaki sorgu tamamen üyelerin yani oyuncuların bilgililerini temizler. Sembol tablolarını boşaltmaz, oyuncu isimlerini siler böylelikle herhangi bir bug veya hata oluşmaz.

Kod:
truncate table ACCOUNT_CHARtruncate table FRIEND_LIST
truncate table HACKTOOL_USERLOG
truncate table KING_BALLOT_BOX
truncate table KING_CANDIDACY_NOTICE_BOARD
truncate table KING_ELECTION_LIST
truncate table KNIGHTS
truncate table KNIGHTS_ALLIANCE
truncate table KNIGHTS_RATING
truncate table KNIGHTS_USER
truncate table TB_USER
truncate table USER_SAVED_MAGIC
truncate table USERDATA
truncate table USERDATA_SKILLSHORTCUT
truncate table WAREHOUSE
truncate table WEB_ITEMMALL
truncate table HERO_USER
truncate table premium_service
-- Clean User Rank Logo Table
update USER_KNIGHTS_RANK
set
strElmoKnightsName = NULL,
strElmoUserID = NULL,
strKarusKnightsName = NULL,
strKarusUserID = NULL,
nElmoLoyalty = 0,
nKarusLoyalty = 0
-- Clean Personal Rank Logo Table
update USER_PERSONAL_RANK
set
strElmoUserID = NULL,
strKarusUserID = NULL,
nElmoLoyaltyMonthly = 0,
nKarusLoyaltyMonthly = 0
-- Clean Manner Point Table
update USER_MANNERPOINT_RANK
set
strElmoUserID = NULL,
strKarusUserID = NULL,
nElmoMannerPoint = 0,
nKarusMannerPoint = 0 

Bosslara Np Eklemek

update k_monster set iloyalty='25' where strname='Lobo'
update k_monster set iloyalty='25' where strname='Lupus'
update k_monster set iloyalty='25' where strname='Lycaon'
update k_monster set iloyalty='25' where strname='Barrkk'
update k_monster set iloyalty='25' where strname='Barkirra'
update k_monster set iloyalty='25' where strname='Antares'
update k_monster set iloyalty='25' where strname='Shaula'
update k_monster set iloyalty='25' where strname='Lesath'
update k_monster set iloyalty='25' where strname='Hyde'
update k_monster set iloyalty='25' where strname='bone collecter'
update k_monster set iloyalty='25' where strname='Dragon tooth'
update k_monster set iloyalty='25' where strname='Duke'
update k_monster set iloyalty='25' where strname='Bishop'
update k_monster set iloyalty='25' where strname='Bach'
update k_monster set iloyalty='25' where strname='Javana'
update k_monster set iloyalty='25' where strname='Samma'
update k_monster set iloyalty='25' where strname='attila'
update k_monster set iloyalty='25' where strname='Troll King'
update k_monster set iloyalty='25' where strname='Snake Queen'
update k_monster set iloyalty='25' where strname='Deruvish founder'
update k_monster set iloyalty='25' where strname='Harpy Queen'
update k_monster set iloyalty='25' where strname='Talos'
update k_monster set iloyalty='25' where strname='Orc bandit leader'


Loyalty=25 Yerine Istediğiniz Bossa Istediğiniz NP'yi Verebilirsiniz.Loyalty=0 Yaparsanız Bosslardaki NPler Silinir.


İteme level Sınırı Koyma

Verdiğim Kod Tum Itemlerın LvL Sınırını Belırler
Ornegın 70 LvL Sınırını degıstırmek ıstıyorsanız 70 yerıne kac ıse onu yazın
HTML-Kodu:
update item set ReqLevel = '70'

Belirlediğin İtemin LvL Sınırını Ayarla
Faun Yerıne Istedıgınız Itemın Adını yazın ve 70 yazan yere belırlemek ıstedıgınız lvl ı yazın Bu verdıgım kod Ismı Faun ıle baslıyan tum ıtemlerın lvl ını belırler

HTML-Kodu:
Update Item Set ReqLevel ='70' Where strName Like '%Faun%'


Kod Sahibi:Kerem Orta


Günlük NP Sıralaması PHP Kodu İle


1. KOD SQL içindir.
2. KOD Aga Panel İçindir
3. KOD Normal Herhangi Bir Panel İçindir



Kod:
Query Analyzer'a Girip Gerekli Column'u Ekleyelim
------
ALTER TABLE USERDATA
 ADD GunLukLoyalty int

------
------
Eklenecek Tablo : 

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GUNLUK_NP_TAKIP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GUNLUK_NP_TAKIP]
GO

CREATE TABLE [dbo].[GUNLUK_NP_TAKIP] (
    [StrUserID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    [Giris] [int] NULL ,
    [cikis] [int] NULL 
) ON [PRIMARY]
GO

------

1. Account_Logout Procedure'sine girelim

BEGIN TRAN'ın Hemen Altına Yapıştıralım

----- gunluk baslangic
DECLARE @girisnp int , @cikisnp int , @id varchar(50), @logvarmi int
select @id = StrCharID from CURRENTUSER where StrAccountID = @AccountID
select @girisnp = Giris from GUNLUK_NP_TAKIP where StrUserID = @id
select @cikisnp = Loyalty from USERDATA where StrUserID = @id
if  @girisnp > @cikisnp 
BEGIN
update USERDATA set GunlukLoyalty = GunlukLoyalty + (@girisnp - @cikisnp) where StrUserID = @id
DELETE FROM GUNLUK_NP_TAKIP where StrUserID = @id
END
if @cikisnp > @girisnp
BEGIN
update USERDATA set GunlukLoyalty = GunlukLoyalty + (@cikisnp - @girisnp) where StrUserID = @id
DELETE FROM GUNLUK_NP_TAKIP where StrUserID = @id
END
---- gunluk bitis

Kodumuzu Yapy?tyrdyktan Sonra Kaydedip Çykalym Bu Procedure'den.


2. Load_User_Data Procedure'sine girelim

EXEC REPAIR_USER_STAT_POINTS @id hemen üstüne gelicek ?ekilde kodu yapy?tyralym : 

-- gunluk baslangic
DECLARE @girisnp int
select @girisnp = Loyalty from userdata where StrUserID = @id
insert into GUNLUK_NP_TAKIP (StrUserID, Giris, Cikis) VALUES (@id, @girisnp, '0')
-- gunluk bitis

EXEC REPAIR_USER_STAT_POINTS @id

Kodumuzu Yapıştırdıkdan Sonra Kaydedip Çıkalım QA Kapatalım.
QA Açtıktan Sonra Günlük NP'nin Çalışması İçin Bu Kodu Yapıştırıyoruz ;

update userdata set GunlukLoyalty = '0' ve F5'E Basyyoruz 

( Her Gün Saat 00:00'da Bu Kodu Girmelisiniz ki Günlük NP'yi Sıfırlansın.  Bunu JOB İşlemleri İle Otamatik Yapabilrsin. )

Günlük NP Proceduresinin Sağlıklı Çalışması İçin Ne Gerekiyorsa Yaptık Burada İşimiz Bitmiştir...

Altta Verdiğim KOD Aga Panel İçindir. Onunda Altında Normal Panel İçin Vereceğim


Kod:
<? 
// Oturumlar 
ob_start(); 
session_start(); 


if ($_SESSION['sesusera'] == '') { 
     
     
    echo 'Üye Girisi yapiniz!'; 
     
    } 
     
    else { 

?>  
<center> <B> <a href="index.php?sayfa=gunluk"> Ortak Gunluk Siralama </a> | <a href="index.php?sayfa=gunluk&irk=hmn"> Human Gunluk Siralama </a> | <a href="index.php?sayfa=gunluk&irk=krs"> Karus Gunluk Siralama </a> 

<br /><br />Hergun Saat 24:00'da resetlenir.<br />  


 <?  
$irkg = $_GET['irk']; 

if ($irkg == '') { 
     
     $irkgunluk = "ORTAK"; 
      
     
    } 
    elseif ($irkg == 'hmn') { 
         
        $irkgunluk = "HUMAN"; 
        $irks = "2"; 
         
        } 
        elseif ($irkg == 'krs') { 
         
        $irkgunluk = "KARUS"; 
        $irks = "1"; 
         
        } 
         
        else { 
             
            $irkgunluk = "ORTAK"; 
             
            } 
             
            if ($irks == '') { 
                 
                ///  ORTAK 
                 
                ?> 
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" /> 
<title><? echo $titled; ?></title> 
<link href="../style.css" rel="stylesheet" type="text/css" /> 
 <link href="style.css" rel="stylesheet" type="text/css" /> 

<style type="text/css"> 
<!-- 
.style1 {color: #000000} 
.style2 {color: #FFFFFF} 
.style3 {color: #FFFFFF; font-weight: bold; } 
--> 
</style> 

</head> 

<body background="../imgs/bg.jpg" topmargin="0" marginheight="0"> 
<table width="520" border="0" cellpadding="0" cellspacing="0"> 
  <tr> 
    <td height="24" align="left"  >&nbsp;<img src="../imgs/arti.gif" width="9" height="9" />&nbsp;<strong><center>Gunluk NP Siralamasi - <? echo ($irkgunluk) ; ?></strong></td> 
  </tr> 
  <tr> 
  <? 
    function GNation($nation) 
{ 
    if ($nation == 1) { 
        $nation = '<img src="../imgs/karus.gif">'; 
    } elseif ($nation == 2) { 
        $nation = '<img src="../imgs/elmo.gif">'; 
    } 

    return $nation; 
} 
?> 
    <td align="left" valign="top" background="../imgs/bg.png"> 

       <table width="520" border="0" cellpadding="0" cellspacing="0"> 

          <?     
     

$results=odbc_exec($conn,"SELECT TOP 50 strUserID, Level, Nation, Class, Knights, Loyalty, GunlukLoyalty strCharID FROM USERDATA   ORDER  BY GunlukLoyalty DESC, LEVEL DESC"); 
$asd = 0; 
$tablo_1 = ' 
 <center> <tr> 
      <td width="25" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Sira</span></td> 
  
    <td width="100" align="center" height="14" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Karakter Ady </span></td> 
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Level</span></td> 
     
  
   
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">National Point</span></td>   
  <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Gunluk NP</span></td> 
  </tr> 
'; 
echo $tablo_1; 
while (odbc_fetch_row($results)) { 
$user = odbc_result($results,1); 
         
    $np = odbc_result($results, 6); 
    $aylik = odbc_result($results, 7); 
    $level = odbc_result($results, 2); 
    $clan = odbc_result($results, 5); 
    $clannm = odbc_result($results, 5); 
        $clanr=odbc_exec($conn,"SELECT IDName FROM KNIGHTS WHERE IDNum = '$clan'"); 
    $clan=odbc_result($clanr, 1); 
    if ($clan == '') { 
        $clan = 'Yok'; 
    } 
    $sira++; 

?> 

<? 


$tablo_2 = ' 

            <tr class="textwhite"> 
            <td align="center"><font color="#990000">'.$sira.'</font></td> 
     
            <td align="center"><a href="index.php?sayfa=userdetay&karakter='.$user.'"><font color="#990000">'.$user.'</a></td> 
            <td align="center"><font color="#990000">'.$level.'</font></td> 
               
                   
                     
<td align="center"><font color="#990000">'.number_format($np).'</font></td>                       
<td align="center"><font color="#990000">'.number_format($aylik).'</font></td> 
          </tr> 
'; 
echo $tablo_2; 
} 

?>   
    </table></td> 
  </tr> 
</table> 
</body> 
</html> 

                 
        <?        } 
                 
                 
                else { ?> 
                     
                    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" /> 
<title><? echo $titled; ?></title> 
<link href="../style.css" rel="stylesheet" type="text/css" /> 
 <link href="style.css" rel="stylesheet" type="text/css" /> 

<style type="text/css"> 
<!-- 
.style1 {color: #000000} 
.style2 {color: #FFFFFF} 
.style3 {color: #FFFFFF; font-weight: bold; } 
--> 
</style> 

</head> 

<body background="../imgs/bg.jpg" topmargin="0" marginheight="0"> 
<table width="520" border="0" cellpadding="0" cellspacing="0"> 
  <tr> 
    <td height="24" align="left"  >&nbsp;<img src="../imgs/arti.gif" width="9" height="9" />&nbsp;<strong><center>Gunluk NP Siralamasi - <? echo ($irkgunluk) ; ?></strong></td> 
  </tr> 
  <tr> 
  <? 
    function GNation($nation) 
{ 
    if ($nation == 1) { 
        $nation = '<img src="../imgs/karus.gif">'; 
    } elseif ($nation == 2) { 
        $nation = '<img src="../imgs/elmo.gif">'; 
    } 

    return $nation; 
} 
?> 
    <td align="left" valign="top" background="../imgs/bg.png"> 

       <table width="520" border="0" cellpadding="0" cellspacing="0"> 

          <?     
     

$results=odbc_exec($conn,"SELECT TOP 50 strUserID, Level, Nation, Class, Knights, Loyalty, GunlukLoyalty strCharID FROM USERDATA WHERE Nation = '".$irks."'   ORDER  BY GunlukLoyalty DESC, LEVEL DESC"); 
$asd = 0; 
$tablo_1 = ' 
 <center> <tr> 
      <td width="25" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Sira</span></td> 
  
    <td width="100" align="center" height="14" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Karakter Ady </span></td> 
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Level</span></td> 
     
  
   
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">National Point</span></td>   
  <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Gunluk NP</span></td> 
  </tr> 
'; 
echo $tablo_1; 
while (odbc_fetch_row($results)) { 
$user = odbc_result($results,1); 
         
    $np = odbc_result($results, 6); 
    $aylik = odbc_result($results, 7); 
    $level = odbc_result($results, 2); 
    $clan = odbc_result($results, 5); 
    $clannm = odbc_result($results, 5); 
        $clanr=odbc_exec($conn,"SELECT IDName FROM KNIGHTS WHERE IDNum = '$clan'"); 
    $clan=odbc_result($clanr, 1); 
    if ($clan == '') { 
        $clan = 'Yok'; 
    } 
    $sira++; 

?> 

<? 


$tablo_2 = ' 

          <tr class="textwhite"> 
            <td align="center"><font color="#990000">'.$sira.'</font></td> 
     
            <td align="center"><a href="index.php?sayfa=userdetay&karakter='.$user.'"><font color="#990000">'.$user.'</a></td> 
            <td align="center"><font color="#990000">'.$level.'</font></td> 
               
                   
                     
<td align="center"><font color="#990000">'.number_format($np).'</font></td>                       
<td align="center"><font color="#990000">'.number_format($aylik).'</font></td> 
          </tr> 
       
'; 
echo $tablo_2; 
} 

?> 
    </table></td> 
  </tr> 
</table> 
</body> 
</html> 
<? 
                     
                     
                     
                     
                     
                    } 

    } 

?>

Kod:
<?php //Cimmy-Ah1CxM Tarafindan yeniden yazıldı..

ob_start(); 
session_start(); 

$dns_Adi = "KN_Online"; //Db Adınız
$dbuser = "cem"; //Database güvenlik adi
$dbpass = "cimmy"; //database güvenlik şifresi

$conn = odbc_connect("$dns_Adi","$dbuser","$dbpass") or die ("Veri Tabanı Bulunamadı.");

?>  

<center>  <a href="gunluk.php"> Ortak Gunluk Siralama </a> | <a href="?irk=hmn"> Human Gunluk Siralama </a> | <a href="?irk=krs"> Karus Gunluk Siralama </a> 

<br /><br />Hergun Saat 24:00'da resetlenir.<br /><br /> 

                
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" /> 
<title>3nqiN Günlük NP Sıralaması</title> 
<style>
body{
  font-weight:bold;
  font-family: Geneva, Arial, Helvetica, sans-serif;
}
a,a:hover{
  text-decoration:none;
  color:orange;
}

#Tablo {
Width:520px;
border-spacing:0;
border-padding:0; 
border:1px solid black;
}

#Tablo .baslik{
Height:20px;
background:orange;
border:1px solid black;
}
#Tablo td{
color: #990000;
border:1px solid black;
}
.textwhite:hover{
  background:grey;
}

</style>
</head> 
  
<?php

$irkg = $_GET['irk']; 

if ($irkg == '') { 
     
     $irkgunluk = "ORTAK"; 
      
}elseif ($irkg == 'hmn') { 
         
        $irkgunluk = "HUMAN"; 
        $irks = " Where Nation = '2' "; 
         
}elseif ($irkg == 'krs') { 
         
        $irkgunluk = "KARUS"; 
        $irks = " Where Nation = '1' "; 
         
}else { 
        $irkgunluk = "ORTAK"; 
             
} 

                 

  function GNation($nation) 
    { 
    if ($nation == 1) { 
        $nation = '<img src="http://www.**********.com/imgs/karus.gif">'; 
    } elseif ($nation == 2) { 
        $nation = '<img src="http://www.**********.com/imgs/elmo.gif">'; 
    } 
      return $nation; 
    } 
    echo'<table id="Tablo">';     

$results=odbc_exec($conn,"SELECT TOP 50 strUserID, Level, Nation, Class, Knights, Loyalty, GunlukLoyalty strCharID FROM USERDATA $irks ORDER  BY GunlukLoyalty DESC, LEVEL DESC"); 
$sira = 0; 
echo ' 
  <tr class="Baslik"> 
    <td align="center">Sıra</td> 
    <td align="center">Karakter Adı </td> 
    <td align="center">Level</td> 
    <td align="center">National Point</td>   
    <td align="center">Gunluk NP</td> 
  </tr> 
';  
while (odbc_fetch_row($results)) { 
    $user = odbc_result($results,1);  
    $np = odbc_result($results, 6); 
    $aylik = odbc_result($results, 7); 
    $level = odbc_result($results, 2); 
    $clan = odbc_result($results, 5); 
    $clannm = odbc_result($results, 5); 
        $clanr=odbc_exec($conn,"SELECT IDName FROM KNIGHTS WHERE IDNum = '$clan'"); 
    $clan=odbc_result($clanr, 1); 
    if ($clan == '') { 
        $clan = 'Yok'; 
    } 
    $sira++; 


echo ' 
          <tr class="textwhite"> 
            <td align="center">'.$sira.'</td> 
            <td align="center">'.$user.'</td> 
            <td align="center">'.$level.'</td>                    
            <td align="center">'.number_format($np).'</td>                       
            <td align="center">'.number_format($aylik).'</td> 
          </tr>';
} 
echo '</table>';
?> 
</body> 
</html>
Yukarıdaki Kodu gunluk.php Olarak Kayıt Ediniz


Servera K Simgesi Ekleme

Bu kod ile birlikte hem elmorad hemde karusta sıralamada son 6 kişi yani ırk olarak 12 kişi de K simgesi çıkar. Patche gerek yoktur.Clientlerde K simgesinin symbolu bulunmaktadir.

Sadece 6 + 6 = 12 kişide K simgesi gösterir. Bunu artırabilirsiniz. Ama 12 kişi gayet güzel bir sistemdir.

Vereceğim kodu QA = Query Analyzer'e uygulamanız yeterlidir.


Kod:
update USER_KNIGHTS_RANK set strName = 'Training Knight' where shIndex = 45
update USER_KNIGHTS_RANK set strName = 'Training Knight' where shIndex = 46
update USER_KNIGHTS_RANK set strName = 'Training Knight' where shIndex = 47
update USER_KNIGHTS_RANK set strName = 'Training Knight' where shIndex = 48
update USER_KNIGHTS_RANK set strName = 'Training Knight' where shIndex = 49
update USER_KNIGHTS_RANK set strName = 'Training Knight' where shIndex = 50

İyi günlerde kullanın.
NOT : Bazı databaselere göre değişkenlik yapar. Buda K simgesinin çıkmasını engelleyebilir.


Copyright Fatih All Reserved.


Süreli Ban/Mute Sistemi

ANLATIM

Manuel olarak bireysel ban/mute aynı şekilde 0 değeriyle oynarsanız banladıgınız veya mutelediğiniz kişi otomatikmen vereceğiniz değere mutakib kalır.

update userdata set Muteday = '0' where struserid = 'Nick'
update userdata set Banday = '0' where struserid = 'Nick'

Hazır hali ; aşağıdaki 0 değeriyle oynarsanız her banladıgınız kişi otomatikmen vereceğiniz değere mutakib kalır.

UPDATE USERDATA SET Muteday=0
UPDATE USERDATA SET BanDay=0
(0,olan kısmı istediğiniz numarayı verirseniz o kadar gün müteli kalır.)


Kod:
EXEC SURELI_BAN @AccountID
EXEC SURELI_MUTE @strUserID
Yukaridaki iki kodu load_user_data ekleyiniz.

Kod:
ALTER TABLE USERDATA

Kod:
ADD MuteDate datetime NULL GO ALTER TABLE USERDATAADD MuteDay smallint NULL DEFAULT(0)GO  
UPDATE USERDATA SET MuteDay=0

Kod:
ALTER TABLE USERDATA

Kod:
  ADD BanDate datetime NULL  GO   ALTER TABLE USERDATA  ADD BanDay smallint NULL DEFAULT(0)GO  
UPDATE USERDATA SET BanDay=0

Kod:
USE [Kn_online] GO /****** Object: StoredProcedure [dbo].[SURELI_BAN] KO-CUCE XPECTED 2012/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO -- Yapan: AKI -- 2011.01.20 -- www.pvpke.com CREATE PROCEDURE [dbo].[SURELI_BAN] @AccountID varchar(21) AS DECLARE @BanDayFinish datetime, @TIME datetime, @Day smallint DECLARE @BanDay smallint, @Authority tinyint DECLARE @UserID1 char(21), @UserID2 char(21), @UserID3 char(21) SET @UserID1=(SELECT strCharID1 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID AND strCharID1 is not null) SET @UserID2=(SELECT strCharID2 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID AND strCharID2 is not null) SET @UserID3=(SELECT strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID AND strCharID3 is not null) SELECT @Authority=Authority, @BanDay = BanDay, @BanDayFinish = BanDate FROM USERDATA Where strUserId=@UserID1 SELECT @Authority=Authority, @BanDay = BanDay, @BanDayFinish = BanDate FROM USERDATA Where strUserId=@UserID2 SELECT @Authority=Authority, @BanDay = BanDay, @BanDayFinish = BanDate FROM USERDATA Where strUserId=@UserID3 IF @Authority=255 and @BanDay >0 and @BanDay <31 BEGIN SET @TIME = getdate() SET @Day = datediff( DAY, @TIME,@BanDayFinish) IF @Day < 30 BEGIN UPDATE USERDATA SET BanDay=@Day WHERE Authority =255 and strUserId=@UserID1 or Authority =255 and strUserId=@UserID2 or Authority =255 and strUserId=@UserID3 END END ELSE IF @BanDay =0 AND @Authority=255 BEGIN UPDATE USERDATA SET BanDate=getdate()+29, BanDay=30 WHERE Authority =255 and strUserId=@UserID1 or Authority =255 and strUserId=@UserID2 or Authority =255 and strUserId=@UserID3 END ELSE IF @BanDayFinish < GETDATE() BEGIN UPDATE USERDATA SET BanDay=0,Authority=1, BanDate = null WHERE Authority =255 and strUserId=@UserID1 or Authority =255 and strUserId=@UserID2 or Authority =255 and strUserId=@UserID3 END Update USERDATA set BanDate = GETDATE()+29 , BanDay =30 where Authority=255 and BanDate is null update USERDATA set Authority=1, BanDay=0,BanDate=null where BanDate<GETDATE() and Authority=255

Kod:
USE [kn_online]

Kod:
GO/****** Object:  StoredProcedure [dbo].[SURELI_MUTE]    KO-CUCE XPECTED 2012/SET ANSI_NULLS OFFGOSET QUOTED_IDENTIFIER ONGO-- Yapan: AKI-- 2011.01.20-- www.pvpke.comCREATE PROCEDURE [dbo].[SURELI_MUTE]@strUserID varchar(21)ASdeclare @MuteDayFinish datetime, @TIME datetime, @Day smallintdeclare @MuteDay smallint, @Authority tinyint SELECT @Authority=Authority, @MuteDay = MuteDay, @MuteDayFinish = MuteDate FROM USERDATA WHERE strUserId = @strUserID IF @Authority=11 and @MuteDay >0 and @MuteDay <8 BEGINSET @TIME = getdate()SET @Day = datediff( DAY, @TIME,@MuteDayFinish)  IF @Day < 7  BEGIN  UPDATE USERDATA SET MuteDay=@Day  WHERE strUserId = @strUserID  END ENDELSE IF @MuteDay =0 AND @Authority=11 BEGIN UPDATE USERDATA SET MuteDate=getdate()+7, MuteDay=7 WHERE strUserId = @strUserID ENDELSE   IF @MuteDayFinish < GETDATE()  BEGIN UPDATE USERDATA SET MuteDay=0,Authority=1, MuteDate = null  WHERE strUserId = @strUserIDENDUpdate USERDATA set MuteDate = GETDATE()+7 , MuteDay =7 where Authority=11 and MuteDate is null 
update USERDATA set Authority=1, MuteDay=0,MuteDate=null where MuteDate<GETDATE() and Authority=11

.

Koxp Ara

-->