Jump to content
  • 0

Stop the clock event


joyy95

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.09
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/28/23
  • Last Seen:  

This script by original PoringKing ,  it never auto go for next round or even i press the NPC also nothing... Just like 1 game only and need to keep press start again from 2minutes

 

Quote

//================================================Name======================================================
                                    // Stop the clock (Official Release Name)
//===============================================Version====================================================
//                                                  1.1 
//===============================================Author=====================================================
//                     ____ _____  ______  __ __   __  _______    __   _____ __   __  _______
//                    |  __ \ _  \|  __  \|  |  \ |  |/  ___  \  |  | /  /  |  \ |  |/  ___  \
//                    | |__| | \  \ |__|  |  |   \|  |  |  _\_/  |  |/  /|  |   \|  |  |  _\_/
//                    |   __/   | |      /|  |       |  | |_  \  |     | |  |    |  |  | |_  \
//                    |  |\  \_/  /  |\  \|  |  |\   |   \_/  |  |  |\  \|  |  |\   |   \_/  |
//                    |__| \_____/|__| \__\__|__| \__|\______/   |__| \__\__|__| \__|\______/
//----------------------------------------Script Last Update 2020-------------------------------------------
//==============================================Changelog===================================================
                                    // 1.0 *
                                    //        - Initial Release
                                    // 1.1
                                    //        - Maximize script
                                    //        - Fix some dialog of NPC
                                    //        - Remove timer that cause error
                                    //        - Remove all error from Latest rAthena

//==========================================================================================================
payon,157,235,4    script    Stop the Clock    925,{


if(.game == 1 && stopped != 1)    {
    set stopped, 1;
    set @stopped, .i;
    message strcharinfo(0), "You stopped the clock at "+@stopped+".";
    if(.lowest > @stopped)    {
        set .lowest, @stopped;
        set .winner$, strcharinfo(0);
        }
    end;
}
else if(.game == 1)    {
    message strcharinfo(0), "You already stopped the clock.";
    end;
    }


if(.game2 == 1 && stopped2 != 1)    {
    set stopped2, 1;
    set @stopped2, .i;
    message strcharinfo(0), "You stopped the clock at "+@stopped2+".";
    if(.lowest2 > @stopped2)    {
        set .lowest2, @stopped2;
        set .winner2$, strcharinfo(0);
        }
    end;
}
else if(.game2 == 1)    {
    message strcharinfo(0), "You already stopped the clock.";
    end;
    }


set .name$, "[Event Manager]";
set .menu$, "Information:Price:Leave";


if(strcharinfo(0) == .winner$)    {
    set stopped, 0;
    mes .name$;
    mes "Here you get your price.";
    mes "Your Price is:";
    mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000";
    getitem $prize_id, $prize_amount;
    set .winner$, "";
    close;
    }

if(strcharinfo(0) == .winner2$)    {
    set stopped, 0;
    mes .name$;
    mes "Here you get your price.";
    mes "Your Price is:";
    mes "^ff00005 Bloody Branch^000000";
    getitem 12103,5;
    set .winner2$, "";
    close;
    }

if(stopped == 1)    {
    set stopped, 0;
    mes .name$;
    mes "You activated your char for the next round.";
    close;
    }

if(stopped2 == 1)    {
    set stopped2, 0;
    mes .name$;
    mes "You activated your char for the next round.";
    close;
    }

if    (getgmlevel() > 90)    {

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave:Start Event:Enter Price"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Price is:";
    mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000";
    close;

    case 3:
    close;

    case 4:
    sleep2 100;
    close2;
    goto l_start;
    end;

    case 5:
    mes .name$;
    mes "Enter the item id of the prize:";
    input $prize_id;
    next;
    mes .name$;
    mes "Enter the amount if items the winner will recieve:";
    input $prize_amount;
    next;
    mes .name$;
    mes "The price id is: ^ff0000"+$prize_id+"^000000";
    mes "^008000("+getitemname($prize_id)+")^000000.";
    mes "The amount is: ^ff0000"+$prize_amount+"^000000.";
    close;
    }
}

if    (getgmlevel() >= 1)    { 

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave:Start Event"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Default Price is:";
    mes "^ff0000 5 Bloody Branch ^000000";
    close;

    case 3:
    close;

    case 4:
    sleep2 100;
    close2;
    goto l_start2;
    end;
}
    }

if    (getgmlevel() == 0)    { 

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Default Price is:";
    mes "^ff0000 5 Bloody Branch ^000000";
    close;

    case 3:
    close;

}
    }

