Jump to content
  • 0

Need help with refiner script


screamsoflust

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  04/08/16
  • Last Seen:  

Hi. I just wanna know if you can help me with this.

 

we got a refiner that needs a certain item before he can refine. (for us its refine ticket)

our refiner gets the refine ticket (for example its safe to +9 refine ticket) and it refines the item up to +9. for example the item is +2 and you used our refiner, he will make it +9

we want the refiner to refine an item only 1 level higher (from my example above, if the item is +2 and the player used safe to +9 refine ticket, he will only get the item to +3)

 

im sorry but im fairly new to RO scripts.

 

thanks in advance and more power =)

 

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

-	script	PlusOneRefinerOnly	-1,{

	mes "[ Refiner ]"
	mes "Provide me with enough items, and I will refine your equipment.";
	next;
	mes "[ Refiner ]"
	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 ){
		if( getequipisequiped(.@i) )
			set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
			set .@menu$, .@menu$ + ":";
	}
	set .@part,select(.@menu$);
	if(!getequipisequiped(.@part)){
		mes "[ Refiner ]"
		mes "You're not wearing";
		mes "anything there that";
		mes "I can refine.";
		emotion 6;
		close;
	}
	//Check if the item is refinable...
	if(!getequipisenableref(.@part)) {
		mes "[ Refiner ]"
		mes "I don't think I can";
		mes "refine this item at all...";
		close;
	}
	//Check to see if the items is already +10
	if(getequiprefinerycnt(.@part) >= 10) {
		mes "[ Refiner ]"
		mes "I can't refine this";
		mes "any more. This is as";
		mes "refined as it gets!";
		close;
	}
	set .@refineitemid, getequipid(.@part); // save id of the item
	set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
	switch(getequipweaponlv(.@part)){
	case 0: 	//Refine Armor
		set .@price,1;
		set .@material,7179;
		break;
	case 1: 	//Refine Level 1 Weapon
		set .@price,1; //This is zeny
		set .@material,7179; //Proof of Donations, change to something else if you want
		break;
	case 2: 	//Refine Level 2 Weapon
		set .@price,1;
		set .@material,7179;
		break;
	case 3: 	//Refine Level 3 Weapon
		set .@price,1;
		set .@material,7179;
		break;
	case 4: 	//Refine Level 4 Weapon
		set .@price,1;
		set .@material,7179;
		break;
	case 5: 	//Refine other stuff?
		set .@price,1;
		set .@material,7179;
		break;
	}
		mes "[ Refiner ]"
		mes "To refine this I need";
		mes "one ^003366"+getitemname(.@material)+"^000000 and";
		mes "a service fee of " + .@price + " Zeny.";
		mes "Do you really wish to continue?";
		next;
		if(select("Yes:No") == 2){
			mes "[ Refiner ]"
			mes "Yeah...";
			mes "There's no need to";
			mes "rush. Take your time.";
			close;
		}
		if((countitem(.@material) < 1) || (Zeny < .@price)) {
			mes "[ Refiner ]"
			mes "You don't seem to have";
			mes "enough Zeny or "+getitemname(.@material)+"...";
			mes "Go get some more. I'll be";
			mes "here all day if you need me.";
			close;
		}
		set Zeny,Zeny-.@price;
		delitem .@material,1;
		if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
			mes "[ Refiner ]"
			mes "Look here... you don't have any Items on...";
			close;
		}
		if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
			mes "[ Refiner ]"
			Emotion e_an;
			mes "Wait a second...";
			mes "Do you think I'm stupid?!";
			mes "You switched the item while I wasn't looking! Get out of here!";
			close;
		}
		mes "[ Refiner ]"
		successrefitem .@part;
		Emotion e_heh;
		set .@win,rand(1,3);
		if (.@win == 1) {
			mes "Perfect!";
			mes "Heh heh!";
			mes "Once again,";
			mes "flawless work";
			mes "from the master~";
		} else if(.@win == 2) {
			mes "Success...!";
			mes "Yet again, my amazing";
			mes "talent truly dazzles";
			mes "and shines today.";
		} else {
			mes "Heh heh!";
			mes "I'm all done.";
			mes "No doubt, my work is";
			mes "to your satisfaction.";
			mes "Sheer, utter perfection~";
		}
		close;
	}

