Jump to content
  • 0

Refining NPC Script


Oraios

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  11/06/12
  • Last Seen:  

Dear community,

could anyone help me to write a script of a "refiner npc" which refine's every part of the equipment (also mid and lower hg) safe to +5 and from +6 - +10 there's a chance of 25% that it refines the item to the next lvl.

 

Best regards!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

Hello Oraios, how are you buddy!?

I can do it for you. I'll be back soon with your script.

C ya!

 

EDIT--
Here is your request:

prontera,150,150,5	script	Nemir Faiax	726,{

	mes "[Nemir Faiax]";
	mes "Hello young "+(Sex ? "man" : "lady")+"!";
	mes "I'm able to refine ^FF0000all of your equipments^000000 to +5 without any price!";
	mes "Plus, from +6 to +10 there's a chance of ^FF000025% of success^000000.";
	mes "What do you think!?";
	next;
	if (select("Go ahead babe!")) {
		for (set .@i, 2; .@i < 10; set .@i, .@i + 1) {
			if (getequipid(.@i) > -1 /* && getequipisenableref(.@i) */) {
				if (getequiprefinerycnt(.@i) > 4 && getequiprefinerycnt(.@i) < 11) {
					if (rand(100) > 74) {
						successrefitem .@i;
					}
					else {
						failedrefitem .@i;
					}
				}
				else if (getequiprefinerycnt(.@i) < 5) {
					successrefitem .@i, 5;
				}
			}
		}
	}
	mes "[Nemir Faiax]";
	mes "My job here is done.";
	mes "Bye!";
	close2;
	emotion e_kis;
	end;
}

If you want to enable the refinable flag, change this:

			if (getequipid(.@i) > -1 /* && getequipisenableref(.@i) */) {

To this:

			if (getequipid(.@i) > -1 && getequipisenableref(.@i)) {

C ya!

Edited by _Okuz_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  11/06/12
  • Last Seen:  

Hey man, I am fine dude ;D

 

Thanks buddy!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

@Oraios
Done!  /ok  /rice 

C ya!

Edited by _Okuz_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  11/06/12
  • Last Seen:  

thank you a lot! :)

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