l_start2:

announce "[Stop the clock Manager]: We are going to start an Stop the Clock Event in 2 Minutes at Payon!",bc_all;
sleep2 5000;
announce "To win, you need to have click the closest value to 0, but at least below 50.",bc_all;
sleep2 55000;
announce "[Stop the clock Manager]: We are going to start in 1 Minute!",bc_all;
sleep2 30000;
announce "[Stop the clock Manager]: We are going to start in 30 Seconds!",bc_all;
sleep2 20000;
announce "[Stop the clock Manager]: Hurry up! Event starts in 10 Seconds!",bc_all;
sleep2 5000;
announce "[Stop the clock Manager]: Get Ready only 5 seconds left!",bc_all;
sleep2 5000;
announce "To win, you need to have click the closest value to 0, but at least below 50.",bc_all;
sleep2 5000;
announce "[Stop the clock Manager]: START!!!",bc_all;
sleep2 5000;


set .winner2$, "";
set .game2, 1;
set .lowest2, 1000;

for(set .i, 1000; .i > 300;set .i, .i - 100)    {
        announce ":: "+.i+" ::",bc_blue|bc_npc;
        misceffect 377;
        sleep2 1000;
        }

for(set .i, 300; .i > 50;set .i, .i - 10)    {
        announce ":: "+.i+" ::",bc_blue|bc_npc;
        misceffect 377;
        sleep2 100;
        }

for(set .i, 50; .i > 0;set .i, .i - 1)    {
        announce ":: "+.i+" ::",bc_blue|bc_npc;
        misceffect 377;
        sleep2 10;
        }

set .game2, 0;

if(.winner2$ == "")    {
    announce "Nobody hit the clock at the right moment. There is no winner.",bc_blue;
    end;
    }
announce .winner2$+" won Stop the Clock. He stopped it at "+.lowest2+".",bc_blue;
sleep2 5000;
announce .winner2$+"Please talk to me to get your price.",bc_blue;
sleep2 5000;
announce "To activate your char for the next round, please talk to me, too.",bc_all;
end;


l_start:

announce "[Stop the clock Manager]: We are going to start an Stop the Clock Event in 2 Minutes at Payon!",bc_all;
sleep2 5000;
announce "To win, you need to have click the closest value to 0, but at least below 50.",bc_all;
sleep2 55000;
announce "[Stop the clock Manager]: We are going to start in 1 Minute!",bc_all;
sleep2 30000;
announce "[Stop the clock Manager]: We are going to start in 30 Seconds!",bc_all;
sleep2 20000;
announce "[Stop the clock Manager]: Hurry up! Event starts in 10 Seconds!",bc_all;
sleep2 5000;
announce "[Stop the clock Manager]: Get Ready only 5 seconds left!",bc_all;
sleep2 5000;
announce "To win, you need to have click the closest value to 0, but at least below 50.",bc_all;
sleep2 5000;
announce "[Stop the clock Manager]: START!!!",bc_all;
sleep2 5000;

set .winner$, "";
set .game, 1;
set .lowest, 1000;

for(set .i, 1000; .i > 300;set .i, .i - 100)    {
        announce ":: "+.i+" ::",bc_blue|bc_npc;
        misceffect 377;
        sleep2 1000;
        }

for(set .i, 300; .i > 50;set .i, .i - 10)    {
        announce ":: "+.i+" ::",bc_blue|bc_npc;
        misceffect 377;
        sleep2 100;
        }

for(set .i, 50; .i > 0;set .i, .i - 1)    {
        announce ":: "+.i+" ::",bc_blue|bc_npc;
        misceffect 377;
        sleep2 10;
        }

set .game, 0;

if(.winner$ == "")    {
    announce "Nobody hit the clock at the right moment. There is no winner.",bc_blue;
    end;
    }
announce .winner$+" won Stop the Clock. He stopped it at "+.lowest+".",bc_blue;
sleep2 5000;
announce .winner$+"Please talk to me to get your price.",bc_blue;
sleep2 5000;
announce "To activate your char for the next round, please talk to me, too.",bc_all;

end;


}

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

You can use the time labels:

OnClock<hour><minute>:
OnMinute<minute>:
OnHour<hour>:
On<weekday><hour><minute>:
OnDay<month><day>:

This will execute when the server clock hits the specified date or time. Hours
and minutes are given in military time. ('0105' will mean 01:05 AM). Weekdays
are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 to 31.
Remember the zero.