Credits to: 

 

//<?> -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o \\
//          Blacksmith/Card Removal Npc V.2.0         \\
//                   by Luther                        \\
// Credit To : Mytzer,TyrNemisis,ShadowMaster and     \\
// who ever made the Item Identifyer Deckard Cain.    \\
// Whoms Scripts were used in making this npc.        \\
// Also ToastOfDoom and Chachi911 for helping Debug it\\
// (V.2.0 Uses the original eAthena Refine Script that\\ 
//can have its rates configured in the refine_db.txt) \\
// -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o \\

Since this is a modified version of their refiner

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  04/08/16
  • Last Seen:  

-	script	PlusOneRefinerOnly	-1,{

	mes "[ Refiner ]"
	mes "Provide me with enough items, and I will refine your equipment.";
	next;
	mes "[ Refiner ]"
	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 ){
		if( getequipisequiped(.@i) )
			set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
			set .@menu$, .@menu$ + ":";
	}
	set .@part,select(.@menu$);
	if(!getequipisequiped(.@part)){
		mes "[ Refiner ]"
		mes "You're not wearing";
		mes "anything there that";
		mes "I can refine.";
		emotion 6;
		close;
	}
	//Check if the item is refinable...
	if(!getequipisenableref(.@part)) {
		mes "[ Refiner ]"
		mes "I don't think I can";
		mes "refine this item at all...";
		close;
	}
	//Check to see if the items is already +10
	if(getequiprefinerycnt(.@part) >= 10) {
		mes "[ Refiner ]"
		mes "I can't refine this";
		mes "any more. This is as";
		mes "refined as it gets!";
		close;
	}
	set .@refineitemid, getequipid(.@part); // save id of the item
	set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
	switch(getequipweaponlv(.@part)){
	case 0: 	//Refine Armor
		set .@price,1;
		set .@material,7179;
		break;
	case 1: 	//Refine Level 1 Weapon
		set .@price,1; //This is zeny
		set .@material,7179; //Proof of Donations, change to something else if you want
		break;
	case 2: 	//Refine Level 2 Weapon
		set .@price,1;
		set .@material,7179;
		break;
	case 3: 	//Refine Level 3 Weapon
		set .@price,1;
		set .@material,7179;
		break;
	case 4: 	//Refine Level 4 Weapon
		set .@price,1;
		set .@material,7179;
		break;
	case 5: 	//Refine other stuff?
		set .@price,1;
		set .@material,7179;
		break;
	}
		mes "[ Refiner ]"
		mes "To refine this I need";
		mes "one ^003366"+getitemname(.@material)+"^000000 and";
		mes "a service fee of " + .@price + " Zeny.";
		mes "Do you really wish to continue?";
		next;
		if(select("Yes:No") == 2){
			mes "[ Refiner ]"
			mes "Yeah...";
			mes "There's no need to";
			mes "rush. Take your time.";
			close;
		}
		if((countitem(.@material) < 1) || (Zeny < .@price)) {
			mes "[ Refiner ]"
			mes "You don't seem to have";
			mes "enough Zeny or "+getitemname(.@material)+"...";
			mes "Go get some more. I'll be";
			mes "here all day if you need me.";
			close;
		}
		set Zeny,Zeny-.@price;
		delitem .@material,1;
		if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
			mes "[ Refiner ]"
			mes "Look here... you don't have any Items on...";
			close;
		}
		if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
			mes "[ Refiner ]"
			Emotion e_an;
			mes "Wait a second...";
			mes "Do you think I'm stupid?!";
			mes "You switched the item while I wasn't looking! Get out of here!";
			close;
		}
		mes "[ Refiner ]"
		successrefitem .@part;
		Emotion e_heh;
		set .@win,rand(1,3);
		if (.@win == 1) {
			mes "Perfect!";
			mes "Heh heh!";
			mes "Once again,";
			mes "flawless work";
			mes "from the master~";
		} else if(.@win == 2) {
			mes "Success...!";
			mes "Yet again, my amazing";
			mes "talent truly dazzles";
			mes "and shines today.";
		} else {
			mes "Heh heh!";
			mes "I'm all done.";
			mes "No doubt, my work is";
			mes "to your satisfaction.";
			mes "Sheer, utter perfection~";
		}
		close;
	}

