Jump to content
  • 0

dice every 1 hour


Boy

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  09/28/12
  • Last Seen:  

Hi rAthena

 

Anyone can help me to edit this dice script. How to make this event every 1 hour.

 

//        //=====//     /==/     /==/          /==/      
//       //     //     /==/     /==/  /=/     /==/         
//      //=====//              /==/  /=/             /==============/     /========/   /==//===/    /==/     /==/
//     //=//////    /==/      /==//=/       /==/    /==/==/==/==/==/     /     /  /   /==/         /==/     /==/
//    // ==        /==/      /==//=/       /==/    /==/  /==/  /==/     ======/  /   /==/         /==/     /==/
//   //   ==      /==/      /==/  /=/     /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/     /==/
//  //     ==    /==/      /==/   /=/    /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/=====/==/
// //       ==  /==/      /==/    /=/   /==/    /==/  /==/  /==/     /========/   /==/         /==///////==/
// ================ rAthena Script ====================================================================
//=== Made by Rikimaru
//==================== Information ====================================================================
//==== A Mini Dice Event Script
//================= Version : =========================================================================
//=== V 1.1   Fixed a typo in the Script [ Rikimaru ]
//=== V 1.0   Finished Scripting the Daily Reward Script [ Rikimaru ]
//============== Credits : ============================================================================
//=== Credits to Rikimaru for the Daily Reward Script
//=== rAthena Profile Link : http://rathena.org/board/user/434-rikimaru/
//=====================================================================================================
//*************************************************************************
prontera,181,163,5	script	Mini Dice	872,{
//============================== Settings ============================================
set .@dicename$,"[ Dice Master ]";
set .cost,"1000000";//CHANGE THIS TO YOUR ZENY COST AMOUNT
set .rewardid,14232;//CHANGE THIS TO YOUR REWARDID
set @rewamount,3;//CHANGE THIS TO YOUR REWARD AMOUNT
//========================= End of Settings ==========================================
OnMenu:
mes .@dicename$;
mes "Hello " + strcharinfo(0) + " ,do";
mes "you want to play a round of dice?";
mes "if you want to play you need to ";
mes "pay 1.000.000 Zenny every Round.";
switch(select("Yes,sure!:No,I'm unlucky!")) {
	case 1:
	mes .@dicename$;
	if(Zeny < .cost) goto l_nozeny;
	set Zeny, Zeny - .cost;
	mes "Okay we'll start...";
	set $@ran, rand(1,6);
	if ($@ran == 6) set .@dice1$,"6";
	if ($@ran == 5) set .@dice1$,"5";
	if ($@ran == 4) set .@dice1$,"4";
	if ($@ran == 3) set .@dice1$,"3";
	if ($@ran == 2) set .@dice1$,"2";
	if ($@ran == 1) set .@dice1$,"1";
	set $@ran2, rand(1,6);
	if ($@ran2 == 6) set .@dice2$,"6";
	if ($@ran2 == 5) set .@dice2$,"5";
	if ($@ran2 == 4) set .@dice2$,"4";
	if ($@ran2 == 3) set .@dice2$,"3";
	if ($@ran2 == 2) set .@dice2$,"2";
	if ($@ran2 == 1) set .@dice2$,"1";
	next;
	mes .@dicename$;
	mes "Okay I've got a " + .@dice1$ + ",";
	mes "You've got a " + .@dice2$+ " !";
	next;
	if(.@dice1$ > .@dice2$) goto l_loose;
	if(.@dice1$ < .@dice2$) goto l_win;
	if(.@dice1$ == .@dice2$) goto l_draw;
	close;
	case 2:
	mes .@dicename$;
	mes "Okay bye!";
	close;
	}
	l_nozeny:
	mes .@dicename$;
	mes "Sorry you need more Zenny!";
	close;
	l_loose:
	mes .@dicename$;
	mes "Haha,sorry you lost.";
	goto OnMenu;
	close;
	l_draw:
	mes .@dicename$;
	mes "Draw,let's play again!";
	goto OnMenu;
	close;
	l_win:
	goto OnPrize;
	OnPrize:
	mes .@dicename$;
	mes "Congratulations! You have won...";
	mes "Take this as a Prize!";
	next;
	mes .@dicename$;
	getitem .rewardid,@rewamount;
	mes "Goodbye!";
	close;
}

 

Thanks.

Edited by Boy
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


OnMinute00: // show npc every hours for 30 minutes.

hideoffnpc strnpcinfo(0);

sleep ( 30 * 60000 ); // how long it last.