This would run the event every 24 hours at 14 o'clock:

OnHour14:
  goto l_start;
  end;
Edited by Winterfox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.09
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/28/23
  • Last Seen:  

I mean it never turn next round not the game start...... 

Edited by joyy95
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

4 hours ago, joyy95 said:

I mean it never turn next round not the game start...... 

alredy check the script, the first and second event must be start by GM  ID

first event must start by GM above level 90

if    (getgmlevel() > 90)    {

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave:Start Event:Enter Price"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Price is:";
    mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000";
    close;

    case 3:
    close;

    case 4:
    sleep2 100;
    close2;
    goto l_start;
    end;

    case 5:
    mes .name$;
    mes "Enter the item id of the prize:";
    input $prize_id;
    next;
    mes .name$;
    mes "Enter the amount if items the winner will recieve:";
    input $prize_amount;
    next;
    mes .name$;
    mes "The price id is: ^ff0000"+$prize_id+"^000000";
    mes "^008000("+getitemname($prize_id)+")^000000.";
    mes "The amount is: ^ff0000"+$prize_amount+"^000000.";
    close;
    }
}

second event must start by GM above or equal level 1
 

if    (getgmlevel() >= 1)    { 

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave:Start Event"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Default Price is:";
    mes "^ff0000 5 Bloody Branch ^000000";
    close;

    case 3:
    close;

    case 4:
    sleep2 100;
    close2;
    goto l_start2;
    end;
}
    }

normal player only can get event information, show detail price, or leave

if    (getgmlevel() == 0)    { 

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Default Price is:";
    mes "^ff0000 5 Bloody Branch ^000000";
    close;

    case 3:
    close;

}
    }

 

to enable second event remove try remove script for normal player

and change

if    (getgmlevel() >= 1)    { 

into

if    (getgmlevel() == 0)    { 

 

Edited by hendra814
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.09
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/28/23
  • Last Seen:  

7 minutes ago, hendra814 said:

alredy check the script, the first and second event must be start by GM  ID

first event must start by GM above level 90

if    (getgmlevel() > 90)    {

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave:Start Event:Enter Price"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Price is:";
    mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000";
    close;

    case 3:
    close;

    case 4:
    sleep2 100;
    close2;
    goto l_start;
    end;

    case 5:
    mes .name$;
    mes "Enter the item id of the prize:";
    input $prize_id;
    next;
    mes .name$;
    mes "Enter the amount if items the winner will recieve:";
    input $prize_amount;
    next;
    mes .name$;
    mes "The price id is: ^ff0000"+$prize_id+"^000000";
    mes "^008000("+getitemname($prize_id)+")^000000.";
    mes "The amount is: ^ff0000"+$prize_amount+"^000000.";
    close;
    }
}

second event must start by GM above or equal level 1
 

if    (getgmlevel() >= 1)    { 

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave:Start Event"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Default Price is:";
    mes "^ff0000 5 Bloody Branch ^000000";
    close;

    case 3:
    close;

    case 4:
    sleep2 100;
    close2;
    goto l_start2;
    end;
}
    }

normal player only can get event information, show detail price, or leave

if    (getgmlevel() == 0)    { 

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000.";
next;
switch(select("Information:Price:Leave"))    {
    
    case 1:
    mes .name$;
    mes "^ff0000Stop the Clock^000000";
    mes "is a game where you need to";
    mes "click on me exactly when the counter reached 0.";
    next;
    mes .name$;
    mes "It counts down from ^0080001000^000000 to ^ff00000^000000.";
    next;
    mes .name$;
    mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000.";
    next;
    mes .name$;
    mes "The winner will recieve a prize.";
    mes "^ff0000Don't forget to talk to me after the Event is over,";
    mes "to reset your counter to take part on the next event.^000000";
    close;

    case 2:
    mes .name$;
    mes "The Default Price is:";
    mes "^ff0000 5 Bloody Branch ^000000";
    close;

    case 3:
    close;

}
    }

 

Not the problem, that is myself edit for easy for me setting.. but right now even the game finish 1 round it never continue for second round game... 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

7 minutes ago, joyy95 said:

Not the problem, that is myself edit for easy for me setting.. but right now even the game finish 1 round it never continue for second round game... 

to enable second event remove try remove script for normal player

and change

if    (getgmlevel() >= 1)    { 

into

if    (getgmlevel() == 0)    { 
Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...