Jump to content
  • 0

N>help on my dice event


chromus28

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

Guys can anyone fix this script? i need to make the prize is CASH points into Items..

 

//= Info:
//
//= This event triggers every 15 minutes of the server time.
//=======================================
//= Mechanics:
//
//= Players have to run / choose a box between box 1 up to box 4
//= After that, that NPCs picks a number randomly
//= (obviously,between 1-4)
//= All players that are not inside the box that the NPC chose will
//= all be eliminated.
//= This event would run until there's only 1 player left.
//= Winner would get an incrementation on its #EVENTPOINTS variable
//= (users can simply just change the prize given.)
//
//========================================

-	script	DiceTrigger	-1,{

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


OnMinute15:
if(agitcheck() == 1 || $@diceon == 1) end;
enablenpc "Dice Event Warper#dice";
announce "Dice Event: We are going to have a Dice Event",bc_all;
sleep2 1000;
announce "Dice Event: For those who want to join, please warp @ middle of Main Town",bc_all;
sleep2 1000;
announce "Dice Event: The Warper would be open for 1 minute",bc_all;
sleep2 30000;
announce "Dice Event: Last 30 Seconds.",bc_all;
sleep2 30000;
announce "Dice Event: Warper Closed.",bc_all;
disablenpc "Dice Event Warper#dice";
donpcevent "DiceEvent::OnDiceStart";
set $@diceon,1;
end;

}

prontera,155,172,4	script	Dice Event Warper#dice	723,{

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

}

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

mes "[ Got Stuck? ]";
mes "Do you wish to go back?";
menu "Yes",-;
warp "prontera",155,195;
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 500;
mapannounce "quiz_02","Rules are simple:",bc_blue;
sleep2 400;
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 300;
mapannounce "quiz_02","All you have to do is go to box of the number you want",bc_blue;
sleep2 200;
mapannounce "quiz_02","Example, If I get the number 4, All players standing on number 1 to 3 loses.",bc_blue;
sleep2 100;
mapannounce "quiz_02","We'll do it again and again until we have 1 player left on this map.",bc_blue;
sleep2 500;
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 400;
mapannounce "quiz_02","That's it.. Now let's get it on!",bc_blue;
sleep2 300;
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,"prontera",0,0;
areawarp "quiz_02",80,85,80,76,"prontera",0,0;
areawarp "quiz_02",31,85,31,76,"prontera",0,0;
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:
areawarp "quiz_02",33,73,41,52,"prontera",0,0;
areawarp "quiz_02",45,73,53,52,"prontera",0,0;
areawarp "quiz_02",57,73,65,52,"prontera",0,0;
goto L_start;
end;

L_Lose2:
areawarp "quiz_02",33,73,41,52,"prontera",0,0;
areawarp "quiz_02",45,73,53,52,"prontera",0,0;
areawarp "quiz_02",69,73,77,52,"prontera",0,0;
goto L_start;
end;

L_Lose3:
areawarp "quiz_02",33,73,41,52,"prontera",0,0;
areawarp "quiz_02",57,73,65,52,"prontera",0,0;
areawarp "quiz_02",69,73,77,52,"prontera",0,0;
goto L_start;
end;

L_Lose4:
areawarp "quiz_02",45,73,53,52,"prontera",0,0;
areawarp "quiz_02",57,73,65,52,"prontera",0,0;
areawarp "quiz_02",69,73,77,52,"prontera",0,0;
goto L_start;
end;

L_noone:
announce "No one won the Dice Event!",bc_all;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
set $@diceon,0;
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 674,10;
announce strcharinfo(0)+" won the Dice Event!",bc_all;
disablenpc "Claim Your Prize!#dice";
disablenpc "Dice Event Warper#dice";
warp "prontera",0,0;
set $@diceon,0;
close;
end;

}

quiz_02	mapflag	noskill
quiz_02	mapflag	nosave	SavePoint
quiz_02	mapflag	nomemo
quiz_02	mapflag	nobranch
quiz_02	mapflag	noexp
quiz_02	mapflag	nodrop
quiz_02	mapflag	nochat
quiz_02	mapflag	novending
quiz_02	mapflag	nowarp
quiz_02	mapflag	nowarpto
quiz_02	mapflag	noreturn

 

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Bug in such a way that?

 

 

Guys can anyone fix this script? i need to make the prize is CASH points into Items..
 

Change :

set #CASHPOINTS,#CASHPOINTS+70;
set class_s,class_s+3;
dispbottom "Gained [70] zeRO points, you now have ["+#CASHPOINTS+"]";
warp "prontera",247,323;
end;

to :

getitem item_id, amount;
set class_s,class_s+3;
warp "prontera",247,323;
end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

You mean instead of getting item(s) as a reward. Make it cashpoints?

 

If so, then change :

getitem 674,10;

to :

set #CASHPOINTS, #CASHPOINTS + 5; // Add 5 cashpoints
dispbottom "Your total cash points is " +#CASHPOINTS+ " cash points.";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

