Jump to content

Quests, Games: Dice Event


Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

File Name: Dice Event

File Submitter: sandbox

File Submitted: 21 Feb 2014

File Category: Games, Events, Quests

Content Author: sandbox, UnoDelta


This is Yet Another Dice Event script which was used on my server..

The objective of this event is to correct the right number between 1~4 that the NPC would be picking..

Players that chose the wrong number, will automatically be kicked from the event, the process will repeat until there's 1 player left..
Installation

  • Enable the script on your NPC folder
  • To trigger it, you have to create a new NPC, something like this

- script DiceTrigger -1,{OnMinute00:if(gettime(3) == 0 || gettime(3) == 3 || gettime(3) == 6 || gettime(3) == 9 || gettime(3) == 12 || gettime(3) == 15) donpcevent "DiceTrigger::OnDiceETrigger";end;}

  • Carefully read the comments I made inside the script and make sure to configure it properly

  • Edit the warper NPC coordinates
  • Edit the prize to be given
  • Edit the coordinates where you will warp losing players


Terms & Conditions

  • You are not allowed to reproduce or make profit of this script
  • You are not allowed to take credit for this script. Though you can modify/edit it to your liking.
  • I can give you support, but please, do not message me.



Click here to download this file

  • Upvote 2
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

how to make this automated every 2 hours

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  


- script DiceTrigger -1,{

OnMinute00:

if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";

end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

- script DiceTrigger -1,{

OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

}

like this?

 

- script DiceTrigger -1,{
 
- script DiceTrigger -1,{
 
OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;
 
}
 
OnInit:
disablenpc "Dice Event Warper#dice";
disablenpc "Claim Your Prize!#dice";
end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Yup.. Remove the additional NPC header though.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

Sandbox can check this

im using eathena well the dice npc there but the event is not running and the Claim Your Prize!#dice there

help me

 

//======Name========================================
// Dice Event
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// In loving memory of AstralRO
//==================================================



//Edit to where would you place the warper
payon,153,219,4	script	Dice Event Warper#dice	715,{

mes "Do you want to join the Dice Event?";
menu "Yes",-;
warp "quiz_02",55,87;
close;

}

-	script	DiceTrigger	-1,{

OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

}

OnInit:
disablenpc "Dice Event Warper#dice";
disablenpc "Claim Your Prize!#dice";
end;


OnDiceETrigger:
if(agitcheck() == 1) end;
enablenpc "Dice Event Warper#dice";
announce "Dice Event: We are going to have a Dice Event",bc_all,0x8A2BE2;
sleep2 1000;
announce "Dice Event: For those who want to join, please Come @ Payon Town!",bc_all,0x8A2BE2;
sleep2 1000;
announce "Dice Event: The Warper would be open for 1 minute",bc_all,0x8A2BE2;
sleep2 30000;
announce "Dice Event: Last 30 Seconds.",bc_all,0x8A2BE2;
sleep2 30000;
announce "Dice Event: Warper Closed.",bc_all,0x8A2BE2;
disablenpc "Dice Event Warper#dice";
areawarp "ra_temsky",86,149,113,134,"ra_temsky",99,114;
donpcevent "DiceEvent::OnDiceStart";
end;

}

quiz_02,55,90,3	script	Got Stuck?#dice	779,{

mes "[ Got Stuck? ]";
mes "Do you wish to go back?";
menu "Yes",-;
warp "mellina",115,150;
close;

}


quiz_02,37,80,3	script	Box 1	111,{

warp "quiz_02",37,70;
close;

}

quiz_02,49,80,3	script	Box 2	111,{

warp "quiz_02",49,70;
close;

}

quiz_02,61,80,3	script	Box 3	111,{

warp "quiz_02",61,70;
close;

}


quiz_02,73,80,3	script	Box 4	111,{

warp "quiz_02",73,70;
close;

}

quiz_02,37,64,3	script	Go Back#1	858,{

warp "quiz_02",55,76;
close;

}


quiz_02,49,64,3	script	Go Back#2	858,{

warp "quiz_02",55,76;
close;

}

quiz_02,61,64,3	script	Go Back#3	858,{

