Jump to content
  • 0

About the Refine Deed npc we made.


Gidz Cross

Question


  • Group:  Members
  • Topic Count:  133
  • Topics Per Day:  0.03
  • Content Count:  686
  • Reputation:   89
  • Joined:  04/07/14
  • Last Seen:  

Hi. We got a NPC that uses Refine Deeds. And i edited it to make it clean. But something is not right so i decided to post it here.

 

Here's my Weapon Refiner.

//===== eAthena Script =======================================================
//= Donation Refine ( TXT & SQL )
//===== By: ==================================================================
//= Credit goes to whoever made this xD
//===== Current Version: =====================================================
//= 1.10a
//===== Compatible With: =====================================================
//= Any eAthena Version
//===== Description: =========================================================
//= Donation Refine Script
//============================================================================
prontera,177,134,5	script	Weapon Refine Deed	605,{
mes "[Sure Refiner]";
mes "Good day "+strcharinfo(0);
mes "Do you want to refine your Weapon?";
next;
mes " I need the following:";
mes " ^3355FF +7 Weapon Refine Deed^000000";
mes " ^3355FF +8 Weapon Refine Deed^000000";
mes " ^3355FF +9 Weapon Refine Deed^000000";
mes " ^3355FF +10 Weapon Refine Deed^000000";
mes "For me to refine your item";
next;
mes "[Sure Refiner]";
mes "Now, what do you want to refine?";
function Refine;
 

set @itemquantity, 1; // item quantity


menu "Refine equipment",REFIN,"Nothing at all",QUIT;

REFIN:

set @handr$, getequipname(4);


menu

"[Right Hand] "+@handr$,HANDR,
"Cancel",QUIT;

 
HANDR:
set @slot, 4;
 Refine;

QUIT:
next;
mes "[Sure Refiner]";
mes "Okay, see you.";
close;

LATER:
next;
mes "[Sure Refiner]";
mes "Thanks, have a nice day.";
close;

CANCEL:
next;
mes "[Sure Refiner]";
mes "Okay, come back another time.";
close;

MAX:
next;
mes "[Sure Refiner]";
mes "Sorry, but I can't refine this anymore.";
close;

NOWAY:
next;
mes "[Sure Refiner]";
mes "Oh my, I can't refine this item!!!";
close;

// ---------------Refine Equipment
Refine:	

if (countitem(31992) > 0 && getequiprefinerycnt(@slot) < 7 && getequiprefinerycnt(@slot) > 5 ){
menu "Do it!",-,"Cancel",CANCEL;
delitem 31992, @itemquantity;
successrefitem(@slot);
goto LATER;
close;
}
if (countitem(31993) > 0 && getequiprefinerycnt(@slot) < 8 && getequiprefinerycnt(@slot) > 6 ){
menu "Do it!",-,"Cancel",CANCEL;
delitem 31993, @itemquantity;
successrefitem(@slot);
goto LATER;
close;
}
if (countitem(31994) > 0 && getequiprefinerycnt(@slot) < 9 && getequiprefinerycnt(@slot) > 7 ){
menu "Do it!",-,"Cancel",CANCEL;
delitem 31994, @itemquantity;
successrefitem(@slot);
goto LATER;
close;
}
if (countitem(31995) > 0 && getequiprefinerycnt(@slot) < 10 && getequiprefinerycnt(@slot) > 8 ){
menu "Do it!",-,"Cancel",CANCEL;
delitem 31995, @itemquantity;
successrefitem(@slot);
goto LATER;
close;
}








else{
mes "SORRY~~";
next;
mes "You don't have the right requirements for my service";
next;
mes "log on to HELLRO website to know more about me";
next;
mes "TNX~~";
mes "BYE BYE!!";
close;
}


}

It works alright. But i think its dirty. There are unused codes like

MAX:
next;
mes "[Sure Refiner]";
mes "Sorry, but I can't refine this anymore.";
close;

It should popup when you have +10 already.


Can you enhance our script? Thanks!

Edited by gidzdlcrz
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   138
  • Joined:  02/26/14
  • Last Seen:  

That thing is riddled with issues...

prontera,160,174,6	script	Holink#mal_cash	559,{
	disable_items;
	mes "[Holink]";
	mes "I am the meow~ Blacksmith Holink~";
	mes "Master of refining, Holink~";
	mes "I am the special cat Holink who learned from Morroc~";
	mes "My daughter is so proud of me, Holink~";
	mes "What should Holink~ refine today?";
	next;
	setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
	set .@menu$,"";
	for(set .@i,1; .@i<=10; set .@i,.@i+1)
		set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Empty]")+":";
	set .@part, select(.@menu$);
	if (!getequipisequiped(.@part)) {
		mes "[Holink]";
		switch(.@part) {
		case 1:
			mes "My teacher Aragam said meow~";
			mes "There's no cure for stupidity...";
			break;
		case 2:
			mes "There's nothing to see here, meow!!";
			break;
		case 3:
			mes "Meow? What do you want me to do with this left hand...?";
			break;
		case 4:
			mes "Meow? What do you want me to do with this right hand...?";
			break;
		case 5:
			mes "Meow? You don't have anything on.";
			break;
		case 6:
			mes "Kyang~! Do not mess with my sensitive olfactory, meow~.";
			break;
		case 7:
		case 8:
			mes "Meow? Where is the accessory?";
			break;
		case 9:
		case 10:
			mes "Meow? You talking about the other head parts, meow?~";
			break;
		}
		close;
	}
	if (!getequipisenableref(.@part)) {
		mes "[Holink]";
		mes "Even Aragam can't refine such a thing, meow.";
		close;
	}
	if (getequiprefinerycnt(.@part) >= 10) {
		mes "[Holink]";
		mes "Meow~ Perfect refining. Did Aragam do this, meow?~";
		close;
	}
	mes "[Holink]";
	set .@material,7539; //Token ID

	mes "You need ^ff9999"+getitemname(.@material)+"^000000 for this refine, meow~";
	mes "Want to continue, meow?~";
	next;
	if(select("Yes!!:No!!") == 2) {
		mes "[Holink]";
		mes "Kyack!!";
		mes "You don't belive in refine master Holink, meow?~";
		close;
	}
		
	if (!countitem(.@material)) {
		mes "[Holink]";
		mes "You don't have the ingredients.";
		mes "You need ^ff9999"+getitemname(.@material)+"^000000, meow~";
		mes "Go get it, meow~";
		close;
	}
		delitem .@material,1;
		successrefitem .@part;
		mes "[Holink]";
		mes "Me~ Me~ Meow! Fun fun refining~";
		next;
		emotion e_kis;
		mes "[Holink]";
		mes "Perfect!! Perfect, meow!!";
		mes "I am the disciple of the refining wizard Aragam~";
		mes "Holink!!";
		mes "Another day of successful refining, meow!!";
		close;

}

Try this one.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  133
  • Topics Per Day:  0.03
  • Content Count:  686
  • Reputation:   89
  • Joined:  04/07/14
  • Last Seen:  

It works and thank you for that. But what i need is something different. I'll explain how the srcript we got works. I have these custom items +7 ~ 10 Weapon Refine Deed. So the players need at least +6 Weapon to use my NPC.

 

For example they want to make their +6 to +7 in 100% success rate. They need to have +7 Weapon Refine Deed. And the NPC will take that and refine his/her Weapon to +7. And they decided to make it +8. So they need to have +8 Weapon Refine Deed.

 

Something like that. So instead of one item required, they need to have +7, +8, +9 and +10 Weapon Refine Deed.

Donation Item purposes.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Thanks! I already fixed it. :)

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