Jump to content
  • 0

How to add on function to Refiner Npc


ahloi007

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  10/15/12
  • Last Seen:  

Dear all,

Can I know how do I add on a function for the existing refiner npc?

Example: Before you confirm what item u need to refine ( upper headgear, armor and weapon ), the npc will ask "Do you have xxx item ? It will protect your armor/weapon from broken." 

If yes, it will consume the xxx item to protect the armor / weapon from broken if the refine failed; No will just keep on continue refine the item.

The refine rate still remain the same, nothing change . But if the refine failed, the armor/weapon will still be there just the xxx item gone. 

Sorry for my bad english. Hope you guys understand what I mean.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

its a function, not a NPC lol

just load the function above to overwrite the existing function 

or add these NPC

// Weapon/Armor Refiners
//============================================================
prt_in,63,60,0	script	Hollgrehenn	85,{
	callfunc "refinemain","Hollgrehenn",0;
	end;
}
morocc_in,73,38,6	script	Aragham	99,{
	callfunc "refinemain","Aragham",0;
	end;
}
payon,144,173,5	script	Antonio	88,{
	callfunc "refinemain","Antonio",0;
	end;
}
alberta_in,28,58,0	script	Fredrik	85,{
	callfunc "refinemain","Fredrik",0;
	end;
}
yuno_in01,171,21,4	script	Lambert	88,{
	callfunc "refinemain","Lambert",0;
	end;
}
ein_in01,24,87,5	script	Manthasman	826,{
	callfunc "refinemain","Manthasman Pruhag",0;
	end;
}
lhz_in02,282,20,7	script	Fulerr	869,{
	callfunc "refinemain","Fulerr",0;
	end;
}

 

Link to comment
Share on other sites

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   8
  • Joined:  09/16/18
  • Last Seen:  

On 9/1/2019 at 6:47 PM, Emistry said:

hi i tried this its working but when im trying to upgrade a level 4 weapon to +5 its not asking for the protection Item it only ask if the level 4 weapon is already level 5 so basically i cannot use the protection if im gonna upgrade it to +5

 

Fixed By
Find :
.@failsafe_rate = 40;

 

To
.@failsafe_rate = 60; 
Edited by lelouchxv
Figured it out
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

you can try this.

https://pastebin.com/raw/h0HQ5Axa

	.@failsafe_itemid = 7539;
	.@failsafe_rate = 40;
	if (.@failsafe_itemid) {
		if (getequippercentrefinery(.@part) <= .@failsafe_rate) {
			mes "[Item Protection]";
			mes "Do you have "+getitemname(.@failsafe_itemid)+" item ? It will protect your armor/weapon from broken.";
			next;
			if (select((countitem(.@failsafe_itemid)? "Yes":""), "No") == 1) {
				.@failsafe = 1;
			}
		}
	}

find all these part and edit.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  10/15/12
  • Last Seen:  

3 hours ago, Emistry said:

you can try this.

https://pastebin.com/raw/h0HQ5Axa


	.@failsafe_itemid = 7539;
	.@failsafe_rate = 40;
	if (.@failsafe_itemid) {
		if (getequippercentrefinery(.@part) <= .@failsafe_rate) {
			mes "[Item Protection]";
			mes "Do you have "+getitemname(.@failsafe_itemid)+" item ? It will protect your armor/weapon from broken.";
			next;
			if (select((countitem(.@failsafe_itemid)? "Yes":""), "No") == 1) {
				.@failsafe = 1;
			}
		}
	}

find all these part and edit.

Im sorry that I forgot mention that my server is Pre-re and the max refine is +10 only

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  10/15/12
  • Last Seen:  

On 9/2/2019 at 12:47 PM, Emistry said:

Emistry, the npc do appeared in game but doesn't working perfectly. 

1.jpg.db10036e616a1251eae38e811085e20c.jpg

and I found this error too.

On 9/3/2019 at 4:53 AM, Emistry said:

its a function, not a NPC lol

just load the function above to overwrite the existing function 

or add these NPC


// Weapon/Armor Refiners
//============================================================
prt_in,63,60,0	script	Hollgrehenn	85,{
	callfunc "refinemain","Hollgrehenn",0;
	end;
}
morocc_in,73,38,6	script	Aragham	99,{
	callfunc "refinemain","Aragham",0;
	end;
}
payon,144,173,5	script	Antonio	88,{
	callfunc "refinemain","Antonio",0;
	end;
}
alberta_in,28,58,0	script	Fredrik	85,{
	callfunc "refinemain","Fredrik",0;
	end;
}
yuno_in01,171,21,4	script	Lambert	88,{
	callfunc "refinemain","Lambert",0;
	end;
}
ein_in01,24,87,5	script	Manthasman	826,{
	callfunc "refinemain","Manthasman Pruhag",0;
	end;
}
lhz_in02,282,20,7	script	Fulerr	869,{
	callfunc "refinemain","Fulerr",0;
	end;
}

 

Thanks for your information It's work perfectly!!! 

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