warp "quiz_02",55,76;
close;

}

quiz_02,73,64,3	script	Go Back#4	858,{

warp "quiz_02",55,76;
close;

}


-	script	DiceEvent	-1,{

OnDiceStart:
mapannounce "quiz_02","We are about to start the Dice event.",bc_blue;
sleep2 1000;
mapannounce "quiz_02","Rules are simple:",bc_blue;
sleep2 1000;
mapannounce "quiz_02","I'm going to pick a number, 1 to 4. Then I'll do a countdown from 5 to 0",bc_blue;
sleep2 1000;
mapannounce "quiz_02","All you have to do is go to box of the number you want",bc_blue;
sleep2 1000;
mapannounce "quiz_02","Example, If I get the number 4, All players standing on number 1 to 3 loses.",bc_blue;
sleep2 1000;
mapannounce "quiz_02","We'll do it again and again until we have 1 player left on this map.",bc_blue;
sleep2 2000;
mapannounce "quiz_02","Before I forget, you must GO INSIDE THE BOX! because if you're caught standing outside the box you'll be automatically disqualified!",bc_blue;
sleep2 2000;
mapannounce "quiz_02","That's it.. Now let's get it on!",bc_blue;
sleep2 3000;
goto L_start;
end;


L_start:
enablenpc "Go Back#1";
enablenpc "Go Back#2";
enablenpc "Go Back#3";
enablenpc "Go Back#4";
if(getmapusers("quiz_02") == 1) goto L_winner;
enablenpc "Box 1";
enablenpc "Box 2";
enablenpc "Box 3";
enablenpc "Box 4";
if(getmapusers("quiz_02") == 0) goto L_noone;
if(getmapusers("quiz_02") > 1) {
set $@number,rand(1,4);
sleep2 1000;
mapannounce "quiz_02","I'm ready to pick a number. Please go to the box of the number you want! Go go go!",bc_blue;
sleep2 20000;
mapannounce "quiz_02","5",bc_blue;
sleep2 1500;
mapannounce "quiz_02","4",bc_blue;
sleep2 1500;
mapannounce "quiz_02","3",bc_blue;
sleep2 1500;
mapannounce "quiz_02","2",bc_blue;
sleep2 1500;
mapannounce "quiz_02","1",bc_blue;
disablenpc "Box 1";
disablenpc "Box 2";
disablenpc "Box 3";
disablenpc "Box 4";
disablenpc "Go Back#1";
disablenpc "Go Back#2";
disablenpc "Go Back#3";
disablenpc "Go Back#4";
areawarp "quiz_02",32,95,79,76,"poring_w02",99,70;
areawarp "quiz_02",80,85,80,76,"poring_w02",99,70;
areawarp "quiz_02",31,85,31,76,"poring_w02",99,70;
if(getmapusers("quiz_02") == 0) goto L_noone;
sleep2 1000;
mapannounce "quiz_02","Time's Up. Winning number is "+$@number+"!",bc_blue;
	if($@number == 4) goto L_Lose1;
	if($@number == 3) goto L_Lose2;
	if($@number == 2) goto L_Lose3;
	if($@number == 1) goto L_Lose4;
end;

}

L_Lose1:
//Edit to where will you warp players that lost
areawarp "quiz_02",33,73,41,52,"poring_w02",99,70;
areawarp "quiz_02",45,73,53,52,"poring_w02",99,70;
areawarp "quiz_02",57,73,65,52,"poring_w02",99,70;
set #PVPPoint, #PVPPoint+20;  // SETTING PVP POINT
goto L_start;
end;

L_Lose2:
//Edit to where will you warp players that lost
areawarp "quiz_02",33,73,41,52,"poring_w02",99,70;
areawarp "quiz_02",45,73,53,52,"poring_w02",99,70;
areawarp "quiz_02",57,73,65,52,"poring_w02",99,70;
set #PVPPoint, #PVPPoint+20; // SETTING PVP POINT
goto L_start;
end;

L_Lose3:
//Edit to where will you warp players that lost
areawarp "quiz_02",33,73,41,52,"poring_w02",99,70;
areawarp "quiz_02",57,73,65,52,"poring_w02",99,70;
areawarp "quiz_02",69,73,77,52,"poring_w02",99,70;
set #PVPPoint, #PVPPoint+20; // SETTING PVP POINT
goto L_start;
end;

L_Lose4:
//Edit to where will you warp players that lost
areawarp "quiz_02",45,73,53,52,"poring_w02",99,70;
areawarp "quiz_02",57,73,65,52,"poring_w02",99,70;
areawarp "quiz_02",69,73,77,52,"poring_w02",99,70;
set #PVPPoint, #PVPPoint+20; // SETTING PVP POINT
goto L_start;
end;

L_noone:
announce "No one won the Dice Event!",bc_all,0x8A2BE2;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
end;

L_winner:
enablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
end;

}