Credits to: 

 

//<?> -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o \\
//          Blacksmith/Card Removal Npc V.2.0         \\
//                   by Luther                        \\
// Credit To : Mytzer,TyrNemisis,ShadowMaster and     \\
// who ever made the Item Identifyer Deckard Cain.    \\
// Whoms Scripts were used in making this npc.        \\
// Also ToastOfDoom and Chachi911 for helping Debug it\\
// (V.2.0 Uses the original eAthena Refine Script that\\ 
//can have its rates configured in the refine_db.txt) \\
// -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o \\

Since this is a modified version of their refiner

 

 

thank you very much. I really appreciate the comments so I understand the code better.

 

 

and here is our current script. it checks the level of the refine ticket of the player (for example +6 refine ticket or +9 refine ticket)

but as I said it refines the item directly with the level of the player's refine ticket.

can you please check if what's wrong here? thanks again

yuno,177,188,3	script	Refine Master	851,{
	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 "[Refine Master]";
		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 "[Refine Master]";
			mes "Take care, adventurer.";
			close;
		case 2:
			mes "[Refine Master]";
			mes "Actually, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000...";
			mes "Bye bye~!";
			close;
		}
	}
	emotion e_gasp;
	mes "[Refine Master]";
	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 "[Refine Master]";
		mes "Okay.";
		mes "You can come again later.";
		close;
	}
	mes "[Refine Master]";
	mes "Which equipment would you like to refine?";
	next;
	setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower";
	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 "[Refine Master]";
		mes "You have to equip the item you want to refine.";
		close;
	}
	if (!getequipisenableref(.@part)) {
		emotion e_otl;
		mes "[Refine Master]";
		mes "Oh, I'm sorry.";
		mes "This item is impossible to refine.";
		close;
	}
	switch(getequipweaponlv(.@part)) {
	default:
	case 0:
		setarray .@tickets[0],6457,6235,6234,6233,6232,6239;
		setarray .@levels[0],5,6,7,8,9,11;
		set .@type$,"Armor";
		set .@check,.@bArmorUp;
		break;
	case 1:
	case 2:
	case 3:
	case 4:
		setarray .@tickets[0],6456,6231,6230,6229,6228,6238;
		setarray .@levels[0],5,6,7,8,9,11;
		set .@type$,"Weapon";
		set .@check,.@bWeaponUp;
		break;
	}
	if (!.@check) {
		emotion e_dots;
		mes "[Refine Master]";
		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 "[Refine Master]";
	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 e_what;
		mes "[Refine Master]";
		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 e_swt2;
		mes "[Refine Master]";
		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 "[Refine Master]";
	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 e_dots;
		mes "[Refine Master]";
		mes "Oh, you changed your mind.";
		mes "Ok.";
		mes "You can come back later.";
		close;
	}
	mes "[Refine Master]";
	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 e_ho;
	mes "[Refine Master]";
	mes "Alright, here it is~";
	mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";
	mes "Congratulations on your shining "+.@type$+".";
	mes "You look GREAT!";
	mes "Farewell~!";
	close;
}
Edited by simisterkel
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

	successrefitem .@part, .@ticket_lv - 
getequiprefinerycnt(.@part);

That is the line why it's causing that. If you just need +1 on every refine ticket, just replace it with

	successrefitem .@part;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  04/08/16
  • Last Seen:  

	successrefitem .@part, .@ticket_lv - 
getequiprefinerycnt(.@part);

That is the line why it's causing that. If you just need +1 on every refine ticket, just replace it with

	successrefitem .@part;

I see, thanks.

 

so we'll just edit the refine ticket.

 

thank you kind sir.

first, I wanna apologize for troubling you so much and second I wanna apologize for double posting.

 

but this is my last question for this matter.

 

for example, I have a +4 item then I have a +8 refine ticket. we want the refiner to reject the +8 ticket and look for +5 refine ticket before he refines the

