Jump to content
Sign in to follow this  
Graf

Новый Год в Пиратии 2019

Recommended Posts

Новый Год в Пиратии 2019

Взято с архива. Вроде с Roto Pko

Заходим в Server/resource/script/calculate/variable.lua и прописываем:

---Массив феерверков
    FireWorks = {}
    FireWorks[1] = 839
    FireWorks[2] = 838
    FireWorks[3] = 366
    FireWorks[4] = 369
    FireWorks[5] = 363

Далее заходим в Server/resource/script/calculate/functions.lua и находим функцию cha_timer. В неё вписываем:
   

 local i = math.random(1,5)
    local month = os.date ("%m")
    local day = os.date ("%d")
    local hour = os.date ("%H")
    local minute = os.date ("%M")
    local second = os.date ("%S")
    local monthnum = tonumber(month)
    local daynum = tonumber(day)
    local minutenum = tonumber(minute)
    local hournum = tonumber(hour)
    local secondnum = tonumber(second)
--Если сейчас 31 декабря и время 23:59, то
    if monthnum == 12 and daynum == 31 and hournum == 23 and minutenum == 59 then
    --На 50 секунде выводим..
        if secondnum == 50 then
            BickerNotice(role, "До Нового Года: 10! ")
        end
    --На 51 секунде выводим..
        if secondnum == 51 then
                BickerNotice(role, "До Нового Года: 9! ")
            end
        if secondnum == 52 then
                BickerNotice(role, "До Нового Года: 8! ")
                end
        if secondnum == 53 then
                BickerNotice(role, "До Нового Года: 7! ")
                end
        if secondnum == 54 then
                BickerNotice(role, "До Нового Года: 6! ")
                end
        if secondnum == 55 then
                BickerNotice(role, "До Нового Года: 5! ")
                end
        if secondnum == 56 then
                BickerNotice(role, "До Нового Года: 4! ")
                end
        if secondnum == 57 then
                BickerNotice(role, "До Нового Года: 3! ")
                end
        if secondnum == 58 then
                BickerNotice(role, "До Нового Года: 2!")
                end
        if secondnum == 59 then
                BickerNotice(role, "До Нового Года: 1!")
                end
 
    end
    if monthnum == 01 and daynum == 01 and hournum == 00 and minutenum == 00 then
            if secondnum == 00 then           
                BickerNotice(role, "С Новым Годом, игроки, Легенды о Ледяном драконе!!! Уиии 2020!!")
                if(IsPlayer(role)==1) then        --На всех персонажах
                    PlayEffect(role, FireWorks[i])    --Будет этот эффект
                  GiveItem(role, 0, XXXX, xx, 4)    --И выдача этого предмета(xxxx) в количестве (xx)
                end
   
        end
    end

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...