Jump to content
  • 0

script_rid2sd Help on Dice Event !


Question

Posted

This is the script :

 

//##########################################################################
//By: ____                    _      __        __           ____    _____  #
//   |    \   ___ __    __ _ | |     \ \      / /_  _   _  / ___\  / ____| #
//   | ||  | / _ \\ \  / /| || |      \ \    / /| || \ | || | ___ | (___   #
//   | ||  ||  __/ \ \/ / | || |__     \ \/\/ / | ||  \| || |___|\ \___ \  #
// __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) | #
//|_____________________________________________________________________/  #
//                                                                         #
//##########################################################################
//                                                                         #
//== Dice Event                                                            #
//                                                                         #
//##########################################################################
//                                                                         #
//== Automatically starts a dice event every 30 minutes of every hour      #
//                                                                         #
//== Prize- Change 13723 to any item ID you want the winner to recieved    #
//                                                                         #                                         // Code Modify by : WordsUp
// Credit still for mAisakaTaiga                                
//##########################################################################

-	script	Dice#announcer	-1,{

OnInit:
	disablenpc "prtevent";
	hideonnpc "Dice#evnt1";
	end;

OnClock0100:
OnClock0200:
OnClock0300:
OnClock0400:
OnClock0500:
OnClock0600:
OnClock0700:
OnClock0800:
OnClock0900:
OnClock1000:
OnClock1100:
OnClock0000:


OnClock1300:
OnClock1400:
OnClock1500:
OnClock1600:
OnClock1700:
OnClock1800:
OnClock1900:
OnClock2000:
OnClock2100:
OnClock2200:
OnClock2300:
OnClock2400:

	announce "Dice: We are going to have a Dice event.",bc_all,0x00CED1;
	sleep2 10000;
	announce "Dice: For those who wants to join, Please proceed zhakastia 56, 55 and enter the Warp Portal.",bc_all,0x00CED1;
	sleep2 10000;
	announce "Dice: After 1 Minute the Portal will close.",0;
	sleep2 10000;
	announce "Dice: So please go to zhakastia 56, 55 and enter the Warp Portal now if you want to join.",bc_all,0x00CED1;
	enablenpc "prtevent";
	initnpctimer;
	end;

OnTimer30000:
	announce "Dice: Last 30 seconds.",bc_map,0x00CED1;
	sleep2 5000;
	announce "Dice: If you want to join please enter the Warp Portal beside me here zhakastia 56, 55.",bc_all,0x00CED1;
	end;
	
OnTimer50000:
	announce "Dice: Last 10 seconds.",bc_all,0x00CED1;
	end;
	
OnTimer55000:
	announce "Dice: 5.",bc_all,0x00CED1;
	end;
	
OnTimer56000:
	announce "Dice: 4.",bc_all,0x00CED1;
	end;
	
OnTimer57000:
	announce "Dice: 3.",bc_all,0x00CED1;
	end;
	
OnTimer58000:
	announce "Dice: 2.",bc_all,0x00CED1;
	end;
	
OnTimer59000:
	announce "Dice: 1.",bc_all,0x00CED1;
	end;
	
OnTimer60000:
	announce "Dice: Time's up.",bc_all,0x00CED1;
	end;
	
OnTimer61000:
	disablenpc "prtevent";
	donpcevent "Dice#evnt1::OnEnable";
	stopnpctimer;
	end;
	
OnTimer62000:
	announce "Dice: The next Dice event will begin after 1 Hour",bc_all,0x00CED1;
	end;
	}
	
//--------------------------------------------------
	
zhakastia,52,55,0	warp	prtevent	2,2,quiz_01,204,90	
	
//--------------------------------------------------

quiz_01,204,93,6	script	Dice#evnt1	715,{

//--------------------------------------------------

	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: We have a winner, "+.@name$+".",bc_map,0x00CED1;
	getitem 22001,5;
	warp "zhakastia",97,62;
	hideonnpc "Dice#evnt1";
	end;
	