item to +5. what code do I have to put in? (btw, we have separate tickets for weapons and for armors)

 

again, thank you for your help and Im learning bit by bit with your advises. (im still learning things like !.@bArmorUp,@menu$+getitemname. you know the variables set by ragnarok)

Edited by simisterkel
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Untested:

yuno,177,188,3	script	Refine Master	851,{
	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 "[Refine Master]";
		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 "[Refine Master]";
			mes "Take care, adventurer.";
			close;
		case 2:
			mes "[Refine Master]";
			mes "Actually, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000...";
			mes "Bye bye~!";
			close;
		}
	}
	emotion e_gasp;
	mes "[Refine Master]";
	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 "[Refine Master]";
		mes "Okay.";
		mes "You can come again later.";
		close;
	}
	mes "[Refine Master]";
	mes "Which equipment would you like to refine?";
	next;
	setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower";
	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 "[Refine Master]";
		mes "You have to equip the item you want to refine.";
		close;
	}
	if (!getequipisenableref(.@part)) {
		emotion e_otl;
		mes "[Refine Master]";
		mes "Oh, I'm sorry.";
		mes "This item is impossible to refine.";
		close;
	}
	switch(getequipweaponlv(.@part)) {
	default:
	case 0:
		setarray .@tickets[0],6457,6235,6234,6233,6232,6239;
		setarray .@levels[0],5,6,7,8,9,11;
		set .@type$,"Armor";
		set .@check,.@bArmorUp;
		break;
	case 1:
	case 2:
	case 3:
	case 4:
		setarray .@tickets[0],6456,6231,6230,6229,6228,6238;
		setarray .@levels[0],5,6,7,8,9,11;
		set .@type$,"Weapon";
		set .@check,.@bWeaponUp;
		break;
	}
	if (!.@check) {
		emotion e_dots;
		mes "[Refine Master]";
		mes "If you want to refine this ^006400"+.@type$+"^000000, please come along with ^006400"+.@type$+" Refine Ticket^000000.";
		mes "See you later!";
		close;
	}
	switch(getequiprefinerycnt(.@part)){
	
		case 4: //+4 item
			set .@ticket_id,.@tickets[0];
			mes "[Refine Master]";
			mes "I will require 1x"+getitemname(.@tickets[0]);
			mes "to refine this item.";
			menu "Give him ticket",-;
			break;
		case 5: //+5 item
			set .@ticket_id,.@tickets[1];
			mes "[Refine Master]";
			mes "I will require 1x"+getitemname(.@tickets[0]);
			mes "to refine this item.";
			menu "Give him ticket",-;
			break;
		case 6:
			set .@ticket_id,.@tickets[2];
			mes "[Refine Master]";
			mes "I will require 1x"+getitemname(.@tickets[0]);
			mes "to refine this item.";
			menu "Give him ticket",-;
			break;
		case 7:
			set .@ticket_id,.@tickets[3];
			mes "[Refine Master]";
			mes "I will require 1x"+getitemname(.@tickets[0]);
			mes "to refine this item.";
			menu "Give him ticket",-;
			break;
		case 8:
			set .@ticket_id,.@tickets[4];
			mes "[Refine Master]";
			mes "I will require 1x"+getitemname(.@tickets[0]);
			mes "to refine this item.";
			menu "Give him ticket",-;
			break;
		case 9:
			set .@ticket_id,.@tickets[5];
			mes "[Refine Master]";
			mes "I will require 1x"+getitemname(.@tickets[0]);
			mes "to refine this item.";
			menu "Give him ticket",-;
			break;
		case 10:
			mes "[Refine Master]";
			mes "I'm sorry but this has reached its limit.";
			close;
			end;
		default:
			mes "[Refine Master]";
			mes "I can't refine this.";
			close;
			end;
	}
	mes "[Refine Master]";
	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 "You don't have the item.";
		mes "Please report this.";
		close;
	}
	successrefitem .@part,
	next;
	emotion e_ho;
	mes "[Refine Master]";
	mes "Alright, here it is~";
	mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";
	mes "Congratulations on your shining "+.@type$+".";
	mes "You look GREAT!";
	mes "Farewell~!";
	close;
}
Edited by PandaLovesHamster
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  04/08/16
  • Last Seen:  

