Jump to content

  •  

Photo

Custom Craftsman


  • Please log in to reply
6 replies to this topic

#1 nyxfatalis

nyxfatalis

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 23 May 2016 - 10:02 AM

Requesting:

 

An enchanter that will enchant these items for a certain equipment.
• For Armors (any) : Mark of blahblah (itemid: 28000 upto 280005)
• For Shields (any) : Quint of blahblah (itemid: 28006 upto 280010)
• For Garment (any) : Seal of blahblah (itemid: 28010 upto 280015)
• For Footgear (any) : Glyph of blahblah (itemid: 28016 upto 280020)
One enchant per equipment only. (will be placed in the 2nd slot because 1st slot is for cards)
Requirement to enchant: 10x TCG (itemid: 7227)

Success Rate: 100%


Edited by xilence01, 26 May 2016 - 12:20 PM.

JYWWork.png


#2 Alayne

Alayne

    Advanced Member

  • Members
  • PipPipPip
  • 213 posts

Posted 23 May 2016 - 12:56 PM

Well just think that adding items as "cards" won't be possible on any item which has 4 available card slots. Well it will be available, but it'll change a slot from "available" to "unavailable", meaning players won't be able to compounde a card in it (never tried it thought so I don't if the mentionned slot won't be offered at all or if it will override the existing data)



#3 nyxfatalis

nyxfatalis

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 24 May 2016 - 12:10 PM

Well just think that adding items as "cards" won't be possible on any item which has 4 available card slots. Well it will be available, but it'll change a slot from "available" to "unavailable", meaning players won't be able to compounde a card in it (never tried it thought so I don't if the mentionned slot won't be offered at all or if it will override the existing data)

Yeah, that's why i only chose items which has only [1] slot. (Armor, Footgear, Shield, Garment).


JYWWork.png


#4 nyxfatalis

nyxfatalis

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 25 May 2016 - 04:48 AM

bump


JYWWork.png


#5 nyxfatalis

nyxfatalis

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 26 May 2016 - 09:16 AM

up


JYWWork.png


#6 Alayne

Alayne

    Advanced Member

  • Members
  • PipPipPip
  • 213 posts

Posted 26 May 2016 - 01:04 PM

Well not at home right now and I don't have your items so it's a bit hard to test, but this should more or less do the job. You also should be able to factorise it a bit (especially the forge part).
 

