Jump to content
  • 0

Smart Refine Announcement when exceed on safe limit


Eross

Question


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.09
  • Content Count:  377
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Hi ! can you help me with this /merchants/refine.txt script? ... Ive inserted a line where the refiner announce to all if I reached +7 and up ..but the problem is , weapons and armors have different level and different safe refines ... The question is how can I make the refiner detect if i am refining level 4 weapon ? It should announce that "player name has successfully refined Infiltrator to +5" and if it is level 1 weapon it should announce if I refined it on +8 or +9? Same as armors , It should announce success of +5 armor also ... Sorry for my bad english ^_^ .. To get it to the bottomline .. The Refine Npc should only announce  the following.

 

LEVEL 1 WEAPON = IF REACHED +9

LEVEL 2 WEAPON = IF REACHED +8

LEVEL 3 WEAPON = IF REACHED +6

LEVEL 4 WEAPON = IF REACHED +5

Quote

		successrefitem .@part;
		if (getequiprefinerycnt(.@part) >= 7)
		announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;
		emotion ET_BEST;
		.@refinecnt = .@refinecnt - 1;
		.@refinerycnt = getequiprefinerycnt(.@part);
		next;

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

Change 

if (getequiprefinerycnt(.@part) >= 7)
announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;

To

switch (getiteminfo(getequipid(.@part), 13)) {
	case 1: .@asd = 9; break;
	case 2: .@asd = 8; break;
	case 3: .@asd = 6; break;
	case 4: .@asd = 5; break;
	default: break;
}
if (getequiprefinerycnt(.@part) >= .@asd)
announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.09
  • Content Count:  377
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

12 hours ago, Patskie said:

Change 


if (getequiprefinerycnt(.@part) >= 7)
announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;

To


switch (getiteminfo(getequipid(.@part), 13)) {
	case 1: .@asd = 9; break;
	case 2: .@asd = 8; break;
	case 3: .@asd = 6; break;
	case 4: .@asd = 5; break;
	default: break;
}
if (getequiprefinerycnt(.@part) >= .@asd)
announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;

 

Hi ! Thankyou for your response .. I tried the script but nothing happened .. Is it possible to get the Weapon Level ? if it is Weapon Level 1 the safe is +7 right ? so the refiner will congratulate you if you successfully refine it to +8 +9 and +10 ... sane with level 2 3 and 4 ... 4 is +4 refine if im not mistaken so Hollgrehenn must announce if you succeed on refining it to +5 same with other levels and also with armor .

 

I made a mistake @Patskie hehe my bad .. It works , I pasted your code on wrong line ..I added it on New Functions heheh sorry .Thankyou

 

I added this line  coz I think it is for armors .. and it works also hehe ^_^

default: ; break;

to 

default:.@asd = 5; break;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  225
  • Topics Per Day:  0.14
  • Content Count:  798
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

On 5/11/2020 at 6:40 PM, erjsanmiguel said:

Hi ! Thankyou for your response .. I tried the script but nothing happened .. Is it possible to get the Weapon Level ? if it is Weapon Level 1 the safe is +7 right ? so the refiner will congratulate you if you successfully refine it to +8 +9 and +10 ... sane with level 2 3 and 4 ... 4 is +4 refine if im not mistaken so Hollgrehenn must announce if you succeed on refining it to +5 same with other levels and also with armor .

 

I made a mistake @Patskie hehe my bad .. It works , I pasted your code on wrong line ..I added it on New Functions heheh sorry .Thankyou

 

I added this line  coz I think it is for armors .. and it works also hehe ^_^


default: ; break;

to 


default:.@asd = 5; break;

 

hi sir can i ask where did you exactly insert the script? thanks

 

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