dantoki Posted October 27, 2021 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 Share Posted October 27, 2021 prontera,155,181,5 script Sample 718,{ setarray .CoinID, 677; setarray .Zeny, 10000000; while( 1 ){ mes "What service you want ?"; next; switch( select("Zeny to Coin:Coin to Zeny") ){ Case 1: mes "What Coin you want ?"; set .@CoinMenu$,""; for( set .@i,0; .@i < getarraysize( .CoinID ); set .@i,.@i + 1 ){ mes "^0000FF"+getitemname( .CoinID[.@i] )+" : ^FF0000"+.Zeny[.@i]+"^000000 Zeny"; set .@CoinMenu$,.@CoinMenu$ + getitemname( .CoinID[.@i] )+":"; } set .@Coin,select( .@CoinMenu$ ) - 1; next; mes "Selected : ^00FF00"+getitemname( .CoinID[.@Coin] )+"^000000"; if( Zeny < .Zeny[.@Coin] ){ mes "It seem like you didnt have Enough Zeny for this."; next; break; } mes "You can exchange to ^FF0000"+( Zeny / .Zeny[.@Coin] )+" ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 ."; mes "How many ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 do you want ?"; input @Amount,0,( Zeny / .Zeny[.@Coin] ); if( !@Amount ) close; mes "You gained "+@Amount+" ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000."; set Zeny,Zeny - ( @Amount * .Zeny[.@Coin] ); getitem .CoinID[.@Coin],@Amount; next; break; Case 2: mes "Which Coin ?"; set .@CoinMenu$,""; for( set .@i,0; .@i < getarraysize( .CoinID ); set .@i,.@i + 1 ){ mes "^0000FF"+getitemname( .CoinID[.@i] )+" : ^FF0000"+countitem( .CoinID[.@i] )+"^000000 Available"; set .@CoinMenu$,.@CoinMenu$ + getitemname( .CoinID[.@i] )+":"; } do{ set .@Coin,select( .@CoinMenu$ ) - 1; }while( !countitem( .CoinID[.@Coin] ) ); next; mes "Selected : ^00FF00"+getitemname( .CoinID[.@Coin] )+"^000000"; mes "You can exchange ^0000FF"+countitem( .CoinID[.@Coin] )+" "+getitemname( .CoinID[.@Coin] )+"^000000 to ^FF0000"+( countitem( .CoinID[.@Coin] ) * .Zeny[.@Coin] )+"^000000 Zeny."; mes "How many ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 do you want to change into Zeny ?"; input @Amount,0,( ( 1000000000 - Zeny ) / .Zeny[.@Coin] ); if( !@Amount ) close; mes "You gained "+( @Amount * .Zeny[.@Coin] )+" Zeny."; delitem .CoinID[.@Coin],@Amount; set Zeny,Zeny + ( @Amount * .Zeny[.@Coin] ); next; break; } } } i want to add limit here maximum 50 coins per day that resets every 12:00am and every 1 coin needs 1 of #questpoints and 10,000,000 zeny. but for coins to zeny doesn't need the #questpoints. Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted October 28, 2021 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: 12 hours ago Share Posted October 28, 2021 Use gettime command to remember day. (Both players / NPC) If day != day reset players variables to 0 Quote Link to comment Share on other sites More sharing options...
Question
dantoki
prontera,155,181,5 script Sample 718,{ setarray .CoinID, 677; setarray .Zeny, 10000000; while( 1 ){ mes "What service you want ?"; next; switch( select("Zeny to Coin:Coin to Zeny") ){ Case 1: mes "What Coin you want ?"; set .@CoinMenu$,""; for( set .@i,0; .@i < getarraysize( .CoinID ); set .@i,.@i + 1 ){ mes "^0000FF"+getitemname( .CoinID[.@i] )+" : ^FF0000"+.Zeny[.@i]+"^000000 Zeny"; set .@CoinMenu$,.@CoinMenu$ + getitemname( .CoinID[.@i] )+":"; } set .@Coin,select( .@CoinMenu$ ) - 1; next; mes "Selected : ^00FF00"+getitemname( .CoinID[.@Coin] )+"^000000"; if( Zeny < .Zeny[.@Coin] ){ mes "It seem like you didnt have Enough Zeny for this."; next; break; } mes "You can exchange to ^FF0000"+( Zeny / .Zeny[.@Coin] )+" ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 ."; mes "How many ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 do you want ?"; input @Amount,0,( Zeny / .Zeny[.@Coin] ); if( !@Amount ) close; mes "You gained "+@Amount+" ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000."; set Zeny,Zeny - ( @Amount * .Zeny[.@Coin] ); getitem .CoinID[.@Coin],@Amount; next; break; Case 2: mes "Which Coin ?"; set .@CoinMenu$,""; for( set .@i,0; .@i < getarraysize( .CoinID ); set .@i,.@i + 1 ){ mes "^0000FF"+getitemname( .CoinID[.@i] )+" : ^FF0000"+countitem( .CoinID[.@i] )+"^000000 Available"; set .@CoinMenu$,.@CoinMenu$ + getitemname( .CoinID[.@i] )+":"; } do{ set .@Coin,select( .@CoinMenu$ ) - 1; }while( !countitem( .CoinID[.@Coin] ) ); next; mes "Selected : ^00FF00"+getitemname( .CoinID[.@Coin] )+"^000000"; mes "You can exchange ^0000FF"+countitem( .CoinID[.@Coin] )+" "+getitemname( .CoinID[.@Coin] )+"^000000 to ^FF0000"+( countitem( .CoinID[.@Coin] ) * .Zeny[.@Coin] )+"^000000 Zeny."; mes "How many ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 do you want to change into Zeny ?"; input @Amount,0,( ( 1000000000 - Zeny ) / .Zeny[.@Coin] ); if( !@Amount ) close; mes "You gained "+( @Amount * .Zeny[.@Coin] )+" Zeny."; delitem .CoinID[.@Coin],@Amount; set Zeny,Zeny + ( @Amount * .Zeny[.@Coin] ); next; break; } } }
i want to add limit here maximum 50 coins per day that resets every 12:00am
and every 1 coin needs 1 of #questpoints and 10,000,000 zeny.
but for coins to zeny doesn't need the #questpoints.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.