Jump to content
  • 0

Refine item


Tupac

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.02
  • Content Count:  101
  • Reputation:   5
  • Joined:  12/04/16
  • Last Seen:  

Help, edit script:

//===== rAthena Script ======================================= 
//= Ticket Refiner
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= [Official Conversion]
//= Refiner that uses +5~9/+11 refine tickets to refine
//= equipment with no chance of failure.
//= NOTE: This NPC is currently disabled on official servers.
//===== Additional Comments: =================================
//= 1.0 First version. [Euphy]
//= 1.1 Do not refine above ticket level. [Euphy]
//============================================================

// Main NPC :: safety_Ref_NPC
//============================================================
prontera,147,162,5	script	Refinador	4_M_05,{
	disable_items;
	if (countitem(6238) || countitem(6228) || countitem(6229) || countitem(6230) || countitem(6231) || countitem(6456))
		set .@bWeaponUp,1;
	if (countitem(6239) || countitem(6232) || countitem(6233) || countitem(6234) || countitem(6235) || countitem(6457))
		set .@bArmorUp,1;
	if (!.@bWeaponUp && !.@bArmorUp) {
		mes "[Refinador]";
		mes "Hello!";
		mes "What's up?";
		mes "I'm a specialist";
		mes "for refining items,";
		mes "but I don't work anymore.";
		next;
		switch(select("I'll go on my way.:Hmm... this makes me curious.")) {
		case 1:
			mes "[Refinador]";
			mes "Take care, adventurer.";
			close;
		case 2:
			mes "[Refinador]";
			mes "Actully, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000...";
			mes "Bye bye~!";
			close;
		}
	}
	emotion ET_SURPRISE;
	mes "[Refinador]";
	mes "Greetings!";
	mes "I can refine an item up to the ^006400same level as your ticket^000000.";
	mes "You don't have to worry! There's no chance of breaking your item.";
	next;
	if(select("I'll come back later.:Refine item with ticket.") == 1) {
		mes "[Refinador]";
		mes "Okay.";
		mes "You can come again later.";
		close;
	}
	mes "[Refinador]";
	mes "Which equipment would you like to refine?";
	next;
	setarray .@position$[1],"Robe";
	setarray .@indices[1],  EQI_GARMENT;
	for(set .@i,1; .@i<=1; set .@i,.@i+1)
		set .@menu$, .@menu$+((getequipisequiped(.@indices[.@i]))?getequipname(.@indices[.@i]):.@position$[.@i]+"- [Empty]")+":";
	set .@part, .@indices[ select(.@menu$) ];
	if (!getequipisequiped(.@part)) {
		mes "[Refinador]";
		mes "You have to equip the item you want to refine.";
		close;
	}
	if (!getequipisenableref(.@part)) {
		emotion ET_OTL;
		mes "[Refinador]";
		mes "Oh, I'm sorry.";
		mes "This item is impossible to refine.";
		close;
	}
	switch(getequipweaponlv(.@part)) {
	default:
	case 0:
		setarray .@tickets[0],6232;
		setarray .@levels[0],9;
		set .@type$,"Armor";
		set .@check,.@bArmorUp;
		break;
	case 1:
	case 2:
	case 3:
	case 4:
		setarray .@tickets[0],6228;
		setarray .@levels[0],9;
		set .@type$,"Weapon";
		set .@check,.@bWeaponUp;
		break;
	}
	if (!.@check) {
		emotion ET_THINK;
		mes "[Refinador]";
		mes "If you want to refine this ^006400"+.@type$+"^000000, please come along with ^006400"+.@type$+" Refine Ticket^000000.";
		mes "See you later!";
		close;
	}
	mes "[Refinador]";
	mes "Please choose which ^006400"+.@type$+" Refine Ticket^000000 you want to use.";
	next;
	set .@menu$,"";
	for(set .@i,0; .@i<getarraysize(.@tickets); set .@i,.@i+1)
		set .@menu$, .@menu$+getitemname(.@tickets[.@i])+":";
	set .@select, select(.@menu$)-1;
	set .@ticket_lv, .@levels[.@select];
	set .@ticket_id, .@tickets[.@select];
	if (countitem(.@ticket_id) == 0) {
		emotion ET_QUESTION;
		mes "[Refinador]";
		mes getitemname(.@ticket_id)+" is not in your inventory. Did you put it in your storage?";
		mes "Please check again.";
		mes "See you later!";
		close;
	}
	if (getequiprefinerycnt(.@part) >= .@ticket_lv) {
		emotion ET_PROFUSELY_SWEAT;
		mes "[Refinador]";
		mes "^8B4513This item is already refined as much as your deed.^000000";
		mes "Please come along with an item refined less than your ticket.";
		close;
	}
	mes "[Refinador]";
	mes "I'm going to refine ^006400"+getequipname(.@part)+"^8B4513 up to the +"+.@ticket_lv+" level^000000 with ^006400"+getitemname(.@ticket_id)+"^000000.";
	mes "May I proceed?";
	next;
	if(select("No.:Yes.") == 1) {
		emotion ET_THINK;
		mes "[Refinador]";
		mes "Oh, you changed your mind.";
		mes "Ok.";
		mes "You can come back later.";
		close;
	}
	mes "[Refinador]";
	mes "Great.";
	mes "As you wish!";
	mes "I have my own special way to refine...";
	mes ".......ka boom!";
	specialeffect EF_SUI_EXPLOSION;
	if (countitem(.@ticket_id))
		delitem .@ticket_id,1;
	else {
		next;
		mes "Error!";
		mes "Please report this.";
		close;
	}
	successrefitem .@part, .@ticket_lv - getequiprefinerycnt(.@part);
	next;
	emotion ET_DELIGHT;
	mes "[Refinador]";
	mes "Alright, here it is~";
	mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";
	mes "Congratulations on your shining "+.@type$+".";
	mes "You look GREAT!";
	mes "Farewell~!";
	close;
}

