Jump to content
  • 0

Refiner


greenieken

Question


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  154
  • Reputation:   1
  • Joined:  05/02/12
  • Last Seen:  

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.
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  154
  • Reputation:   1
  • Joined:  05/02/12
  • Last Seen:  

BUMP

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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.
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...