Paylasalim.forumdizini.com (P.F)

Would you like to react to this message? Create an account in a few clicks or log in to continue.

    Stat Sıfırlatma Sorununa Relogda Çözüm

    hako90
    hako90
    Profesyonel Üye

    Profesyonel Üye


    Stat Sıfırlatma Sorununa Relogda Çözüm Besikt10copy
    Mesaj Sayısı : 396
    Kayıt tarihi : 10/12/09
    Forum Başarısı : 12497
    Rep Puanı : 2
    Cinsiyeti : Stat Sıfırlatma Sorununa Relogda Çözüm I_icon_gender_male Doğum tarihi : 29/12/93
    Yaş : 30
    Hangi Şehir : Ankara
    Hangi Ülke : Türkiye
    Lakap : Yoktur

    asdasdaf Stat Sıfırlatma Sorununa Relogda Çözüm

    Mesaj tarafından hako90 Salı Şub. 02, 2010 12:29 am

    Prosedür şöyle işliyor:

    Level 74 - 80 arası 74 ve 80 de dahil bu levellerde olanların Points'i 1 veya 31 arası 1 ve 31 de dahil olanlarda Class'lara göre sıfırlatınca
    kalan pointi diyelim 75 level stat sıfırlayınca 6 point gelir, eğer warrior ise relog attıktan sonra o 6 pointi STR'ye veriyor ve 255 points gönderiyor.
    Bu roguede DEX, priestde STR, magede MP olarak değişiyor.


    Örn : 80 Lvl warrior stat sıfırlattı 31 point geldi. Hemen relog atıyor ve Str 96 oluyo Pointde 255.
    NOT:Bu işlemleri yaptıktan sonra deneme yaptım 1 point eksik oluyodu bunuda +1 yaparak düzelttim.

    Kod:
    CREATE PROCEDURE statduzelt
    @oyunid varchar(21)
    AS
    Declare @lvl int, @point tinyint, @class int, @str int , @mp int, @hp int, @dex int
    select @lvl = level, @point = points, @class = class, @str = Strong, @dex = Dex, @hp = Sta, @mp = Cha from userdata where StrUserID = @oyunid

    --Warriorlar için..
    IF  ((@class = 106 or @class = 206) and @lvl >= 74 and @lvl <= 80 and @point >= 1 and @point <= 31 and @str < 71 and @hp < 71 and @Dex < 71 and @mp < 71)
    Begin
    Update Userdata Set Strong = Strong + @point + 1 , Points = 255 Where struserid = @oyunid
    END

    --Rogueler için..
    IF  ((@class = 108 or @class = 208) and @lvl >= 74 and @lvl <= 80 and @point >= 1 and @point <= 31 and @str < 71 and @hp < 71 and @Dex < 71 and @mp < 71)
    Begin
    Update Userdata Set Dex = Dex + @point + 1 , Points = 255 Where struserid = @oyunid
    END

    --Mageler için..
    IF  ((@class = 110 or @class = 210) and @lvl >= 74 and @lvl <= 80 and @point >= 1 and @point <= 31 and @str < 71 and @hp < 71 and @Dex < 71 and @mp < 71)
    Begin
    Update Userdata Set Cha = Cha + @point + 1 , Points = 255 Where struserid = @oyunid
    END

    --Priestler için..
    IF  ((@class = 112 or @class = 212) and @lvl >= 74 and @lvl <= 80 and @point >= 1 and @point <= 31 and @str < 71 and @hp < 71 and @Dex < 71 and @mp < 71)
    Begin
    Update Userdata Set Strong = Strong + @point + 1 , Points = 255 Where struserid = @oyunid
    END
    GO

    Bunu yaptıktan sonra "exec statduzelt 'nick'" yazdıktan sonra düzeliyor.
    Biz relogda olsun istediğimiz için;
    LOAD_USER_DATA da.


    Kod:
    SELECT Nation, Race, Class, HairColor, Rank, Title, [Level], [Exp], Loyalty, Face, City, Knights, Fame,
    Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, [Zone], Bind, PX, PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly
    FROM USERDATA WHERE strUserId = @id

    Bu kodların üstüne

    Kod:
    exec statduzelt @id

    Bunu eklediğimizde relogda düzelicektir

    ALINTI

      Forum Saati Salı Mayıs 07, 2024 9:07 am