OnEnable:
	mapannounce "quiz_01","Dice: We are about to start the Dice event.",bc_map,0x00CED1;
	sleep2 10000;
	mapannounce "quiz_01","Dice: You MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",bc_map,0x00CED1;
	sleep2 10000;
	mapannounce "quiz_01","Dice: That's that.. Now let's play...",bc_map,0x00CED1;
	sleep2 10000;
	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) {
	announce "Dice: . . . . .",0;
	set $@number, rand(1,4);
	sleep2 10000;
	announce "Dice: I have a number now. Please go to the box of the number you want.... GO!",bc_map,0x00CED1;
	sleep2 10000;
	announce "Dice: 5",bc_map,0x00CED1;
	sleep2 5000;
	announce "Dice: 4",bc_map,0x00CED1;
	sleep2 4000;
	announce "Dice: 3",bc_map,0x00CED1;
	sleep2 3000;
	announce "Dice: 2",bc_map,0x00CED1;
	sleep2 2000;
	announce "Dice: 1",bc_map,0x00CED1;
	sleep2 1000;
	announce "Dice: Time's up.",bc_map,0x00CED1;
	donpcevent "evnt#1::OnEnable";
	announce "Dice: Winning number "+$@number+".",bc_map,0x00CED1;
	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,"zhakastia",97,62;
	areawarp "quiz_01",195,81,203,59,"zhakastia",97,62;
	areawarp "quiz_01",207,81,215,59,"zhakastia",97,62;
	goto L_Start;
	end;

L_Lose2:
	areawarp "quiz_01",183,81,191,59,"zhakastia",97,62;
	areawarp "quiz_01",195,81,203,59,"zhakastia",97,62;
	areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;;
	goto L_Start;
	end;
	
L_Lose3:
	areawarp "quiz_01",183,81,191,59,"zhakastia",97,62;
	areawarp "quiz_01",207,81,215,59,"zhakastia",97,62;
	areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;
	goto L_Start;
	end;
	
L_Lose4:
	areawarp "quiz_01",195,81,203,59,"zhakastia",97,62;
	areawarp "quiz_01",207,81,215,59,"zhakastia",97,62;
	areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;
	goto L_Start;
	end;
	
L_Champ:
	mapannounce "quiz_01","Dice: Come to me and tell me your name.",bc_map,0x00CED1;
	hideoffnpc "Dice#evnt1";
	end;
	
L_None:
	announce "No One Entered the Dice Event. Event Closed",bc_map,0x00CED1;
	hideonnpc "Dice#evnt1";
	end;
}
	
-	script	evnt#1	-1,{

OnEnable:
	areawarp "quiz_01",182,94,228,88,"prontera",156,174;
	areawarp "quiz_01",185,87,188,82,"prontera",156,174;
	areawarp "quiz_01",197,87,200,82,"prontera",156,174;
	areawarp "quiz_01",209,87,212,82,"prontera",156,174;
	areawarp "quiz_01",221,87,224,82,"prontera",156,174;
	end;
	}

// -- Mapflags
quiz_01	mapflag	nowarp
quiz_01	mapflag	nowarpto
quiz_01	mapflag	noteleport
quiz_01	mapflag	nosave
quiz_01	mapflag	nomemo
quiz_01	mapflag	nobranch
quiz_01	mapflag	noloot
quiz_01	mapflag	noskill
quiz_01	mapflag	nopenalty

 



@bump !

5 answers to this question

Recommended Posts

Posted (edited)

Okay, your issue here is it's using: sleep2 instead of sleep.

Here, is the script with it corrected.

//##########################################################################
//By: ____                    _      __        __           ____    _____  #
//   |    \   ___ __    __ _ | |     \ \      / /_  _   _  / ___\  / ____| #
//   | ||  | / _ \\ \  / /| || |      \ \    / /| || \ | || | ___ | (___   #
//   | ||  ||  __/ \ \/ / | || |__     \ \/\/ / | ||  \| || |___|\ \___ \  #
// __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) | #
//|_____________________________________________________________________/  #
//                                                                         #
//##########################################################################
//                                                                         #
//== Dice Event                                                            #
//                                                                         #
//##########################################################################
//                                                                         #
//== Automatically starts a dice event every 30 minutes of every hour      #
//                                                                         #
//== Prize- Change 13723 to any item ID you want the winner to recieved    #
//                                                                         #                                         // Code Modify by : WordsUp
// Credit still for mAisakaTaiga                                
//##########################################################################

-	script	Dice#announcer	-1,{

OnInit:
	disablenpc "prtevent";
	hideonnpc "Dice#evnt1";
	end;

OnClock0100:
OnClock0200:
OnClock0300:
OnClock0400:
OnClock0500:
OnClock0600:
OnClock0700:
OnClock0800:
OnClock0900:
OnClock1000:
OnClock1100:
OnClock0000:


OnClock1300:
OnClock1400:
OnClock1500:
OnClock1600:
OnClock1700:
OnClock1800:
OnClock1900:
OnClock2000:
OnClock2100:
OnClock2200:
OnClock2300:
OnClock2400:

	announce "Dice: We are going to have a Dice event.",bc_all,0x00CED1;
	sleep 10000;
	announce "Dice: For those who wants to join, Please proceed zhakastia 56, 55 and enter the Warp Portal.",bc_all,0x00CED1;
	sleep 10000;
	announce "Dice: After 1 Minute the Portal will close.",bc_all,0x00CED1;
	sleep 10000;
	announce "Dice: So please go to zhakastia 56, 55 and enter the Warp Portal now if you want to join.",bc_all,0x00CED1;
	enablenpc "prtevent";
	initnpctimer;
	end;

OnTimer30000:
	announce "Dice: Last 30 seconds.",bc_map,0x00CED1;
	sleep 5000;
	announce "Dice: If you want to join please enter the Warp Portal beside me here zhakastia 56, 55.",bc_all,0x00CED1;
	end;
	
OnTimer50000:
	announce "Dice: Last 10 seconds.",bc_all,0x00CED1;
	end;
	
OnTimer55000:
	announce "Dice: 5.",bc_all,0x00CED1;
	end;
	
OnTimer56000:
	announce "Dice: 4.",bc_all,0x00CED1;
	end;
	
