Zalbahis Posted June 23, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 06/18/13 Last Seen: August 7, 2013 Share Posted June 23, 2013 (edited) Helo and Good day!, I'm really noob at this so please help me Thanks!..I was messing with the original script just to get the single menu and I wasn't able to fix the Enchantment Success rate.. Anyone could point it out for me..Original Topic: http://rathena.org/board/topic/78800-optimized-item-enchanter/?hl=enchanter My Messed script: rachel,100,134,5 script ldfhsdfkljs 100,{ disable_items; mes "do you want to enchant your equipped armor ?"; next; if ( select ( "yes", "no" ) == 2 ) close; if ( !getequipisequiped( EQI_ARMOR ) ) { mes "you did not equip an armor at the moment"; close; } .@id = getequipid( EQI_ARMOR ); .@ref = getequiprefinerycnt( EQI_ARMOR ); .@card4 = getequipcardid( EQI_ARMOR, 3 ); if ( .@card1 == 255 || .@card1 == 254 ) { mes "I can't enchant a signed equipment"; close; } if ( .@card4 ) { mes "this armor has already enchanted"; close; } if( .rate[ .@r ] < rand( 1,100 ) ) { mes "Sorry enchancement failed."; close; } switch(select("STR +3")){ progressbar "ffff00",3; case 1: delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, .@card4; if( !.@card4 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4702 + .@r; equip .@id; // .@rand = rand(.totalchance); // while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++; // .@o = rand(0,5); // orb of str/int/dex ... //delitem .item_id[0], .item_req0[ .@r ]; //delitem .item_id[1], .item_req1[ .@r ]; close; } OnInit: waitingroom "Item Enchanter",0; setarray .rate, 50,30,20; // rate of enchant //setarray .item_req0, 3,5,7; // how much item_id[0] pc need //setarray .item_req1, 1,3,5; // how much item_id[1] pc need //while ( .@i < 3 ) { //.totalchance = .totalchance + .rate[.@i]; //.@i++; //} end; } Bump! Please I need help asking nicely Edited June 23, 2013 by Zalbahis Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 23, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted June 23, 2013 if( .rate[ .@r ] < rand( 1,100 ) ) { just edit this part to anything you wan...for your rate calculation... it's default to 50% since you removed the .@r variable ..and .rate[0] is 50 ... Quote Link to comment Share on other sites More sharing options...
Zalbahis Posted June 24, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 06/18/13 Last Seen: August 7, 2013 Author Share Posted June 24, 2013 Yeah! it's 50% but it doesn't fail even 1 time it keeps it's Success to 100%.. I dunu why.. if( .rate[ .@r ] < rand( 1,100 ) ) { Okay, Imma mess in this part and I'll give some reply what will be the outcome Cheers! Quote Link to comment Share on other sites More sharing options...
Question
Zalbahis
Helo and Good day!, I'm really noob at this so please help me Thanks!..
I was messing with the original script just to get the single menu and I wasn't able to fix the Enchantment Success rate..
Anyone could point it out for me..
Original Topic: http://rathena.org/board/topic/78800-optimized-item-enchanter/?hl=enchanter
My Messed script:
Bump! Please I need help asking nicely
Edited by ZalbahisLink to comment
Share on other sites
2 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.