hideonnpc strnpcinfo(0);

end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  09/28/12
  • Last Seen:  

@Emistry

 

Hi

 

Thanks for reply..the script should be like this right?

 

//        //=====//     /==/     /==/          /==/      
//       //     //     /==/     /==/  /=/     /==/         
//      //=====//              /==/  /=/             /==============/     /========/   /==//===/    /==/     /==/
//     //=//////    /==/      /==//=/       /==/    /==/==/==/==/==/     /     /  /   /==/         /==/     /==/
//    // ==        /==/      /==//=/       /==/    /==/  /==/  /==/     ======/  /   /==/         /==/     /==/
//   //   ==      /==/      /==/  /=/     /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/     /==/
//  //     ==    /==/      /==/   /=/    /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/=====/==/
// //       ==  /==/      /==/    /=/   /==/    /==/  /==/  /==/     /========/   /==/         /==///////==/
// ================ rAthena Script ====================================================================
//=== Made by Rikimaru
//==================== Information ====================================================================
//==== A Mini Dice Event Script
//================= Version : =========================================================================
//=== V 1.1   Fixed a typo in the Script [ Rikimaru ]
//=== V 1.0   Finished Scripting the Daily Reward Script [ Rikimaru ]
//============== Credits : ============================================================================
//=== Credits to Rikimaru for the Daily Reward Script
//=== rAthena Profile Link : http://rathena.org/board/user/434-rikimaru/
//=====================================================================================================
//*************************************************************************
prontera,181,163,5	script	Mini Dice	872,{
//============================== Settings ============================================
set .@dicename$,"[ Dice Master ]";
set .cost,"1000000";//CHANGE THIS TO YOUR ZENY COST AMOUNT
set .rewardid,14232;//CHANGE THIS TO YOUR REWARDID
set @rewamount,3;//CHANGE THIS TO YOUR REWARD AMOUNT
//========================= End of Settings ==========================================
OnMenu:
mes .@dicename$;
mes "Hello " + strcharinfo(0) + " ,do";
mes "you want to play a round of dice?";
mes "if you want to play you need to ";
mes "pay 1.000.000 Zenny every Round.";
switch(select("Yes,sure!:No,I'm unlucky!")) {
	case 1:
	mes .@dicename$;
	if(Zeny < .cost) goto l_nozeny;
	set Zeny, Zeny - .cost;
	mes "Okay we'll start...";
	set $@ran, rand(1,6);
	if ($@ran == 6) set .@dice1$,"6";
	if ($@ran == 5) set .@dice1$,"5";
	if ($@ran == 4) set .@dice1$,"4";
	if ($@ran == 3) set .@dice1$,"3";
	if ($@ran == 2) set .@dice1$,"2";
	if ($@ran == 1) set .@dice1$,"1";
	set $@ran2, rand(1,6);
	if ($@ran2 == 6) set .@dice2$,"6";
	if ($@ran2 == 5) set .@dice2$,"5";
	if ($@ran2 == 4) set .@dice2$,"4";
	if ($@ran2 == 3) set .@dice2$,"3";
	if ($@ran2 == 2) set .@dice2$,"2";
	if ($@ran2 == 1) set .@dice2$,"1";
	next;
	mes .@dicename$;
	mes "Okay I've got a " + .@dice1$ + ",";
	mes "You've got a " + .@dice2$+ " !";
	next;
	if(.@dice1$ > .@dice2$) goto l_loose;
	if(.@dice1$ < .@dice2$) goto l_win;
	if(.@dice1$ == .@dice2$) goto l_draw;
	close;
	case 2:
	mes .@dicename$;
	mes "Okay bye!";
	close;
	}
	l_nozeny:
	mes .@dicename$;
	mes "Sorry you need more Zenny!";
	close;
	l_loose:
	mes .@dicename$;
	mes "Haha,sorry you lost.";
	goto OnMenu;
	close;
	l_draw:
	mes .@dicename$;
	mes "Draw,let's play again!";
	goto OnMenu;
	close;
	l_win:
	goto OnPrize;
	OnPrize:
	mes .@dicename$;
	mes "Congratulations! You have won...";
	mes "Take this as a Prize!";
	next;
	mes .@dicename$;
	getitem .rewardid,@rewamount;
	mes "Goodbye!";
	close;
OnMinute00:  // show npc every hours for 30 minutes.
    hideoffnpc strnpcinfo(0);
    sleep ( 30 * 60000 );  // how long it last.
    hideonnpc strnpcinfo(0);
    end;
}

Thanks.

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