aww sorry wrong script...

 

-	script	DiceHide	-1,{
OnInit:
	disablenpc "Dice Manager#1";
	disablenpc "Prize Manager";
	pvpoff "quiz_01";
	end;
}

-	script	DICE#1	-1,{
OnClock0210:
OnClock0410:
OnClock0610:
OnClock0810:
OnClock1010:
OnClock1210:
OnClock1410:
OnClock1610:
OnClock1810:
OnClock2010:
OnClock2210:
	goto startdice;
	end;

startdice:
	disablenpc "Prize Manager";
	mapwarp "quiz_01","prontera",0,0;
	announce "The Dice Event will start soon",0;
	sleep2 2000;
	announce "If you want to participant warp to Prontera now",0;
	sleep2 2000;
	announce "You have 2 Minutes to register",0;
	enablenpc "Dice Manager#1";
	sleep2 120000;
	announce "The registration has closed",0;
	disablenpc "Dice Manager#1";
	donpcevent "Dice Manager#1::OnDiceStart";
	end;
}

prontera,151,180,5	script	Dice Manager#1	715,{

mes "Do you want to register to the dice event?";
menu "I want to register",L_yes,"Later",L_no;

L_yes:
warp "quiz_01" ,49,88;
set #dice_play, 1;
end;

L_no:
mes "Ok";
close;

OnDiceStart:
mapannounce "quiz_01","Go to the box 1,2,3,4 and no staying on the outside of box",0;
sleep2 2000;
mapannounce "quiz_01","This is the mechanic of the event",0;
sleep2 2000;
mapannounce "quiz_01","I will say a number between 1-4",0;
sleep2 2000;
mapannounce "quiz_01","If your box number is the same with my number, you're safe you will proceed to the next round",0;
sleep2 2000;
mapannounce "quiz_01","And if your box number is not the same will warp to brasilis",0;
sleep2 2000;
mapannounce "quiz_01","Good Luck",0;
sleep2 2000;
mapannounce "quiz_01","I will pick in 30 seconds! good luck!",0;
sleep2 30000;
mapannounce "quiz_01","Dice Manager: OK! I will pick now a number",0;
sleep2 2000;
goto Start;

Start:
	switch(rand(1,4)) {
	Case 1:
	mapannounce "quiz_01","The Winner is 1",0;
	areawarp "quiz_01",45,81,53,59,"prontera",247,323;
	areawarp "quiz_01",57,81,65,59,"prontera",247,323;
	areawarp "quiz_01",69,81,77,59,"prontera",247,323;
	areawarp "quiz_01",32,94,78,86,"prontera",247,323;
	areawarp "quiz_01",36,85,38,82,"prontera",247,323;
	areawarp "quiz_01",48,85,50,82,"prontera",247,323;
	areawarp "quiz_01",60,85,62,82,"prontera",247,323;
	areawarp "quiz_01",72,85,74,82,"prontera",247,323;
	
	goto OnWinner;
	end;
	break;
	Case 2:
	mapannounce "quiz_01","The Winner is 2",0;
	areawarp "quiz_01",33,81,41,59,"prontera",247,323;
	areawarp "quiz_01",57,81,65,59,"prontera",247,323;
	areawarp "quiz_01",69,81,77,59,"prontera",247,323;
	areawarp "quiz_01",32,94,78,86,"prontera",247,323;
	areawarp "quiz_01",36,85,38,82,"prontera",247,323;
	areawarp "quiz_01",48,85,50,82,"prontera",247,323;
	areawarp "quiz_01",60,85,62,82,"prontera",247,323;
	areawarp "quiz_01",72,85,74,82,"prontera",247,323;
	goto OnWinner;
	end;
	break;
	Case 3:
	mapannounce "quiz_01","The Winner is 3",0;
	areawarp "quiz_01",45,81,53,59,"prontera",247,323;
	areawarp "quiz_01",33,81,41,59,"prontera",247,323;
	areawarp "quiz_01",69,81,77,59,"prontera",247,323;
	areawarp "quiz_01",32,94,78,86,"prontera",247,323;
	areawarp "quiz_01",36,85,38,82,"prontera",247,323;
	areawarp "quiz_01",48,85,50,82,"prontera",247,323;
	areawarp "quiz_01",60,85,62,82,"prontera",247,323;
	areawarp "quiz_01",72,85,74,82,"prontera",247,323;
	goto OnWinner;
	end;
	break;
	Case 4:
	mapannounce "quiz_01","The Winner is 4",0;
	areawarp "quiz_01",45,81,53,59,"prontera",247,323;
	areawarp "quiz_01",33,81,41,59,"prontera",247,323;
	areawarp "quiz_01",57,81,65,59,"prontera",247,323;
	areawarp "quiz_01",32,94,78,86,"prontera",247,323;
	areawarp "quiz_01",36,85,38,82,"prontera",247,323;
	areawarp "quiz_01",48,85,50,82,"prontera",247,323;
	areawarp "quiz_01",60,85,62,82,"prontera",247,323;
	areawarp "quiz_01",72,85,74,82,"prontera",247,323;
	goto Onwinner;
	end;
	break;
	}
	end;
	
	

OnWinner:
mapannounce "quiz_01","To those who are winner",0;
sleep2 2000;
mapannounce "quiz_01"," Please go in the middle to claim you prize",0;
	enablenpc "Prize Manager";
	end;

OnPCLoadMapEvent:
	if (#dice_play == 0) {
		warp "prontera",0,0;
		end;
	}
		end;
OnPCLogOutEvent:
	if (#dice_play == 1 ) {
		set #dice_play, 1;
		end;
	}
		end;
}
quiz_01,49,90,1	script	Prize Manager	715,{

set #CASHPOINTS,#CASHPOINTS+70;
set class_s,class_s+3;
dispbottom "Gained [70] zeRO points, you now have ["+#CASHPOINTS+"]";
warp "prontera",247,323;
end;

}
quiz_01	mapflag	nowarp
quiz_01	mapflag	nowarpto
quiz_01	mapflag	loadevent
quiz_01	mapflag	nomemo
quiz_01	mapflag	nosave

this one sir... coz the first script is bug

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

Bug in such a way that?

 

 

 

Guys can anyone fix this script? i need to make the prize is CASH points into Items..
 

Change :

set #CASHPOINTS,#CASHPOINTS+70;
set class_s,class_s+3;
dispbottom "Gained [70] zeRO points, you now have ["+#CASHPOINTS+"]";
warp "prontera",247,323;
end;

to :

getitem item_id, amount;
set class_s,class_s+3;
warp "prontera",247,323;
end;

is this auto kick when they got the prize? sorry im not yet good on scripting >.<

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

After getting the item, the player will be warped to prontera

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

After getting the item, the player will be warped to prontera

sir i think this dice event only pick number 1?? can you please check if this script is really fix?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

After getting the item, the player will be warped to prontera

sir i think this dice event only pick number 1?? can you please check if this script is really fix?

Reference : rand command

switch(rand(1,4)) {
    Case 1:
    mapannounce "quiz_01","The Winner is 1",0;
    areawarp "quiz_01",45,81,53,59,"prontera",247,323;
    areawarp "quiz_01",57,81,65,59,"prontera",247,323;
    areawarp "quiz_01",69,81,77,59,"prontera",247,323;
    areawarp "quiz_01",32,94,78,86,"prontera",247,323;
    areawarp "quiz_01",36,85,38,82,"prontera",247,323;
    areawarp "quiz_01",48,85,50,82,"prontera",247,323;
    areawarp "quiz_01",60,85,62,82,"prontera",247,323;
    areawarp "quiz_01",72,85,74,82,"prontera",247,323;
    
    goto OnWinner;
    end;
    break;
    Case 2:
    mapannounce "quiz_01","The Winner is 2",0;
    areawarp "quiz_01",33,81,41,59,"prontera",247,323;
    areawarp "quiz_01",57,81,65,59,"prontera",247,323;
    areawarp "quiz_01",69,81,77,59,"prontera",247,323;
    areawarp "quiz_01",32,94,78,86,"prontera",247,323;
    areawarp "quiz_01",36,85,38,82,"prontera",247,323;
    areawarp "quiz_01",48,85,50,82,"prontera",247,323;
    areawarp "quiz_01",60,85,62,82,"prontera",247,323;
    areawarp "quiz_01",72,85,74,82,"prontera",247,323;
    goto OnWinner;
    end;
    break;
    Case 3:
    mapannounce "quiz_01","The Winner is 3",0;
    areawarp "quiz_01",45,81,53,59,"prontera",247,323;
    areawarp "quiz_01",33,81,41,59,"prontera",247,323;
    areawarp "quiz_01",69,81,77,59,"prontera",247,323;
    areawarp "quiz_01",32,94,78,86,"prontera",247,323;
    areawarp "quiz_01",36,85,38,82,"prontera",247,323;
    areawarp "quiz_01",48,85,50,82,"prontera",247,323;
    areawarp "quiz_01",60,85,62,82,"prontera",247,323;
    areawarp "quiz_01",72,85,74,82,"prontera",247,323;
    goto OnWinner;
    end;
    break;
    Case 4:
    mapannounce "quiz_01","The Winner is 4",0;
    areawarp "quiz_01",45,81,53,59,"prontera",247,323;
    areawarp "quiz_01",33,81,41,59,"prontera",247,323;
    areawarp "quiz_01",57,81,65,59,"prontera",247,323;
    areawarp "quiz_01",32,94,78,86,"prontera",247,323;
    areawarp "quiz_01",36,85,38,82,"prontera",247,323;
    areawarp "quiz_01",48,85,50,82,"prontera",247,323;
    areawarp "quiz_01",60,85,62,82,"prontera",247,323;
    areawarp "quiz_01",72,85,74,82,"prontera",247,323;
    goto Onwinner;
    end;
    break;
}
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...