quiz_02,55,84,3	script	Claim Your Prize!#dice	904,{
	mes "Please tell me your name";
	next;
	input .@name$;
	if(.@name$ != strcharinfo(0)) {
		mes "Are you sure thats your character name?";
		close;
	}
	mes "Congrats. You've won.";
	close2;
	announce strcharinfo(0)+" won the Dice Event!",bc_all,0x8A2BE2;
	set #PVPPoint, #PVPPoint+100; // SETTING PVP POINT
	warp "poring_w02",99,70;
	disablenpc "Claim Your Prize!#dice";
	disablenpc "Dice Event Warper#dice";
	close;
	end;

}

quiz_02	mapflag	nowarp
quiz_02	mapflag	nowarpto
quiz_02	mapflag	noskill
quiz_02	mapflag	noteleport
quiz_02	mapflag	nomemo
quiz_02	mapflag	nosave	SavePoint
quiz_02	mapflag	noicewall
quiz_02	mapflag	noloot

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Please provide the error that your console is showing, the script works fine for me and also to others.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

Please provide the error that your console is showing, the script works fine for me and also to others.


[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'14'. Renaming 'Dice Event Warper#dice' to '1_431_156_233'.
[Debug]: this npc:
   display name 'Dice Event Warper#dice'
   unique name 'Dice Event Warper#dice'
   map=payon, x=156, y=233
[Debug]: other npc:
   display name 'Dice Event Warper#dice'
   unique name 'Dice Event Warper#dice'
   map=payon, x=156, y=233
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'23'. Renaming 'DiceTrigger' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'DiceTrigger'
   unique name 'DiceTrigger'
   map=(not on a map), x=0, y=0
[Debug]: other npc:
   display name 'DiceTrigger'
   unique name 'DiceTrigger'
   map=(not on a map), x=0, y=0
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'50'. Renaming 'Got Stuck?#dice' to '1_500_55_90'.
[Debug]: this npc:
   display name 'Got Stuck?#dice'
   unique name 'Got Stuck?#dice'
   map=quiz_02, x=55, y=90
[Debug]: other npc:
   display name 'Got Stuck?#dice'
   unique name 'Got Stuck?#dice'
   map=quiz_02, x=55, y=90
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'61'. Renaming 'Box 1' to '1_500_37_80'.
[Debug]: this npc:
   display name 'Box 1'
   unique name 'Box 1'
   map=quiz_02, x=37, y=80
[Debug]: other npc:
   display name 'Box 1'
   unique name 'Box 1'
   map=quiz_02, x=37, y=80
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'68'. Renaming 'Box 2' to '1_500_49_80'.
[Debug]: this npc:
   display name 'Box 2'
   unique name 'Box 2'
   map=quiz_02, x=49, y=80
[Debug]: other npc:
   display name 'Box 2'
   unique name 'Box 2'
   map=quiz_02, x=49, y=80
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'75'. Renaming 'Box 3' to '1_500_61_80'.
[Debug]: this npc:
   display name 'Box 3'
   unique name 'Box 3'
   map=quiz_02, x=61, y=80
[Debug]: other npc:
   display name 'Box 3'
   unique name 'Box 3'
   map=quiz_02, x=61, y=80
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'83'. Renaming 'Box 4' to '1_500_73_80'.
[Debug]: this npc:
   display name 'Box 4'
   unique name 'Box 4'
   map=quiz_02, x=73, y=80
[Debug]: other npc:
   display name 'Box 4'
   unique name 'Box 4'
   map=quiz_02, x=73, y=80
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'90'. Renaming 'Go Back#1' to '1_500_37_64'.
[Debug]: this npc:
   display name 'Go Back#1'
   unique name 'Go Back#1'
   map=quiz_02, x=37, y=64
[Debug]: other npc:
   display name 'Go Back#1'
   unique name 'Go Back#1'
   map=quiz_02, x=37, y=64
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'98'. Renaming 'Go Back#2' to '1_500_49_64'.
[Debug]: this npc:
   display name 'Go Back#2'
   unique name 'Go Back#2'
   map=quiz_02, x=49, y=64
[Debug]: other npc:
   display name 'Go Back#2'
   unique name 'Go Back#2'
   map=quiz_02, x=49, y=64
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'105'. Renaming 'Go Back#3' to '1_500_61_64'.
[Debug]: this npc:
   display name 'Go Back#3'
   unique name 'Go Back#3'
   map=quiz_02, x=61, y=64
[Debug]: other npc:
   display name 'Go Back#3'
   unique name 'Go Back#3'
   map=quiz_02, x=61, y=64
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'112'. Renaming 'Go Back#4' to '1_500_73_64'.
[Debug]: this npc:
   display name 'Go Back#4'
   unique name 'Go Back#4'
   map=quiz_02, x=73, y=64
[Debug]: other npc:
   display name 'Go Back#4'
   unique name 'Go Back#4'
   map=quiz_02, x=73, y=64
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'120'. Renaming 'DiceEvent' to '2_-1_0_0'.
[Debug]: this npc:
   display name 'DiceEvent'
   unique name 'DiceEvent'
   map=(not on a map), x=0, y=0
[Debug]: other npc:
   display name 'DiceEvent'
   unique name 'DiceEvent'
   map=(not on a map), x=0, y=0
[Warning]: npc_parsename: Duplicate unique name in file 'npc/chetan/Dice.txt', l
ine'235'. Renaming 'Claim Your Prize!#dice' to '1_500_55_84'.
[Debug]: this npc:
   display name 'Claim Your Prize!#dice'
   unique name 'Claim Your Prize!#dice'
   map=quiz_02, x=55, y=84
[Debug]: other npc:
   display name 'Claim Your Prize!#dice'
   unique name 'Claim Your Prize!#dice'
   map=quiz_02, x=55, y=84

Dice.txt

Edited by DrewxD
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

You have loaded the NPC multiple times..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

You have loaded the NPC multiple times..

Sorry for not speaking English hirap mag english ehh alam ko nmn Pinoy k Sir

 

pa help nmn poh sa Prize Gusto ko sana

un mga matatalo sa Dice Event makaka get ng 20 PvP Points or 20 Cash Point ma warp sila dun sa map n meron NPC n n bigyan sila ng 20 pvp points

tapos naman poh dun sa WInner ibibigay ng   Claim Your Prize!#dice ay 100 PvP Points or Cash Points

 

tama poh n script n ito ?

 

quiz_02,55,84,3    script    Claim Your Prize!#dice    904,{

    mes "Please tell me your name";

    next;

    input .@name$;

    if(.@name$ != strcharinfo(0)) {

        mes "Are you sure thats your character name?";

        close;

    }

    mes "Congrats. You've won.";

    close2;

    announce strcharinfo(0)+" won the Dice Event!",bc_all,0x8A2BE2;

    set #PVPPoint, #PVPPoint+100; // SETTING PVP POINT

    warp "poring_w02",99,70;

    disablenpc "Claim Your Prize!#dice";

    disablenpc "Dice Event Warper#dice";

    close;

    end;

}

