Jump to content
  • 0
Sign in to follow this  
maczekiel

Hugin's Craftsman NPC Help

Question

Please help me to this script, how to slot item without losing the enchant in temporal boots ,  this is the script
[cbox]
glast_01,208,273,3 script Hugin's Craftsman 726,{
disable_items;
if (MaxWeight - Weight < 1000) {
mes "Your bag is too heavy. Reduce some weight and come back.";
close;
}
mes "[Hugin's Craftsman]";
mes "That Magic Master always says that enchanting Temporal Boots is the best. But, I think quite different.";
next;
mes "[Hugin's Craftsman]";
mes "I think putting a slot into the item would be the best. Even with some risk of failing.";
next;
mes "[Hugin's Craftsman]";
mes "Bring me ^0000FF5 Temporal Crystals^000000, and I will try to put a slot into your advanced Temporal Boots. But, it's possible to ^FF0000fail and break the item^000000. Is that ok?";
next;
if (select("Cancel","Take the risk and try to add a slot") == 1) {
mes "[Hugin's Craftsman]";
mes "Ok, come back anytime you want.";
close;
}
set .@part,EQI_SHOES;
if (!getequipisequiped(.@part)) {
mes "[Hugin's Craftsman]";
mes "Are you sure you are wearing the item?";
close;
}
set .@equip_id,getequipid(.@part);
switch (.@equip_id) {
case 22000: //Temporal_Str_Boots
case 22001: //Temporal_Int_Boots
case 22002: //Temporal_Agi_Boots
case 22003: //Temporal_Vit_Boots
case 22004: //Temporal_Dex_Boots
case 22005: //Temporal_Luk_Boots
mes "[Hugin's Craftsman]";
mes "And ^FF0000all enchant or refine rates will be lost if you fail this.^000000";
mes "Still want to risk it?";
next;
if (select("Cancel","I am ok with it!") == 1) {
mes "[Hugin's Craftsman]";
mes "Ok, come back anytime you want.";
close;
}
mes "[Hugin's Craftsman]";
mes "Once again, ^FF0000That Magic Master won't enchant any item with a slot.^000000";
mes "Still want to proceed?";
next;
if (select("Cancel","I understand. Try to slot it.") == 1) {
mes "[Hugin's Craftsman]";
mes "Ok, come back anytime you want.";
close;
}
if (countitem(6607) < 5) {
mes "[Hugin's Craftsman]";
mes "You must bring ^0000FF5 Temporal Crystal items^000000. Nothing is free you know...";
close;
}
set .@@random,rand(1,100);
if (.@@random <= 80) { //Custom rates
mes "[Hugin's Craftsman]";
mes "Arrggg, we failed. Better luck next time.";
specialeffect2 EF_PHARMACY_FAIL;
delitem 6607,5; //Temporal_Crystal
delequip .@part;
close;
}
mes "[Hugin's Craftsman]"; //Custom text
mes "Yuhuu~ we succeed. Here you are...";
mes "A slot has been added to your advanced Temporal Boots.";
mes "Thank you for believing in me.";
specialeffect2 EF_PHARMACY_OK;
delitem 6607,5; //Temporal_Crystal
delequip .@part;
if (.@equip_id == 22000) {
getitem2 22006,1,1,0,0,0,0,0,0;
// getitem2 22006,1; //Temporal_Str_Boots_
} else if (.@equip_id == 22001) {
getitem2 22009,1,1,0,0,0,0,0,0; //Temporal_Int_Boots_
} else if (.@equip_id == 22002) {
getitem2 22010,1,1,0,0,0,0,0,0; //Temporal_Agi_Boots_
} else if (.@equip_id == 22003) {
getitem2 22007,1,1,0,0,0,0,0,0; //Temporal_Vit_Boots_
} else if (.@equip_id == 22004) {
getitem2 22008,1,1,0,0,0,0,0,0;//Temporal_Dex_Boots_
} else if (.@equip_id == 22005) {
getitem2 22011,1,1,0,0,0,0,0,0; //Temporal_Luk_Boots_
}
close;
default:
mes "[Hugin's Craftsman]";
mes "This is not it! We need ^0000FFAdvanced Temporal Boots^000000 items! The item ^0000FFwith a stat effect and without a slot^000000!";
close;
}
}
[/cbox]

 

its working but when success the enchantment stone will disappear, how to edit this sorry please help

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Try this.

