Jump to content
  • 0

Item recipe to craft items, like other MMORPGS


kalyst001

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   1
  • Joined:  08/30/13
  • Last Seen:  

Hello dear brothers, i need a big help!!

I can pay money i dont have problem, i need one script to craft items like TREE OF SAVIOR.

For example i got one ITEM SCROLL (recipe) and i got all Materials required to craft that item i just wanna click on ITEM RECIPE and TRANSFORM THAT RECIPE on the crafted item.

 

I put one image to explain the system.

 

Imagen1.png

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

try it

 

item_db.txt

618,Worn_Out_Scroll,Worn Out Scroll,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "callscroll"; },{},{}

 

npc

function	script	callscroll	{
if(countitem(1155) < 1 || countitem(1037) < 250 ||	countitem(1036) < 100) goto L_NOITEMS;
	getitem 1160,1;	//(Broad_Sword)
	mes "Sword Craft";
	close;
	
L_NOITEMS:
	mes "item not completed";
	getitem 618,1;	//worn out scroll
	close;
}

 

change ID item with your itemID

Edited by Akbare
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   3
  • Joined:  08/02/19
  • Last Seen:  

Hello. I don't know much... but if helps.

you can basicly insert a NPC into a item thus script...

 

i.e... you can make an usable item that "if ( countitem blablabla) {delitems, get item}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   1
  • Joined:  08/30/13
  • Last Seen:  

16 hours ago, Akbare said:

try it

 

item_db.txt


618,Worn_Out_Scroll,Worn Out Scroll,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "callscroll"; },{},{}

 

npc


function	script	callscroll	{
if(countitem(1155) < 1 || countitem(1037) < 250 ||	countitem(1036) < 100) goto L_NOITEMS;
	getitem 1160,1;	//(Broad_Sword)
	mes "Sword Craft";
	close;
	
L_NOITEMS:
	mes "item not completed";
	getitem 618,1;	//worn out scroll
	close;
}

 

change ID item with your itemID

HOLY SHIT, THANKYOU BROTHER your script just excelent, your are Santa Claus¿? Wowww

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  12/01/20
  • Last Seen:  

@Akbare Hi sir i just tried the script but i received this error? ive been looking for this 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

// ...{ callfunc("F_CraftItem", <receipt_itemid>, <reward_itemid>, <required_item>, <required_amount>...); }
// ...{ callfunc("F_CraftItem", 501, 5022, 5001, 1, 5002, 1); }

make a usable with the item script above.

and load the following function script

function	script	F_CraftItem	{
	.@getargcount = getargcount();
	
	for (.@i = 2; .@i < .@getargcount - 1; .@i += 2) {
		if (countitem(getarg(.@i)) < getarg(.@i + 1, 0))
			return;
	}
	
	delitem getarg(0), 1;
	for (.@i = 2; .@i < .@getargcount - 1; .@i += 2)
		delitem getarg(.@i), getarg(.@i + 1, 0);
	getitem getarg(1), 1;
	return;
}

 

Edited by Emistry
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  12/01/20
  • Last Seen:  

3 hours ago, Emistry said:

// ...{ callfunc("F_CraftItem", <receipt_itemid>, <reward_itemid>, <required_item>, <required_amount>...); }
// ...{ callfunc("F_CraftItem", 501, 5022, 5001, 1, 5002, 1); }

make a usable with the item script above.

and load the following function script


function	script	F_CraftItem	{
	.@craft_receipt_itemid = getarg(0); 
	.@craft_reward_itemid = getarg(1); 
	.@getargcount = getargcount();
	
	for (.@i = 2; .@i < .@getargcount - 1; .@i += 2) {
		if (countitem(getarg(.@i)) < getarg(.@i + 1, 0))
			return;
	}
	
	delitem getarg(0), 1;
	for (.@i = 2; .@i < .@getargcount - 1; .@i += 2)
		delitem getarg(.@i), getarg(.@i + 1, 0);
	getitem getarg(1), 1;
	return;
}

 

Thanks you much much @Emistry i haven't tried coz i want to reply first! and i know it will work coz coming from you!  ? ? ? i have been spending 1 week looking for this script!  

 

@Emistry i have tried but not working. maybe my rathena version is old? doesnt have this function ?  

image.png.d69fb1b97b7df1f035436138b1df8b4c.png

 

@Emistry Hi Emistry. possible if  you click the item it will show the requirements? then if not complete mes item requirement complete then if complete mes you want to craft this item and make a headgear?

Thank yuo for the script its very helpful! ?

 

@Emistry 

 Hi Emistry. possible if  you click the item it will show the requirements? then if not complete mes item requirement complete then if complete mes you want to craft this item and make a headgear?

then i also noticed if you dont have the requirements it will be deleted item once you click

Thank yuo for the script its very helpful! ?

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  211
  • Reputation:   17
  • Joined:  12/23/11
  • Last Seen:  

Change item type

Or change script like 1st one

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

On 1/15/2021 at 8:35 PM, boypol said:

@Akbare Hi sir i just tried the script but i received this error? ive been looking for this 

Whats your problem ? take a screenshoot

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  12/01/20
  • Last Seen:  

1 hour ago, Akbare said:

Whats your problem ? take a screenshoot

Hi Akbare, its working for me. but is it possible that 1 npc script for multiple item? like i will add another item on item db but no need to add scrip on npc?

Thanks for the script its very helpful!!! ?

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