Edited by DrewxD
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Add this line on the 4 L_Lose events.

set #PVPPoint,#PVPPoint+20;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  08/12/12
  • Last Seen:  

help 

 

[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/dice.txt', line '30'. Stopping...
 * w1=OnInit:
 * w2=
 * w3=
 * w4=

here's my file

//======Name========================================

// Dice Event
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// In loving memory of AstralRO
//==================================================



//Edit to where would you place the warper
prontera,156,175,3 script Dice Event Warper#dice 723,{

mes "Do you want to join the Dice Event?";
menu "Yes",-;
warp "quiz_02",55,87;
close;

}

- script DiceTrigger -1,{

OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

}

OnInit:
disablenpc "Dice Event Warper#dice";
disablenpc "Claim Your Prize!#dice";
end;


OnDiceETrigger:
if(agitcheck() == 1) end;
enablenpc "Dice Event Warper#dice";
announce "Dice Event: We are going to have a Dice Event",bc_all,0x8A2BE2;
sleep2 1000;
announce "Dice Event: For those who want to join, please warp @ mellina 115 150!",bc_all,0x8A2BE2;
sleep2 1000;
announce "Dice Event: The Warper would be open for 1 minute",bc_all,0x8A2BE2;
sleep2 30000;
announce "Dice Event: Last 30 Seconds.",bc_all,0x8A2BE2;
sleep2 30000;
announce "Dice Event: Warper Closed.",bc_all,0x8A2BE2;
disablenpc "Dice Event Warper#dice";
areawarp "ra_temsky",86,149,113,134,"ra_temsky",99,114;
donpcevent "DiceEvent::OnDiceStart";
end;

}

