Jump to content
  • 0
kalyst001

Item recipe to craft items, like other MMORPGS

Question

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

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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}

Share this post


Link to post
Share on other sites
  • 0
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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0
// ...{ 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	{
	[email protected] = getargcount();
	
	for ([email protected] = 2; [email protected] < [email protected] - 1; [email protected] += 2) {
		if (countitem(getarg([email protected])) < getarg([email protected] + 1, 0))
			return;
	}
	
	delitem getarg(0), 1;
	for ([email protected] = 2; [email protected] < [email protected] - 1; [email protected] += 2)
		delitem getarg([email protected]), getarg([email protected] + 1, 0);
	getitem getarg(1), 1;
	return;
}

 

Edited by Emistry

Share this post


Link to post
Share on other sites
  • 0
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	{
	[email protected]_receipt_itemid = getarg(0); 
	[email protected]_reward_itemid = getarg(1); 
	[email protected] = getargcount();
	
	for ([email protected] = 2; [email protected] < [email protected] - 1; [email protected] += 2) {
		if (countitem(getarg([email protected])) < getarg([email protected] + 1, 0))
			return;
	}
	
	delitem getarg(0), 1;
	for ([email protected] = 2; [email protected] < [email protected] - 1; [email protected] += 2)
		delitem getarg([email protected]), getarg([email protected] + 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! 🙂

 

Share this post


Link to post
Share on other sites
  • 0

Change item type

Or change script like 1st one

Share this post


Link to post
Share on other sites
  • 0
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

Share this post


Link to post
Share on other sites
  • 0
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!!! 🙂

Share this post


Link to post
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...

Important Information

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