Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script dice -1,{
- OnInit:
- .n$ = "[ Dice ]";
- disablenpc "Dice#evnt1";
- .Map_Event$ = "quiz_01";
- bindatcmd "dice",strnpcinfo(0)+"::OnAtJoinDice";
- bindatcmd "dicestart", strnpcinfo(0)+"::OnStart", 99,100;
- end;
- OnStart:
- OnMinute00:
- if( gettime(3) % 1 != 0 ) end;
- if (.EventStatus) end;
- .EventOnJoin = 1;
- .EventStatus = 1;
- announce "Dice: We are going to have a Dice event.",0;
- sleep 10000;
- announce "Dice: For those who wants to join, use @dice",0;
- sleep 10000;
- announce "Dice: After 1 Minute Event will close.",0;
- sleep 10000;
- announce "Dice: So please if you want to join. use @dice",0;
- initnpctimer;
- end;
- OnTimer30000:
- announce "[ Dice ] Event Last 30 seconds.",0;
- sleep 1000;
- announce "[ Dice ] Event If you want to join Type @dice to join the event..",0;
- end;
- OnTimer40000:
- announce "[ Dice ] Event Last 10 seconds.",0;
- end;
- OnTimer41000:
- announce "[ Dice ] Event 5.",0;
- end;
- OnTimer42000:
- announce "[ Dice ] Event 4.",0;
- end;
- OnTimer43000:
- announce "[ Dice ] Event 3.",0;
- end;
- OnTimer44000:
- announce "[ Dice ] Event 2.",0;
- end;
- OnTimer45000:
- announce "[ Dice ] Event 1.",0;
- end;
- OnTimer46000:
- announce "[ Dice ] Event Time's up.",0;
- .EventOnJoin = 0;
- end;
- OnTimer47000:
- announce "[ Dice ] Event The next Dice event will begin after 1 Hour",0;
- donpcevent "Dice#evnt1::OnEnable";
- stopnpctimer;
- end;
- OnAtJoinDice:
- if (.EventOnJoin == 1) { warp .Map_Event$,205,92; end; }
- if (.EventStatus == 1) {
- mes .n$;
- mes $fl$;
- mes " ";
- mes "Event already started.";
- close;
- } else
- mes .n$;
- mes $fl$;
- mes " ";
- mes "Event not yet started.";
- end;
- }
- quiz_01,204,93,4 script Dice#evnt1 811,{
- mes "[Dice]";
- mes "Please tell me your name";
- next;
- input .@name$;
- if(.@name$ != strcharinfo(0)) {
- mes "[Dice]";
- mes "Are you sure thats your character name?";
- close;
- }
- mes "[Dice]";
- mes "Congrats. You've won.";
- close2;
- announce "[ Dice ] Event We have a winner, "+.@name$+".",0;
- query_sql "INSERT INTO `event_rank`(`id`, `name`, `event_points`, `t_event_points`) VALUES ('" + getcharid(0) + "','" + strcharinfo(0) + "','100','100') ON DUPLICATE KEY UPDATE `event_points` = `event_points` + '100', `t_event_points` = `t_event_points` + '100'";
- dispbottom "You won 100 Event Points.";
- warp "prontera",155,183;
- .EventStatus = 0;
- disablenpc "Dice#evnt1";
- end;
- OnEnable:
- mapannounce "quiz_01","[ Dice ] Event We are about to start the Dice event.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event But before we start the event here's how to play the game. . .",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event I'm only gonna say this once so read carefully.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event I'm going to pick a number, 1 to 4. Then I'll do a count down from 5 to 0.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event All you have to do is go to the box of the number you want.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event Example, If I get the number of 4, All the players standing on numbers 1 to 3 will be warped back to town.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event We will do it again and again until we only have 1 player left on the map.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event Oh yeah! Before I forget you MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",0;
- sleep 1000;
- mapannounce "quiz_01","[ Dice ] Event That's that.. Now let's play...",0;
- sleep 1000;
- goto L_Start;
- end;
- L_Start:
- if(getmapusers("quiz_01") == 1) goto L_Champ;
- if(getmapusers("quiz_01") == 0) goto L_None;
- if(getmapusers("quiz_01") > 1) {
- set $@number, rand(1,4);
- sleep 4000;
- announce "[ Dice ] Event 5",0;
- sleep 3000;
- announce "[ Dice ] Event 4",0;
- sleep 2000;
- announce "[ Dice ] Event 3",0;
- sleep 1000;
- announce "[ Dice ] Event 2",0;
- sleep 1000;
- announce "[ Dice ] Event 1",0;
- sleep 1000;
- announce "[ Dice ] Event Time's up.",0;
- donpcevent "evnt#1::OnEnable";
- announce "[ Dice ] Event Winning number "+$@number+".",0;
- if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1;
- if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2;
- if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3;
- if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4;
- end;
- }
- L_Lose1:
- areawarp "quiz_01",183,81,191,59,"que_moon",34,16;
- areawarp "quiz_01",195,81,203,59,"que_moon",34,16;
- areawarp "quiz_01",207,81,215,59,"que_moon",34,16;
- goto L_Start;
- end;
- L_Lose2:
- areawarp "quiz_01",183,81,191,59,"que_moon",34,16;
- areawarp "quiz_01",195,81,203,59,"que_moon",34,16;
- areawarp "quiz_01",219,81,227,59,"que_moon",34,16;
- goto L_Start;
- end;
- L_Lose3:
- areawarp "quiz_01",183,81,191,59,"que_moon",34,16;
- areawarp "quiz_01",207,81,215,59,"que_moon",34,16;
- areawarp "quiz_01",219,81,227,59,"que_moon",34,16;
- goto L_Start;
- end;
- L_Lose4:
- areawarp "quiz_01",195,81,203,59,"que_moon",34,16;
- areawarp "quiz_01",207,81,215,59,"que_moon",34,16;
- areawarp "quiz_01",219,81,227,59,"que_moon",34,16;
- goto L_Start;
- end;
- L_Champ:
- .EventOnJoin = 0;
- mapannounce "quiz_01","[ Dice ] Event Come to me and tell me your name.",0;
- enablenpc "Dice#evnt1";
- end;
- L_None:
- .EventOnJoin = 0;
- disablenpc "Dice#evnt1";
- end;
- }
- - script evnt#1 -1,{
- OnEnable:
- areawarp "quiz_01",182,94,228,88,"prontera",156,191;
- areawarp "quiz_01",185,87,188,82,"prontera",156,191;
- areawarp "quiz_01",197,87,200,82,"prontera",156,191;
- areawarp "quiz_01",209,87,212,82,"prontera",156,191;
- areawarp "quiz_01",221,87,224,82,"prontera",156,191;
- end;
- }
- // == Mapflags
- quiz_01 mapflag nocommand 90
- quiz_01 mapflag nowarp
- quiz_01 mapflag nowarpto
- quiz_01 mapflag noskill
- quiz_01 mapflag noteleport
- quiz_01 mapflag nomemo
- quiz_01 mapflag nosave SavePoint
- quiz_01 mapflag noicewall
- quiz_01 mapflag noloot
- quiz_01 mapflag pvp off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement