Reset system

Results 1 to 14 of 14
  1. #1
    Valued Member Hell S Ing is offline
    MemberRank
    Sep 2013 Join Date
    UkraineLocation
    117Posts

    sad Reset system

    I need the reset system for ********* 97D+99i version server files.
    In one server i see the system like that:
    for first reset need:
    1 - 350 lvl
    (2 - 192 Mln zen)
    (3 - 1 Jewel of Creation)
    OR
    1 - 350 Lvl
    2 - 1 Stone
    For second reset:
    1 - 350 lvl
    (2 - 198 Mln zen)
    (3 - 2 Jewel of Creation)
    OR
    1 - 350 Lvl
    2 - 1 Stone
    .........................................................
    Then for example for 5 reset:
    1 - 350 lvl
    (2 - 222 Mln zen)
    (3 - 5 Jewel of Creation)
    OR
    1 - 350 mln zen
    2 - Stone

    There have reset time. Only in that time can reset chars. and reset be automatically.
    For example:
    in 17:00 reset time. I`ll be 350 and needed items on my char. Exit from game on 16:58. Then waiting for 3-4 min. And entering character is reseted.

    Sorry for my bad english.

    Any one can help me to create this script for my 97D version server?
    Thanks all.


  2. #2

    Re: Reset system

    Tht it's a work for a programer :D so if you looking for a programer to do that will be hard to find one to improve the Restart System for you and will be impossile to do'it if you don't have source code ... And will be not free i think

  3. #3
    Valued Member Hell S Ing is offline
    MemberRank
    Sep 2013 Join Date
    UkraineLocation
    117Posts

    Re: Reset system

    Quote Originally Posted by Enginer View Post
    Tht it's a work for a programer :D so if you looking for a programer to do that will be hard to find one to improve the Restart System for you and will be impossile to do'it if you don't have source code ... And will be not free i think
    i know about this. But how do this or who can do this?
    Or can do this on website?

    - - - Updated - - -

    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS OFF
    GO

    /*
    Скрипт
    */
    Create PROCEDURE AUTORESET_By_SHAREDNOOB
    As
    Begin
    Set nocount on
    Set dateformat dmy --устанавливаем формат даты

    Declare --Объявляем переменные
    @ItemCount int, --количество
    @GroupID int, --группа вещи
    @GroupIDHex varbinary(10),
    @ItemID int, --номер вещи в групе,
    @ItemIDHex varbinary(10),
    @ResetLevel int, --левел ресета
    @Npp int,
    @NppMax int,
    @In int,
    @InMax int,
    @Inventory varbinary(8000),
    @PerInv varchar(8000),
    @PerInvTMP varchar(8000),
    @CharId varchar(10),
    @StartPoint int

    --Авторесет пройдет за 10 вещей
    Set @ItemCount=10
    --Авторесет пройдет за джолы
    Set @GroupID=14
    Set @ItemID=16
    --Левел ресета
    Set @ResetLevel=350

    --Переведенные в HEX значения
    set @GroupIDHex=dbo.HexStrToVarBin(master.dbo.fn_varbintohexstr(cast(@GroupID*16 as varbinary(1))) )
    set @ItemIDHex=dbo.HexStrToVarBin(master.dbo.fn_varbintohexstr(cast(@ItemID as varbinary(1))) )
    -- select @GroupIDHex GroupIDHex, @ItemIDHex ItemIDHex

    --select '1' '1'
    -----====================================================================
    --1) Находим чаров которые претендуют на ресет
    -- То есть у которых подходящий левел (в данном случае 350) и которые находятся в оффлайне
    Declare @TLS table (CharID varchar(10), inventory varbinary(8000), npp int identity(1,1))
    Insert into @TLS (CharID, inventory)
    select name, inventory
    FROM Character c
    JOIN MEMB_STAT m ON c.AccountID = m.memb___id
    COLLATE Latin1_general_CI_AI
    WHERE (clevel>=@ResetLevel) and (ConnectStat = 0)
    --если таких нет то выходим из процедуры
    if (Select count(*) from @TLS)=0 Goto EX

    --2) Далее раскрываем все что есть в персонал шопе
    Declare @PS table (CharID varchar(10), ItemBin Varbinary(1000), ItemId int, Ready int, npp int identity(1,1))
    set @NppMax=(select max(npp) from @TLS)
    set @InMax=32
    Set @Npp=0

    --select '2' '2'

    While @Npp<>@NppMax
    begin
    Set @Npp=@Npp+1
    Set @In=0
    Set @StartPoint=-15
    Select @CharId=CharId,
    @Inventory=substring(Inventory, 1217, 512) --из инвентаря выбрали только персонал шоп для анализа
    from @TLS
    where npp=@Npp
    While @In<>@InMax
    begin
    Set @In=@In+1
    Set @StartPoint=@StartPoint+16
    Insert into @PS (CharID, ItemBin, ItemId, Ready)
    select @CharID, substring(@Inventory, @StartPoint, 16), @In, 0
    end

    end

    --После распаковки весчей в персонал шопе находим среди них джолы
    Update p set
    ready=1
    from @PS p
    where substring(ItemBin,1,1)=@ItemIDHex
    and substring(ItemBin,10,1)=@GroupIDHex

    --Находим тех по кому действительно нужно сделать ресет
    --то есть тех у кого есть заданоое количестко указанного шмота
    Declare @TRES table (CharId varchar(10), inventory varbinary(8000), npp int identity (1,1))
    insert into @TRES (CharId)
    select CharId
    from @PS
    where ready=1
    group by CharId
    having sum(1)>=@ItemCount

    --Если нет таких у кого нужное количество то на выход
    if (Select count(*) from @TRES)=0 Goto EX

    --select '3' '3'
    --Далее Нужно очистить весчи из персонал шопа у тех кому надо
    --Причем взять именно то количество вещей сколько надо и не больше !
    set @NppMax=(select max(npp) from @TRES)
    Set @Npp=0
    While @Npp<>@NppMax
    begin
    Set @Npp=@Npp+1
    Set @In=0

    Select @CharId=CharId
    from @TRES
    where npp=@Npp

    While @In<>@ItemCount
    begin
    Set @In=@In+1
    Set @StartPoint=(select top 1 npp
    from @PS
    where CharId=@CharId
    and ready=1
    and ItemBin<>0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    order by ItemId)
    Update p set
    ItemBin=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    from @PS p
    where npp=@StartPoint
    end

    end

    select '4' '4'

    --Далее Нужно собрать всю строку inventory во едино для каждого из ресетных чаров
    set @NppMax=(select max(npp) from @TRES)
    Set @Npp=0
    select @Npp Npp, @NppMax NppMax
    While @Npp<>@NppMax
    begin
    Set @Npp=@Npp+1
    Set @In=0

    Select @CharId=CharId
    from @TRES
    where npp=@Npp

    Set @PerInv=''
    --select 'цикл 1' 'цикл 1'
    While @In<>32
    begin
    Set @In=@In+1
    Set @PerInvTMP=master.dbo.fn_varbintohexstr(
    (select ItemBin from @PS where CharId=@CharId and ItemId=@In))
    Set @PerInv=@PerInv+substring(@PerInvTMP,3,32)
    -- select @PerInvTMP
    --select 'цикл 2' 'цикл 2'
    end

    Select @Inventory=Inventory
    from @TLS
    where CharId=@CharId

    Set @PerInvTMP=master.dbo.fn_varbintohexstr(substring(@Inventory, 1, 1216))
    Set @PerInvTMP=@PerInvTMP+@PerInv

    -- select @PerInvTMP
    Update t set
    Inventory=dbo.HexStrToVarBin(@PerInvTMP)
    from @TRES t
    where npp=@Npp
    end

    --И наконец то сбрасываем статы
    UPDATE c SET
    clevel= 1, --Уровень
    Experience= 0, --Експ
    -- Money=Money-100000000, --Ресер стоит 100000000 Зен
    Strength = Case when ((class = 0) OR (class = 1)) then 18 --DW SM
    when ((class = 16) OR (class = 17)) then 28 --DK BK
    when ((class = 32) OR (class = 33)) then 22 --Elf MElf
    when (class = 48 ) then 26 --MG
    when (class = 64) then 26 --DL
    End,

    Dexterity = Case when ((class = 0) OR (class = 1)) then 18 --DW SM
    when ((class = 16) OR (class = 17)) then 20 --DK BK
    when ((class = 32) OR (class = 33)) then 25 --Elf MElf
    when (class = 48 ) then 26 --MG
    when (class = 64) then 26 --DL
    End,

    Vitality = Case when ((class = 0) OR (class = 1)) then 15 --DW SM
    when ((class = 16) OR (class = 17)) then 25 --DK BK
    when ((class = 32) OR (class = 33)) then 20 --Elf MElf
    when (class = 48 ) then 26 --MG
    when (class = 64) then 26 --DL
    End,

    Energy = Case when ((class = 0) OR (class = 1)) then 30 --DW SM
    when ((class = 16) OR (class = 17)) then 10 --DK BK
    when ((class = 32) OR (class = 33)) then 15 --Elf MElf
    when (class = 48 ) then 26 --MG
    when (class = 64) then 26 --DL
    End,

    -- MagicList = NULL, --магии и скилы не горят
    MapNumber= Case when ((class = 0) OR (class = 1)) then 0 --DW SM
    when ((class = 16) OR (class = 17)) then 0 --DK BK
    when ((class = 32) OR (class = 33)) then 3 --Elf MElf
    when (class = 48 ) then 0 --MG
    when (class = 64) then 0 --DL
    End,

    MapPosX= Case when ((class = 0) OR (class = 1)) then 125 --DW SM
    when ((class = 16) OR (class = 17)) then 125 --DK BK
    when ((class = 32) OR (class = 33)) then 176 --Elf MElf
    when (class = 48 ) then 125 --MG
    when (class = 64) then 125 --DL
    End,

    MapPosY= Case when ((class = 0) OR (class = 1)) then 123 --DW SM
    when ((class = 16) OR (class = 17)) then 123 --DK BK
    when ((class = 32) OR (class = 33)) then 116 --Elf MElf
    when (class = 48 ) then 123 --MG
    when (class = 64) then 123 --DL
    End,

    PkLevel= 3,

    Resets = Resets+1,

    LevelUpPoint = Case when ((class = 0) OR (class = 1)) then 500 --DW SM
    when ((class = 16) OR (class = 17)) then 500 --DK BK
    when ((class = 32) OR (class = 33)) then 500 --Elf MElf
    when (class = 48 ) then 650 --MG
    when (class = 64) then 700 --DL
    End * (Resets + 1),
    inventory=t.inventory
    FROM Character c
    Inner join @TRES t on c.name=t.charid
    COLLATE Latin1_general_CI_AI

    --, PS varbinary(1000
    --select * from @TLS
    --select * from @PS
    --select * from @TRES

    EX:

    End

    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO
    This script for auto reset+item for reset. But Who can upgrade this for Reset time+auto reset+item or item

  4. #4
    Valued Member Hell S Ing is offline
    MemberRank
    Sep 2013 Join Date
    UkraineLocation
    117Posts

    Re: Reset system

    Any one can help me?

  5. #5
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

    Re: Reset system

    Write me PM or add me on skype.

  6. #6
    Valued Member Hell S Ing is offline
    MemberRank
    Sep 2013 Join Date
    UkraineLocation
    117Posts

    Re: Reset system

    Quote Originally Posted by jacubb View Post
    Write me PM or add me on skype.
    What is your skype sir?

  7. #7
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

    Re: Reset system

    Same as nickname here.

  8. #8
    Apprentice theguyontherun is offline
    MemberRank
    Dec 2007 Join Date
    21Posts

    Re: Reset system

    Hey good old sql; have you found an answer? I can help you out.

  9. #9
    Valued Member Hell S Ing is offline
    MemberRank
    Sep 2013 Join Date
    UkraineLocation
    117Posts

    Re: Reset system

    Quote Originally Posted by theguyontherun View Post
    Hey good old sql; have you found an answer? I can help you out.
    Oh its good how you can help me with it?

  10. #10
    Apprentice theguyontherun is offline
    MemberRank
    Dec 2007 Join Date
    21Posts

    Re: Reset system

    Sorry just saw your reply; Just give me the hex for JOC and I will make the script for you.(Want to make you do some of the work) :)

  11. #11
    Proficient Member m1nd3 is offline
    MemberRank
    Dec 2015 Join Date
    (local)Location
    175Posts

    Re: Reset system

    Hello guys, i'm looking for reset system, actually i have system, but my stats depends from resets, i want every month make all reset to 0, and stats make 30% less, maybe some one have like this? :)

  12. #12

    Re: Reset system

    @m1nd3 explain to @jacubb about it and he'll make it for you for some $

  13. #13
    Apprentice theguyontherun is offline
    MemberRank
    Dec 2007 Join Date
    21Posts

    Re: Reset system

    You know, never thought about charging for support. That's a great idea. :)

  14. #14

    Re: Reset system

    Sometimes you need to pay the price to step forward in life, that's same on internet life too.



Advertisement