quiz_02,55,90,3 script Got Stuck?#dice 779,{

mes "[ Got Stuck? ]";
mes "Do you wish to go back?";
menu "Yes",-;
warp "prontera",115,150;
close;

}


quiz_02,37,80,3 script Box 1 111,{

warp "quiz_02",37,70;
close;

}

quiz_02,49,80,3 script Box 2 111,{

warp "quiz_02",49,70;
close;

}

quiz_02,61,80,3 script Box 3 111,{

warp "quiz_02",61,70;
close;

}


quiz_02,73,80,3 script Box 4 111,{

warp "quiz_02",73,70;
close;

}

quiz_02,37,64,3 script Go Back#1 858,{

warp "quiz_02",55,76;
close;

}


quiz_02,49,64,3 script Go Back#2 858,{

warp "quiz_02",55,76;
close;

}

quiz_02,61,64,3 script Go Back#3 858,{

warp "quiz_02",55,76;
close;

}

quiz_02,73,64,3 script Go Back#4 858,{

warp "quiz_02",55,76;
close;

}


- script DiceEvent -1,{

OnDiceStart:
mapannounce "quiz_02","We are about to start the Dice event.",bc_blue;
sleep2 1000;
mapannounce "quiz_02","Rules are simple:",bc_blue;
sleep2 1000;
mapannounce "quiz_02","I'm going to pick a number, 1 to 4. Then I'll do a countdown from 5 to 0",bc_blue;
sleep2 1000;
mapannounce "quiz_02","All you have to do is go to box of the number you want",bc_blue;
sleep2 1000;
mapannounce "quiz_02","Example, If I get the number 4, All players standing on number 1 to 3 loses.",bc_blue;
sleep2 1000;
mapannounce "quiz_02","We'll do it again and again until we have 1 player left on this map.",bc_blue;
sleep2 2000;
mapannounce "quiz_02","Before I forget, you must GO INSIDE THE BOX! because if you're caught standing outside the box you'll be automatically disqualified!",bc_blue;
sleep2 2000;
mapannounce "quiz_02","That's it.. Now let's get it on!",bc_blue;
sleep2 3000;
goto L_start;
end;


L_start:
enablenpc "Go Back#1";
enablenpc "Go Back#2";
enablenpc "Go Back#3";
enablenpc "Go Back#4";
if(getmapusers("quiz_02") == 1) goto L_winner;
enablenpc "Box 1";
enablenpc "Box 2";
enablenpc "Box 3";
enablenpc "Box 4";
if(getmapusers("quiz_02") == 0) goto L_noone;
if(getmapusers("quiz_02") > 1) {
set $@number,rand(1,4);
sleep2 1000;
mapannounce "quiz_02","I'm ready to pick a number. Please go to the box of the number you want! Go go go!",bc_blue;
sleep2 20000;
mapannounce "quiz_02","5",bc_blue;
sleep2 1500;
mapannounce "quiz_02","4",bc_blue;
sleep2 1500;
mapannounce "quiz_02","3",bc_blue;
sleep2 1500;
mapannounce "quiz_02","2",bc_blue;
sleep2 1500;
mapannounce "quiz_02","1",bc_blue;
disablenpc "Box 1";
disablenpc "Box 2";
disablenpc "Box 3";
disablenpc "Box 4";
disablenpc "Go Back#1";
disablenpc "Go Back#2";
disablenpc "Go Back#3";
disablenpc "Go Back#4";
areawarp "quiz_02",32,95,79,76,"mellina",115,150;
areawarp "quiz_02",80,85,80,76,"mellina",115,150;
areawarp "quiz_02",31,85,31,76,"mellina",115,150;
if(getmapusers("quiz_02") == 0) goto L_noone;
sleep2 1000;
mapannounce "quiz_02","Time's Up. Winning number is "+$@number+"!",bc_blue;
if($@number == 4) goto L_Lose1;
if($@number == 3) goto L_Lose2;
if($@number == 2) goto L_Lose3;
if($@number == 1) goto L_Lose4;
end;

}

L_Lose1:
//Edit to where will you warp players that lost
areawarp "quiz_02",33,73,41,52,"prontera",156,175;
areawarp "quiz_02",45,73,53,52,"prontera",156,175;
areawarp "quiz_02",57,73,65,52,"prontera",156,175;
goto L_start;
end;

L_Lose2:
//Edit to where will you warp players that lost
areawarp "quiz_02",33,73,41,52,"prontera",156,175;
areawarp "quiz_02",45,73,53,52,"prontera",156,175;
areawarp "quiz_02",69,73,77,52,"prontera",156,175;
goto L_start;
end;

L_Lose3:
//Edit to where will you warp players that lost
areawarp "quiz_02",33,73,41,52,"prontera",156,175;
areawarp "quiz_02",57,73,65,52,"prontera",156,175;
areawarp "quiz_02",69,73,77,52,"prontera",156,175;
goto L_start;
end;

L_Lose4:
//Edit to where will you warp players that lost
areawarp "quiz_02",45,73,53,52,"prontera",156,175;
areawarp "quiz_02",57,73,65,52,"prontera",156,175;
areawarp "quiz_02",69,73,77,52,"prontera",156,175;
goto L_start;
end;

L_noone:
announce "No one won the Dice Event!",bc_all,0x8A2BE2;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
end;

L_winner:
enablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
end;

}