glast_01,210,270,0	script	Hugin's Craftsman	726,{
	disable_items;
	if (MaxWeight - Weight < 1000) {
		mes "Your bag is too heavy. Reduce some weight and come back.";
		close;
	}
	
	mes "[Hugin's Craftsman]";
	mes "That Magic Master always says that enchanting Temporal Boots is the best. But, I think quite different.";
	next;
	mes "[Hugin's Craftsman]";
	mes "I think putting a slot into the item would be the best. Even with some risk of failing.";
	next;
	mes "[Hugin's Craftsman]";
	mes "Bring me ^0000FF5 Temporal Crystals^000000, and I will try to put a slot into your advanced Temporal Boots. But, it's possible to ^FF0000fail and break the item^000000. Is that ok?";
	next;
	if (select("Cancel","Take the risk and try to add a slot") == 1) {
		mes "[Hugin's Craftsman]";
		mes "Ok, come back anytime you want.";
		close;
	}
	
	set .@part,EQI_SHOES;
	if (!getequipisequiped(.@part)) {
		mes "[Hugin's Craftsman]";
		mes "Are you sure you are wearing the item?";
		close;
	}
	set .@equip_id,getequipid(.@part);
	
	switch (.@equip_id) {
		case 22000: //Temporal_Str_Boots
			.@get_id = 22006,1; //Temporal_Str_Boots_
			break;
		case 22001: //Temporal_Int_Boots
			.@get_id = 22009; //Temporal_Int_Boots_
			break;
		case 22002: //Temporal_Agi_Boots
			.@get_id = 22010; //Temporal_Agi_Boots_
			break;
		case 22003: //Temporal_Vit_Boots
			.@get_id = 22007; //Temporal_Vit_Boots_
			break;
		case 22004: //Temporal_Dex_Boots
			.@get_id = 22008; //Temporal_Dex_Boots_
			break;
		case 22005: //Temporal_Luk_Boots
			.@get_id = 22011; //Temporal_Luk_Boots_
			break;
		default:
			mes "[Hugin's Craftsman]";
			mes "This is not it! We need ^0000FFAdvanced Temporal Boots^000000 items! The item ^0000FFwith a stat effect and without a slot^000000!";
			close;
	}
	
	for( .@i = 0; .@i < 4; .@i ++ )
		setd "Craft_Card" + .@i, getequipcardid( .@equip_id, .@i );
	
	mes "[Hugin's Craftsman]";
	mes "And ^FF0000all enchant or refine rates will be lost if you fail this.^000000";
	mes "Still want to risk it?";
	next;
	if (select("Cancel","I am ok with it!") == 1) {
		mes "[Hugin's Craftsman]";
		mes "Ok, come back anytime you want.";
		close;
	}
	
	mes "[Hugin's Craftsman]";
	mes "Once again, ^FF0000That Magic Master won't enchant any item with a slot.^000000";
	mes "Still want to proceed?";
	next;
	if (select("Cancel","I understand. Try to slot it.") == 1) {
		mes "[Hugin's Craftsman]";
		mes "Ok, come back anytime you want.";
		close;
	}
	
	if (countitem(6607) < 5) {
		mes "[Hugin's Craftsman]";
		mes "You must bring ^0000FF5 Temporal Crystal items^000000. Nothing is free you know...";
		close;
	}
	
	if (rand(1,100) <= 80) { //Custom rates
		mes "[Hugin's Craftsman]";
		mes "Arrggg, we failed. Better luck next time.";
		specialeffect2 EF_PHARMACY_FAIL;
		delitem 6607,5; //Temporal_Crystal
		delequip .@part;
		close;
	}
	
	mes "[Hugin's Craftsman]"; //Custom text
	mes "Yuhuu~ we succeed. Here you are...";
	mes "A slot has been added to your advanced Temporal Boots.";
	mes "Thank you for believing in me.";
	specialeffect2 EF_PHARMACY_OK;
	delitem 6607,5; //Temporal_Crystal
	delequip .@part;
	getitem2 .@get_id, 1, 1, 0, 0, getd( "Craft_Card0" ), getd( "Craft_Card1" ), getd( "Craft_Card2" ), getd( "Craft_Card3" );
	close;
}

Share this post


Link to post
Share on other sites
  • 0

Do you mean, you don't want the item "6607 - Temporal Crystal" not to deleted?

 

if that's what you mean then...

find this line:

delitem 6607,5; //Temporal_Crystal

Share this post


Link to post
Share on other sites
  • 0

 

Do you mean, you don't want the item "6607 - Temporal Crystal" not to deleted?

 

if that's what you mean then...

find this line:

delitem 6607,5; //Temporal_Crystal

no, i mean when it successfully  slotting the temporal boots with "Enchant" it will erase the Enchant and it will just a slotted Temporal, what i need is to spare the enchanted stones in temporal, the success will be slotted+ the enchanted stones from before.

 

