Petey Pablo Posted April 18, 2020 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 569 Reputation: 11 Joined: 11/24/11 Last Seen: March 7, 2022 Share Posted April 18, 2020 (edited) This is the error if input 0 exchange point [Error]: buildin_checkweight: Invalid amount '0'. [Debug]: Source (NPC): gold_room_main (invisible/not on a map) Full script here // https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; } Edited May 1, 2020 by Emistry topic merged Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted April 25, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 25, 2020 // https://rathena.org/board/topic/123699-goldroom-adding-limit-for-300mins/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60 * 1000); // 12 hours cooldown. Zeny -= .zeny_cost; deltimer strnpcinfo(3)+"::OnKick"; addtimer (300 * 60 * 1000), strnpcinfo(3)+"::OnKick"; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKick: if (strcharinfo(3) == .map$) { dispbottom "Gold Room : Time's UP !"; warp "SavePoint", 0, 0; } end; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; } 1 Quote Link to comment Share on other sites More sharing options...
0 Racaae Posted April 18, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 212 Reputation: 94 Joined: 06/02/12 Last Seen: 7 hours ago Share Posted April 18, 2020 Hi. Add this after input .@value,0,#GOLDPOINTS; if (.@value == 0) { mes "Exchange canceled."; close; } Quote Link to comment Share on other sites More sharing options...
0 Petey Pablo Posted April 18, 2020 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 569 Reputation: 11 Joined: 11/24/11 Last Seen: March 7, 2022 Author Share Posted April 18, 2020 On 4/18/2020 at 11:20 AM, Racaae said: Hi. Add this after input .@value,0,#GOLDPOINTS; if (.@value == 0) { mes "Exchange canceled."; close; } Thank you, how about adding this Limit farm maximum of 300 minutes(Auto kick after 300mins) Once you reach your maximum time, you'll need to wait 12 hours before entering again. Help me to add this on my gold room -Limit 300mins (Auto kick after 5hrs) -Once you reach the maximum time, you'll need to wait 12 hours to enter again -The time is per account based This is my goldroom script. Thank you and more power rA community. // https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; } Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted April 25, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 25, 2020 if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break; change into if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60); // 12 hours cooldown. Zeny -= .zeny_cost; warp .map$,0,0; } break; Quote Link to comment Share on other sites More sharing options...
0 Petey Pablo Posted April 25, 2020 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 569 Reputation: 11 Joined: 11/24/11 Last Seen: March 7, 2022 Author Share Posted April 25, 2020 45 minutes ago, Emistry said: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break; change into if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60); // 12 hours cooldown. Zeny -= .zeny_cost; warp .map$,0,0; } break; Thank you very much @Emistry I just want to ask if this with auto kick after 300mins farm and wait for 12 hours cooldown to enter again and how to adjust the time sorry I dont understand the (12 * 60 * 60) Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted April 25, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 25, 2020 // https://rathena.org/board/topic/123699-goldroom-adding-limit-for-300mins/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60); // 12 hours cooldown. Zeny -= .zeny_cost; deltimer strnpcinfo(3)+"::OnKick"; addtimer (300 * 60 * 1000), strnpcinfo(3)+"::OnKick"; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKick: if (strcharinfo(3) == .map$) { dispbottom "Gold Room : Time's UP !"; warp "SavePoint", 0, 0; } end; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; } Quote Link to comment Share on other sites More sharing options...
0 Petey Pablo Posted April 25, 2020 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 569 Reputation: 11 Joined: 11/24/11 Last Seen: March 7, 2022 Author Share Posted April 25, 2020 On 4/26/2020 at 1:09 AM, Emistry said: // https://rathena.org/board/topic/123699-goldroom-adding-limit-for-300mins/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60); // 12 hours cooldown. Zeny -= .zeny_cost; deltimer strnpcinfo(3)+"::OnKick"; addtimer (300 * 60 * 1000), strnpcinfo(3)+"::OnKick"; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKick: if (strcharinfo(3) == .map$) { dispbottom "Gold Room : Time's UP !"; warp "SavePoint", 0, 0; } end; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; } The 300mins and Auto kick is working but they still able to enter the goldroom after 300mins and I dont see the "You can only re-enter after bla bla after 12 hours" if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; It works! Thank you very much @Emistry. Quote Link to comment Share on other sites More sharing options...
Question
Petey Pablo
This is the error if input 0 exchange point
Full script here
topic merged
Link to comment
Share on other sites
7 answers 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.