quiz_02,55,84,3 script Claim Your Prize!#dice 904,{

getitem 7539,10; //Edit on what prize would you give to the winner
announce strcharinfo(0)+" won the Dice Event!",bc_all,0x8A2BE2;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
warp "mellina",115,150;
close;
end;

}

quiz_02 mapflag nowarp
quiz_02 mapflag nowarpto
quiz_02 mapflag noskill
quiz_02 mapflag noteleport
quiz_02 mapflag nomemo
quiz_02 mapflag nosave SavePoint
quiz_02 mapflag noicewall
quiz_02 mapflag noloot

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Delete the extra closing brace here

 

- script DiceTrigger -1,{

OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

} <-------
  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  12/22/11
  • Last Seen:  

Yup.. Remove the additional NPC header though.

sir what do you mean with npc header? i cant get it, wich one should i delete?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

 

- script DiceTrigger -1,{

OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

}

like this?

 

- script DiceTrigger -1,{
 
- script DiceTrigger -1,{
 
OnMinute00:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;
 
}
 
OnInit:
disablenpc "Dice Event Warper#dice";
disablenpc "Claim Your Prize!#dice";
end;

 

 

you have two headear so remove the exist 1.  red one

Edited by Cisqua
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   1
  • Joined:  08/28/14
  • Last Seen:  

how to make it every 30mins?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

OnMinute00: to OnMinute30:

Link to comment
Share on other sites

  • 5 weeks later...

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  08/09/14
  • Last Seen:  

im using hercules server , pre-renewal

my dice event didn't start

//======Name========================================
// Dice Event
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// In loving memory of AstralRO
//==================================================



//Edit to where would you place the warper
prontera,155,179,4	script	Dice Event Warper#dice	45,{

mes "Do you want to join the Dice Event?";
menu "Yes",-;
warp "quiz_01",55,87;
close;

}

