Jump to content
  • 0

Help me with the Eq. Enchanter


Question

Posted (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 by Zalbahis

2 answers to this question

Recommended Posts

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

Posted

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!

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...