like in this link https://rathena.org/board/topic/103522-hugins-craftsman-bug/

 

 

@@Kubix can you help me with this one bro?

Edited by maczekiel

Share this post


Link to post
Share on other sites
  • 0

 

Try this.

glast_01,210,270,0	script	Hugin's Craftsman	726,{
	disable_items;
	if (MaxWeight - Weight < 1000) {
		mes "Your bag is too heavy. Reduce some weight and come back.";
		close;
	}
	
	mes "[Hugin's Craftsman]";
	mes "That Magic Master always says that enchanting Temporal Boots is the best. But, I think quite different.";
	next;
	mes "[Hugin's Craftsman]";
	mes "I think putting a slot into the item would be the best. Even with some risk of failing.";
	next;
	mes "[Hugin's Craftsman]";
	mes "Bring me ^0000FF5 Temporal Crystals^000000, and I will try to put a slot into your advanced Temporal Boots. But, it's possible to ^FF0000fail and break the item^000000. Is that ok?";
	next;
	if (select("Cancel","Take the risk and try to add a slot") == 1) {
		mes "[Hugin's Craftsman]";
		mes "Ok, come back anytime you want.";
		close;
	}
	
	set .@part,EQI_SHOES;
	if (!getequipisequiped(.@part)) {
		mes "[Hugin's Craftsman]";
		mes "Are you sure you are wearing the item?";
		close;
	}
	set .@equip_id,getequipid(.@part);
	
	switch (.@equip_id) {
		case 22000: //Temporal_Str_Boots
			.@get_id = 22006,1; //Temporal_Str_Boots_
			break;
		case 22001: //Temporal_Int_Boots
			.@get_id = 22009; //Temporal_Int_Boots_
			break;
		case 22002: //Temporal_Agi_Boots
			.@get_id = 22010; //Temporal_Agi_Boots_
			break;
		case 22003: //Temporal_Vit_Boots
			.@get_id = 22007; //Temporal_Vit_Boots_
			break;
		case 22004: //Temporal_Dex_Boots
			.@get_id = 22008; //Temporal_Dex_Boots_
			break;
		case 22005: //Temporal_Luk_Boots
			.@get_id = 22011; //Temporal_Luk_Boots_
			break;
		default:
			mes "[Hugin's Craftsman]";
			mes "This is not it! We need ^0000FFAdvanced Temporal Boots^000000 items! The item ^0000FFwith a stat effect and without a slot^000000!";
			close;
	}
	
	for( .@i = 0; .@i < 4; .@i ++ )
		setd "Craft_Card" + .@i, getequipcardid( .@equip_id, .@i );
	
	mes "[Hugin's Craftsman]";
	mes "And ^FF0000all enchant or refine rates will be lost if you fail this.^000000";
	mes "Still want to risk it?";
	next;
	if (select("Cancel","I am ok with it!") == 1) {
		mes "[Hugin's Craftsman]";
		mes "Ok, come back anytime you want.";
		close;
	}
	
	mes "[Hugin's Craftsman]";
	mes "Once again, ^FF0000That Magic Master won't enchant any item with a slot.^000000";
	mes "Still want to proceed?";
	next;
	if (select("Cancel","I understand. Try to slot it.") == 1) {
		mes "[Hugin's Craftsman]";
		mes "Ok, come back anytime you want.";
		close;
	}
	
	if (countitem(6607) < 5) {
		mes "[Hugin's Craftsman]";
		mes "You must bring ^0000FF5 Temporal Crystal items^000000. Nothing is free you know...";
		close;
	}
	
	if (rand(1,100) <= 80) { //Custom rates
		mes "[Hugin's Craftsman]";
		mes "Arrggg, we failed. Better luck next time.";
		specialeffect2 EF_PHARMACY_FAIL;
		delitem 6607,5; //Temporal_Crystal
		delequip .@part;
		close;
	}
	
	mes "[Hugin's Craftsman]"; //Custom text
	mes "Yuhuu~ we succeed. Here you are...";
	mes "A slot has been added to your advanced Temporal Boots.";
	mes "Thank you for believing in me.";
	specialeffect2 EF_PHARMACY_OK;
	delitem 6607,5; //Temporal_Crystal
	delequip .@part;
	getitem2 .@get_id, 1, 1, 0, 0, getd( "Craft_Card0" ), getd( "Craft_Card1" ), getd( "Craft_Card2" ), getd( "Craft_Card3" );
	close;
}

Thanks Bro! your the Best!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.