-	script	DiceTrigger	-1,{

OnMinute30:
if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

OnInit:
disablenpc "Dice Event Warper#dice";
disablenpc "Claim Your Prize!#dice";
end;


OnDiceETrigger:
if(agitcheck() == 1) end;
enablenpc "Dice Event Warper#dice";
announce "Dice Event: We are going to have a Dice Event",bc_all,0x8A2BE2;
sleep2 1000;
announce "Dice Event: For those who want to join, please warp @ Prontera Town!",bc_all,0x8A2BE2;
sleep2 1000;
announce "Dice Event: The Warper would be open for 1 minute",bc_all,0x8A2BE2;
sleep2 30000;
announce "Dice Event: Last 30 Seconds.",bc_all,0x8A2BE2;
sleep2 30000;
announce "Dice Event: Warper Closed.",bc_all,0x8A2BE2;
disablenpc "Dice Event Warper#dice";
areawarp "ra_temsky",86,149,113,134,"ra_temsky",177,114;
donpcevent "DiceEvent::OnDiceStart";
end;

}

quiz_01,55,90,3	script	Got Stuck?#dice	779,{

mes "[ Got Stuck? ]";
mes "Do you wish to go back?";
menu "Yes",-;
warp "prontera",136,177;
close;

}


quiz_01,37,80,3	script	Box 1	111,{

warp "quiz_01",37,70;
close;

}

quiz_01,49,80,3	script	Box 2	111,{

warp "quiz_01",49,70;
close;

}

quiz_01,61,80,3	script	Box 3	111,{

warp "quiz_01",61,70;
close;

}


quiz_01,73,80,3	script	Box 4	111,{

warp "quiz_01",73,70;
close;

}

quiz_01,37,64,3	script	Go Back#1	858,{

warp "quiz_01",55,76;
close;

}


quiz_01,49,64,3	script	Go Back#2	858,{

warp "quiz_01",55,76;
close;

}

quiz_01,61,64,3	script	Go Back#3	858,{

warp "quiz_01",55,76;
close;

}

quiz_01,73,64,3	script	Go Back#4	858,{

warp "quiz_01",55,76;
close;

}