for refine only ids 2589 and 2576

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,150,185,5	script	test	1_F_MARIA,{
	if ( !isequipped(2589) && !isequipped(2576) )
		dispbottom "go away";
	end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.02
  • Content Count:  101
  • Reputation:   5
  • Joined:  12/04/16
  • Last Seen:  

19 hours ago, AnnieRuru said:

prontera,150,185,5	script	test	1_F_MARIA,{
	if ( !isequipped(2589) && !isequipped(2576) )
		dispbottom "go away";
	end;
}

 

thx

Script edited:

//===== rAthena Script ======================================= 
//= Ticket Refiner
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= [Official Conversion]
//= Refiner that uses +5~9/+11 refine tickets to refine
//= equipment with no chance of failure.
//= NOTE: This NPC is currently disabled on official servers.
//===== Additional Comments: =================================
//= 1.0 First version. [Euphy]
//= 1.1 Do not refine above ticket level. [Euphy]
//============================================================

// Main NPC :: safety_Ref_NPC
//============================================================
prontera,147,162,5	script	Refinador	4_M_05,{
	disable_items;
	if (countitem(6238) || countitem(6228) || countitem(6229) || countitem(6230) || countitem(6231) || countitem(6456))
		set .@bWeaponUp,1;
	if (countitem(6239) || countitem(6232) || countitem(6233) || countitem(6234) || countitem(6235) || countitem(6457))
		set .@bArmorUp,1;
	if (!.@bWeaponUp && !.@bArmorUp) {
		mes "[Refinador]";
		mes "Hello!";
		mes "What's up?";
		mes "I'm a specialist";
		mes "for refining items,";
		mes "but I don't work anymore.";
		next;
		switch(select("I'll go on my way.:Hmm... this makes me curious.")) {
		case 1:
			mes "[Refinador]";
			mes "Take care, adventurer.";
			close;
		case 2:
			mes "[Refinador]";
			mes "Actully, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000...";
			mes "Bye bye~!";
			close;
		}
	}
	emotion ET_SURPRISE;
	mes "[Refinador]";
	mes "Greetings!";
	mes "I can refine an item up to the ^006400same level as your ticket^000000.";
	mes "You don't have to worry! There's no chance of breaking your item.";
	next;
	if(select("I'll come back later.:Refine item with ticket.") == 1) {
		mes "[Refinador]";
		mes "Okay.";
		mes "You can come again later.";
		close;
	}
	mes "[Refinador]";
	mes "Which equipment would you like to refine?";
	next;
	setarray .@position$[1],"Robe";
	setarray .@indices[1],  EQI_GARMENT;
	for(set .@i,1; .@i<=1; set .@i,.@i+1)
		set .@menu$, .@menu$+((getequipisequiped(.@indices[.@i]))?getequipname(.@indices[.@i]):.@position$[.@i]+"- [Empty]")+":";
	set .@part, .@indices[ select(.@menu$) ];
	if (!getequipisequiped(.@part)) {
		mes "[Refinador]";
		mes "You have to equip the item you want to refine.";
		close;
	}
	if (!getequipisenableref(.@part)) {
		emotion ET_OTL;
		mes "[Refinador]";
		mes "Oh, I'm sorry.";
		mes "This item is impossible to refine.";
		close;
	}
	switch(getequipweaponlv(.@part)) {
	default:
	case 0:
		setarray .@tickets[0],6232;
		setarray .@levels[0],9;
		set .@type$,"Armor";
		set .@check,.@bArmorUp;
		break;
	case 1:
	case 2:
	case 3:
	case 4:
		setarray .@tickets[0],6228;
		setarray .@levels[0],9;
		set .@type$,"Weapon";
		set .@check,.@bWeaponUp;
		break;
	}
	if (!.@check) {
		emotion ET_THINK;
		mes "[Refinador]";
		mes "If you want to refine this ^006400"+.@type$+"^000000, please come along with ^006400"+.@type$+" Refine Ticket^000000.";
		mes "See you later!";
		close;
	}
	mes "[Refinador]";
	mes "Please choose which ^006400"+.@type$+" Refine Ticket^000000 you want to use.";
	next;
	set .@menu$,"";
	for(set .@i,0; .@i<getarraysize(.@tickets); set .@i,.@i+1)
		set .@menu$, .@menu$+getitemname(.@tickets[.@i])+":";
	set .@select, select(.@menu$)-1;
	set .@ticket_lv, .@levels[.@select];
	set .@ticket_id, .@tickets[.@select];
	if ( !isequipped(2589) && !isequipped(2576) ) {
	dispbottom "go away";
	end;
	}
	if (countitem(.@ticket_id) == 0) {
		emotion ET_QUESTION;
		mes "[Refinador]";
		mes getitemname(.@ticket_id)+" is not in your inventory. Did you put it in your storage?";
		mes "Please check again.";
		mes "See you later!";
		close;
	}
	if (getequiprefinerycnt(.@part) >= .@ticket_lv) {
		emotion ET_PROFUSELY_SWEAT;
		mes "[Refinador]";
		mes "^8B4513This item is already refined as much as your deed.^000000";
		mes "Please come along with an item refined less than your ticket.";
		close;
	}
	mes "[Refinador]";
	mes "I'm going to refine ^006400"+getequipname(.@part)+"^8B4513 up to the +"+.@ticket_lv+" level^000000 with ^006400"+getitemname(.@ticket_id)+"^000000.";
	mes "May I proceed?";
	next;
	if(select("No.:Yes.") == 1) {
		emotion ET_THINK;
		mes "[Refinador]";
		mes "Oh, you changed your mind.";
		mes "Ok.";
		mes "You can come back later.";
		close;
	}
	mes "[Refinador]";
	mes "Great.";
	mes "As you wish!";
	mes "I have my own special way to refine...";
	mes ".......ka boom!";
	specialeffect EF_SUI_EXPLOSION;
	if (countitem(.@ticket_id))
		delitem .@ticket_id,1;
	else {
		next;
		mes "Error!";
		mes "Please report this.";
		close;
	}
	successrefitem .@part, .@ticket_lv - getequiprefinerycnt(.@part);
	next;
	emotion ET_DELIGHT;
	mes "[Refinador]";
	mes "Alright, here it is~";
	mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";
	mes "Congratulations on your shining "+.@type$+".";
	mes "You look GREAT!";
	mes "Farewell~!";
	close;
}

 

  • Love 1
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...