prontera,156,326,4	script	Craftsman::alacra	1_M_SMITH,{	set .@npcname$, "[Craftsman]";	mes .@npcname$;	mes "What can I do for you, young adventurer?";	if (select("Insert an Power Item","Power items?") == 1)	{		next;		mes .@npcname$;		mes "Sure.";		mes "Which kind of item do you wanna insert a gim in?";		set .@[member="choice"], select("An armor","A footgear","A shield","A garment") - 1;		next;		mes .@npcname$;		switch(.@[member="choice"])		{			case 0:				//armor				copyarray .@itemId[0], $quintsId[0], getarraysize($quintsId);				if(getequipid(EQI_ARMOR) == -1)				{					mes "Sorry, but you need an equiped armor for me to empower it.";					close;				}				break;			case 1:				//footgear				copyarray .@itemId[0], $glyphsId[0], getarraysize($glyphsId);				if(getequipid(EQI_SHOES) == -1)				{					mes "Sorry, but you need an equiped footgear for me to empower it.";					close;				}				break;			case 2:				//shield				copyarray .@itemId[0], $sealsId[0], getarraysize($sealsId);				if(getequipid(EQI_HAND_R) == -1 || getequipweaponlv(EQI_HAND_L) != 0)				{					mes "Sorry, but you need an equiped armor for me to empower it.";					close;				}				break;			case 3:				//garment				copyarray .@itemId[0], $marksId[0], getarraysize($marksId);				if(getequipid(EQI_GARMENT) == -1)				{					mes "Sorry, but you need an equiped garment for me to empower it.";					close;				}				break;		}		mes "Allright. So which item do you want to insert?";				set .@menu$, "";		for(set .@i,0; .@i<getarraysize(.@itemId); set .@i,.@i+1)		{			set .@menu$, .@menu$ + getitemname(.@itemId[.@i]);					}		set .@itemChoice, select(.@menu$) - 1;				next;		mes .@npcname$;		mes "So, you wanna add a " + getitemname(.@itemId[.@itemChoice]) + ", on your  right?";		if(select("Yes","No") == 1)		{			if(countitem(.@itemId[.@itemChoice]) == 0)			{				next;				mes .@npcname$;				mes "Sorry but...You don't have this item. I need at least to be able to work.";				close;							}		}		else		{			next;			mes .@npcname$;			mes "Oh...Thought so...";			close;		}			//update		switch(.@[member="choice"])		{			case 0:				//armor				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_ARMOR,0);				set .@refine, getequiprefinerycnt(EQI_ARMOR);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_ARMOR), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;			case 1:				//footgear				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_SHOES,0);				set .@refine, getequiprefinerycnt(EQI_SHOES);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_SHOES), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;			case 2:				//shield				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_HAND_R,0);				set .@refine, getequiprefinerycnt(EQI_HAND_R);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_HAND_R), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;			case 3:				//garment				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_GARMENT,0);				set .@refine, getequiprefinerycnt(EQI_GARMENT);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_GARMENT), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;		}				next;		mes .@npcname$;		mes "Here you go.";		mes "Hope to see you soon again.";	}	else	{		next;		mes .@npcname$;		mes "I can carve some items which will grant you new powers directly into your armor pieces.";		mes "I can add a Quint into an Armor.";		mes "A Glyph into footgears.";		mes "A Seal into a shield.";		mes "Or a Mark into a garment.";		mes "Just talk to me with the correct Power Item in your inventory, and the item you wanna to engrave equiped.";	}	close;	OnInit:	setarray $quintsId[0],28060,28061,28062,28063,28064,28065,28066,28067,28068,28069;	setarray $glyphsId[0],28050,28051,28052,28053,28054,28055,28056,28057,28058,28059;	setarray $sealsId[0],28040,28041,28042,28043,28044,28045,28046,28047,28048,28049;	setarray $marksId[0],28030,28031,28032,28033,28034,28035,28036,28037,28038,28039;	end;}

 

Second Edit: I've completed it just before refreshing and see you've changed the request...Thought you can probably update it by yourself now, to fit the new changes. If not, just tell me.


Edited by Alayne, 26 May 2016 - 01:06 PM.


#7 nyxfatalis

nyxfatalis

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 26 May 2016 - 01:51 PM

Well not at home right now and I don't have your items so it's a bit hard to test, but this should more or less do the job. You also should be able to factorise it a bit (especially the forge part).
 

prontera,156,326,4	script	Craftsman::alacra	1_M_SMITH,{	set .@npcname$, "[Craftsman]";	mes .@npcname$;	mes "What can I do for you, young adventurer?";	if (select("Insert an Power Item","Power items?") == 1)	{		next;		mes .@npcname$;		mes "Sure.";		mes "Which kind of item do you wanna insert a gim in?";		set .@[member="choice"], select("An armor","A footgear","A shield","A garment") - 1;		next;		mes .@npcname$;		switch(.@[member="choice"])		{			case 0:				//armor				copyarray .@itemId[0], $quintsId[0], getarraysize($quintsId);				if(getequipid(EQI_ARMOR) == -1)				{					mes "Sorry, but you need an equiped armor for me to empower it.";					close;				}				break;			case 1:				//footgear				copyarray .@itemId[0], $glyphsId[0], getarraysize($glyphsId);				if(getequipid(EQI_SHOES) == -1)				{					mes "Sorry, but you need an equiped footgear for me to empower it.";					close;				}				break;			case 2:				//shield				copyarray .@itemId[0], $sealsId[0], getarraysize($sealsId);				if(getequipid(EQI_HAND_R) == -1 || getequipweaponlv(EQI_HAND_L) != 0)				{					mes "Sorry, but you need an equiped armor for me to empower it.";					close;				}				break;			case 3:				//garment				copyarray .@itemId[0], $marksId[0], getarraysize($marksId);				if(getequipid(EQI_GARMENT) == -1)				{					mes "Sorry, but you need an equiped garment for me to empower it.";					close;				}				break;		}		mes "Allright. So which item do you want to insert?";				set .@menu$, "";		for(set .@i,0; .@i<getarraysize(.@itemId); set .@i,.@i+1)		{			set .@menu$, .@menu$ + getitemname(.@itemId[.@i]);					}		set .@itemChoice, select(.@menu$) - 1;				next;		mes .@npcname$;		mes "So, you wanna add a " + getitemname(.@itemId[.@itemChoice]) + ", on your  right?";		if(select("Yes","No") == 1)		{			if(countitem(.@itemId[.@itemChoice]) == 0)			{				next;				mes .@npcname$;				mes "Sorry but...You don't have this item. I need at least to be able to work.";				close;							}		}		else		{			next;			mes .@npcname$;			mes "Oh...Thought so...";			close;		}			//update		switch(.@[member="choice"])		{			case 0:				//armor				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_ARMOR,0);				set .@refine, getequiprefinerycnt(EQI_ARMOR);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_ARMOR), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;			case 1:				//footgear				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_SHOES,0);				set .@refine, getequiprefinerycnt(EQI_SHOES);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_SHOES), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;			case 2:				//shield				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_HAND_R,0);				set .@refine, getequiprefinerycnt(EQI_HAND_R);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_HAND_R), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;			case 3:				//garment				//retrieve compounded cards and refine				set .@cardId1, getequipcardid(EQI_GARMENT,0);				set .@refine, getequiprefinerycnt(EQI_GARMENT);								next;				mes .@npcname$;				mes "Perfect. Wait a second.";				getitem2 getequipid(EQI_GARMENT), 1, 1, .@refine, 0, .@cardId1, .@itemId[.@itemChoice], 0, 0;				delitem .@itemId[.@itemChoice], 1;				break;		}				next;		mes .@npcname$;		mes "Here you go.";		mes "Hope to see you soon again.";	}	else	{		next;		mes .@npcname$;		mes "I can carve some items which will grant you new powers directly into your armor pieces.";		mes "I can add a Quint into an Armor.";		mes "A Glyph into footgears.";		mes "A Seal into a shield.";		mes "Or a Mark into a garment.";		mes "Just talk to me with the correct Power Item in your inventory, and the item you wanna to engrave equiped.";	}	close;	OnInit:	setarray $quintsId[0],28060,28061,28062,28063,28064,28065,28066,28067,28068,28069;	setarray $glyphsId[0],28050,28051,28052,28053,28054,28055,28056,28057,28058,28059;	setarray $sealsId[0],28040,28041,28042,28043,28044,28045,28046,28047,28048,28049;	setarray $marksId[0],28030,28031,28032,28033,28034,28035,28036,28037,28038,28039;	end;}

 

Second Edit: I've completed it just before refreshing and see you've changed the request...Thought you can probably update it by yourself now, to fit the new changes. If not, just tell me.

Could you send it thru pastebin? I cant copy it from here. Thanks


JYWWork.png





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 46 user(s)