Jump to content

Question

Posted

Hello. Can somebody help me with my script:

 

new_1-2,95,71,4    script    +10 Refiner    100,{
    for ( .@i = 1; .@i <= 10; .@i++ ) {
        if ( getequipisequiped(.@i) ) {
            .@id = getequipid(.@i);
            .@ref = getequiprefinerycnt(.@i);
            .@card1 = getequipcardid( .@i, 0 );
            .@card2 = getequipcardid( .@i, 1 );
            .@card3 = getequipcardid( .@i, 2 );
            .@card4 = getequipcardid( .@i, 3 );
            delitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3, .@card4;
            getitem2 .@id, 1, 1, 101, 0, .@card1, .@card2, .@card3, .@card4;
            equip .@id;
        }
    }
    end;
}
 
It refines non-refinable items. Can someone help me for it not to refine the non-refinable items? thanks.

6 answers to this question

Recommended Posts

Posted (edited)

new_1-2,95,71,4	script	+101 Refiner	100,{
	for ( .@i = 1; .@i <= 10; .@i++ ) {
		if ( getequipisequiped(.@i) && getequipisenableref(.@i) ) {
			.@id = getequipid(.@i);
			.@ref = getequiprefinerycnt(.@i);
			.@card1 = getequipcardid( .@i, 0 );
			.@card2 = getequipcardid( .@i, 1 );
			.@card3 = getequipcardid( .@i, 2 );
			.@card4 = getequipcardid( .@i, 3 );
			delitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3, .@card4;
			getitem2 .@id, 1, 1, 101, 0, .@card1, .@card2, .@card3, .@card4;
			equip .@id;
		}
	}
	end;
}
The problem is that script is using:

getitem2 .@id, 1, 1, 101, 0, .@card1, .@card2, .@card3, .@card4;

So it's bypassing refine restrictions.

Added: && getequipisenableref(.@i)

To check if the equipped item can be refined.

Also please use [ code][ /code] without spaces when posting scripts.

Edited by Skorm
  • Upvote 1
Posted

Like this ?

new_1-2,95,71,4	script	+10 Refiner	100,{
	for ( .@i = 1; .@i <= 10; .@i++ ) {
		 if ( getequipisequiped(.@i) )
			while( getequiprefinerycnt(.@i) < 10 ) successrefitem .@i;
	}
	end;
}
Posted

Like this ?

new_1-2,95,71,4	script	+10 Refiner	100,{
	for ( .@i = 1; .@i <= 10; .@i++ ) {
		 if ( getequipisequiped(.@i) )
			while( getequiprefinerycnt(.@i) < 10 ) successrefitem .@i;
	}
	end;
}
I don't think so that would only refine the item to +10... There are commands that go past that. Unless the 101 was just a typo on his part. I would add getequipisenableref(.@i) anyways as a precaution. I don't see why you feel the need to omit that.
Posted

I would add getequipisenableref(.@i) anyways as a precaution.

You're right I forgot this command

 

prontera,155,178,4	script	+10 Refiner	100,{
	for ( .@i = 1; .@i <= 10; .@i++ ) {
		if ( getequipisequiped(.@i) && getequipisenableref(.@i) )
			while( getequiprefinerycnt(.@i) < 10 ) successrefitem .@i;
	}
	end;
}

 

I don't think so that would only refine the item to +10

Try it if you doubt

Posted (edited)

I don't think so that would only refine the item to +10

Try it if you doubt
...

 

while( getequiprefinerycnt(.@i) < 10 ) successrefitem .@i;
f305fbfc45ce2bec09ceb587e76b30fc.png?136

It did exactly what I thought it was going to do.

What I'm saying is he might want his items to be +101... because...

getitem2 .@id, 1, 1, 101, 0, .@card1, .@card2, .@card3, .@card4;

Edited by Skorm

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