-	script	DiceEvent	-1,{

OnDiceStart:
mapannounce "quiz_01","We are about to start the Dice event.",bc_blue;
sleep2 1000;
mapannounce "quiz_01","Rules are simple:",bc_blue;
sleep2 1000;
mapannounce "quiz_01","I'm going to pick a number, 1 to 4. Then I'll do a countdown from 5 to 0",bc_blue;
sleep2 1000;
mapannounce "quiz_01","All you have to do is go to box of the number you want",bc_blue;
sleep2 1000;
mapannounce "quiz_01","Example, If I get the number 4, All players standing on number 1 to 3 loses.",bc_blue;
sleep2 1000;
mapannounce "quiz_01","We'll do it again and again until we have 1 player left on this map.",bc_blue;
sleep2 2000;
mapannounce "quiz_01","Before I forget, you must GO INSIDE THE BOX! because if you're caught standing outside the box you'll be automatically disqualified!",bc_blue;
sleep2 2000;
mapannounce "quiz_01","That's it.. Now let's get it on!",bc_blue;
sleep2 3000;
goto L_start;
end;


L_start:
enablenpc "Go Back#1";
enablenpc "Go Back#2";
enablenpc "Go Back#3";
enablenpc "Go Back#4";
if(getmapusers("quiz_01") == 1) goto L_winner;
enablenpc "Box 1";
enablenpc "Box 2";
enablenpc "Box 3";
enablenpc "Box 4";
if(getmapusers("quiz_01") == 0) goto L_noone;
if(getmapusers("quiz_01") > 1) {
set $@number,rand(1,4);
sleep2 1000;
mapannounce "quiz_01","I'm ready to pick a number. Please go to the box of the number you want! Go go go!",bc_blue;
sleep2 20000;
mapannounce "quiz_01","5",bc_blue;
sleep2 1500;
mapannounce "quiz_01","4",bc_blue;
sleep2 1500;
mapannounce "quiz_01","3",bc_blue;
sleep2 1500;
mapannounce "quiz_01","2",bc_blue;
sleep2 1500;
mapannounce "quiz_01","1",bc_blue;
disablenpc "Box 1";
disablenpc "Box 2";
disablenpc "Box 3";
disablenpc "Box 4";
disablenpc "Go Back#1";
disablenpc "Go Back#2";
disablenpc "Go Back#3";
disablenpc "Go Back#4";
areawarp "quiz_01",32,95,79,76,"prontera",136,177;
areawarp "quiz_01",80,85,80,76,"prontera",136,177;
areawarp "quiz_01",31,85,31,76,"prontera",136,177;
if(getmapusers("quiz_01") == 0) goto L_noone;
sleep2 1000;
mapannounce "quiz_01","Time's Up. Winning number is "+$@number+"!",bc_blue;
	if($@number == 4) goto L_Lose1;
	if($@number == 3) goto L_Lose2;
	if($@number == 2) goto L_Lose3;
	if($@number == 1) goto L_Lose4;
end;

}

L_Lose1:
//Edit to where will you warp players that lost
areawarp "quiz_01",33,73,41,52,"prontera",136,177;
areawarp "quiz_01",45,73,53,52,"prontera",136,177;
areawarp "quiz_01",57,73,65,52,"prontera",136,177;
goto L_start;
end;

L_Lose2:
//Edit to where will you warp players that lost
areawarp "quiz_01",33,73,41,52,"prontera",136,177;
areawarp "quiz_01",45,73,53,52,"prontera",136,177;
areawarp "quiz_01",69,73,77,52,"prontera",136,177;
goto L_start;
end;

L_Lose3:
//Edit to where will you warp players that lost
areawarp "quiz_01",33,73,41,52,"prontera",136,177;
areawarp "quiz_01",57,73,65,52,"prontera",136,177;
areawarp "quiz_01",69,73,77,52,"prontera",136,177;
goto L_start;
end;

L_Lose4:
//Edit to where will you warp players that lost
areawarp "quiz_01",45,73,53,52,"prontera",136,177;
areawarp "quiz_01",57,73,65,52,"prontera",136,177;
areawarp "quiz_01",69,73,77,52,"prontera",136,177;
goto L_start;
end;

L_noone:
announce "No one won the Dice Event!",bc_all,0x8A2BE2;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
end;

L_winner:
enablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
end;

}

quiz_01,55,84,3	script	Claim Your Prize!#dice	904,{

getitem 7227,50; //Edit on what prize would you give to the winner
announce strcharinfo(0)+" won the Dice Event!",bc_all,0x8A2BE2;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
warp "prontera",136,177;
close;
end;

}

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
Edited by radlican
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  11/18/14
  • Last Seen:  

thankkk a lot 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   4
  • Joined:  11/23/12
  • Last Seen:  

how to set this to start with the following time?

OnClock0300:
OnClock0700:
OnClock1100:
OnClock1500:
OnClock1900:
OnClock2300:

I do this and works fine

 

- script DiceTrigger -1,{

 

OnClock0300:
OnClock0700:
OnClock1100:
OnClock1500:
OnClock1900:
OnClock2300:

if(gettime(3) % 2 == 0) donpcevent "DiceTrigger::OnDiceETrigger";
end;

}

Link to comment
Share on other sites

  • 2 years later...

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

@sandbox I try using your script with the latest rathena it just don't work.

when the event start the announcement just went through everything and announce no winner without a portal even appear. I try solving it by changing sleep2 to sleep, finally the event work and I am able to get inside the room to try the event... but still there is just so much error still like it say using the wrong close command and the event is not running after we are inside.

does anyone have any fix for this script for the latest rathena?

 

thank you whoever willing to help.

Link to comment
Share on other sites

  • 3 years later...

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  39
  • Reputation:   1
  • Joined:  12/11/20
  • Last Seen:  

Its not triggering for me.

Please Help!

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
Reply to this topic...

×   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...