OnTimer57000:
	announce "Dice: 3.",bc_all,0x00CED1;
	end;
	
OnTimer58000:
	announce "Dice: 2.",bc_all,0x00CED1;
	end;
	
OnTimer59000:
	announce "Dice: 1.",bc_all,0x00CED1;
	end;
	
OnTimer60000:
	announce "Dice: Time's up.",bc_all,0x00CED1;
	end;
	
OnTimer61000:
	disablenpc "prtevent";
	donpcevent "Dice#evnt1::OnEnable";
	stopnpctimer;
	end;
	
OnTimer62000:
	announce "Dice: The next Dice event will begin after 1 Hour",bc_all,0x00CED1;
	end;
	}
	
//--------------------------------------------------
	
zhakastia,52,55,0	warp	prtevent	2,2,quiz_01,204,90	
	
//--------------------------------------------------

quiz_01,204,93,6	script	Dice#evnt1	715,{

//--------------------------------------------------

	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: We have a winner, "+.@name$+".",bc_map,0x00CED1;
	getitem 22001,5;
	warp "zhakastia",97,62;
	hideonnpc "Dice#evnt1";
	end;
	
OnEnable:
	mapannounce "quiz_01","Dice: We are about to start the Dice event.",bc_map,0x00CED1;
	sleep 10000;
	mapannounce "quiz_01","Dice: You MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",bc_map,0x00CED1;
	sleep 10000;
	mapannounce "quiz_01","Dice: That's that.. Now let's play...",bc_map,0x00CED1;
	sleep 10000;
	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) {
	announce "Dice: . . . . .",0;
	set $@number, rand(1,4);
	sleep 10000;
	announce "Dice: I have a number now. Please go to the box of the number you want.... GO!",bc_map,0x00CED1;
	sleep 10000;
	announce "Dice: 5",bc_map,0x00CED1;
	sleep 5000;
	announce "Dice: 4",bc_map,0x00CED1;
	sleep 4000;
	announce "Dice: 3",bc_map,0x00CED1;
	sleep 3000;
	announce "Dice: 2",bc_map,0x00CED1;
	sleep 2000;
	announce "Dice: 1",bc_map,0x00CED1;
	sleep 1000;
	announce "Dice: Time's up.",bc_map,0x00CED1;
	donpcevent "evnt#1::OnEnable";
	announce "Dice: Winning number "+$@number+".",bc_map,0x00CED1;
	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,"zhakastia",97,62;
	areawarp "quiz_01",195,81,203,59,"zhakastia",97,62;
	areawarp "quiz_01",207,81,215,59,"zhakastia",97,62;
	goto L_Start;
	end;

L_Lose2:
	areawarp "quiz_01",183,81,191,59,"zhakastia",97,62;
	areawarp "quiz_01",195,81,203,59,"zhakastia",97,62;
	areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;;
	goto L_Start;
	end;
	
L_Lose3:
	areawarp "quiz_01",183,81,191,59,"zhakastia",97,62;
	areawarp "quiz_01",207,81,215,59,"zhakastia",97,62;
	areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;
	goto L_Start;
	end;
	
L_Lose4:
	areawarp "quiz_01",195,81,203,59,"zhakastia",97,62;
	areawarp "quiz_01",207,81,215,59,"zhakastia",97,62;
	areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;
	goto L_Start;
	end;
	
L_Champ:
	mapannounce "quiz_01","Dice: Come to me and tell me your name.",bc_map,0x00CED1;
	hideoffnpc "Dice#evnt1";
	end;
	
L_None:
	announce "No One Entered the Dice Event. Event Closed",bc_map,0x00CED1;
	hideonnpc "Dice#evnt1";
	end;
}
	
-	script	evnt#1	-1,{

OnEnable:
	areawarp "quiz_01",182,94,228,88,"prontera",156,174;
	areawarp "quiz_01",185,87,188,82,"prontera",156,174;
	areawarp "quiz_01",197,87,200,82,"prontera",156,174;
	areawarp "quiz_01",209,87,212,82,"prontera",156,174;
	areawarp "quiz_01",221,87,224,82,"prontera",156,174;
	end;
	}

// -- Mapflags
quiz_01	mapflag	nowarp
quiz_01	mapflag	nowarpto
quiz_01	mapflag	noteleport
quiz_01	mapflag	nosave
quiz_01	mapflag	nomemo
quiz_01	mapflag	nobranch
quiz_01	mapflag	noloot
quiz_01	mapflag	noskill
quiz_01	mapflag	nopenalty
Edited by GmOcean
Posted (edited)

@GmOcean Thanks for the  reply and i will inform you if there's still an error :)

 

 

 

I tried it and still the error   script_rid2sd: fatal error ! player not attached

Edited by Yoona
Posted (edited)

Really? Hmm, let me take another look, I may have missed something a bit more crucial than sleep2....

 

Edit: I updated my first post. If that doesn't work, than I have no idea why it's not working. But my suspect may be the announce, but they all look fine to me. :/ maybe I'm just tired @.@~!

Edited by GmOcean

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...