ok thank you very much. I will try it.

 

 

*EDIT*

 

unfortunately it doesnt work. ill try to work around it.

thanks again.

Edited by simisterkel
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  


prontera,149,175,5 script Refine Master 851,{

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 "[Refine Master]";

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 "[Refine Master]";

mes "Take care, adventurer.";

close;

case 2:

mes "[Refine Master]";

mes "Actually, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000...";

mes "Bye bye~!";

close;

}

}

emotion e_gasp;

mes "[Refine Master]";

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 "[Refine Master]";

mes "Okay.";

mes "You can come again later.";

close;

}

mes "[Refine Master]";

mes "Which equipment would you like to refine?";

next;

setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower";

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 "[Refine Master]";

mes "You have to equip the item you want to refine.";

close;

}

if (!getequipisenableref(.@part)) {

emotion e_otl;

mes "[Refine Master]";

mes "Oh, I'm sorry.";

mes "This item is impossible to refine.";

close;

}

switch(getequipweaponlv(.@part)) {

default:

case 0:

setarray .@tickets[0],6457,6235,6234,6233,6232,6239;

setarray .@levels[0],5,6,7,8,9,11;

set .@type$,"Armor";

set .@check,.@bArmorUp;

break;

case 1:

case 2:

case 3:

case 4:

setarray .@tickets[0],6456,6231,6230,6229,6228,6238;

setarray .@levels[0],5,6,7,8,9,11;

set .@type$,"Weapon";

set .@check,.@bWeaponUp;

break;

}

if (!.@check) {

emotion e_dots;

mes "[Refine Master]";

mes "If you want to refine this ^006400"+.@type$+"^000000, please come along with ^006400"+.@type$+" Refine Ticket^000000.";

mes "See you later!";

close;

}

switch(getequiprefinerycnt(.@part)){

case 4: //+4 item

set .@ticket_id,.@tickets[0];

mes "[Refine Master]";

mes "I will require 1x"+getitemname(.@tickets[0]);

mes "to refine this item.";

menu "Give him ticket",-;

break;

case 5: //+5 item

set .@ticket_id,.@tickets[1];

mes "[Refine Master]";

mes "I will require 1x"+getitemname(.@tickets[1]);

mes "to refine this item.";

menu "Give him ticket",-;

break;

case 6:

set .@ticket_id,.@tickets[2];

mes "[Refine Master]";

mes "I will require 1x"+getitemname(.@tickets[2]);

mes "to refine this item.";

menu "Give him ticket",-;

break;

case 7:

set .@ticket_id,.@tickets[3];

mes "[Refine Master]";

mes "I will require 1x"+getitemname(.@tickets[3]);

mes "to refine this item.";

menu "Give him ticket",-;

break;

case 8:

set .@ticket_id,.@tickets[4];

mes "[Refine Master]";

mes "I will require 1x"+getitemname(.@tickets[4]);

mes "to refine this item.";

menu "Give him ticket",-;

break;

case 9:

set .@ticket_id,.@tickets[5];

mes "[Refine Master]";

mes "I will require 1x"+getitemname(.@tickets[5]);

mes "to refine this item.";

menu "Give him ticket",-;

break;

case 10:

mes "[Refine Master]";

mes "I'm sorry but this has reached its limit.";

close;

end;

default:

mes "[Refine Master]";

mes "I can't refine this.";

close;

end;

}

mes "[Refine Master]";

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 "[Refine Master]";

mes "You don't have the item I need.";

mes "Go away!";

close;

}

successrefitem .@part,

next;

emotion e_ho;

mes "[Refine Master]";

mes "Alright, here it is~";

mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";

mes "Congratulations on your shining "+.@type$+".";

mes "You look GREAT!";

mes "Farewell~!";

close;

}

Edited by PandaLovesHamster
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  04/08/16
  • Last Seen:  

yes sir. it works. much appreciated!

 

thanks for helping and I learned stuff while asking you these questions.

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