Jump to content

Recommended Posts

Posted

MakeItemReq, check requirements to make a item


This functions help you easy to create a Quest NPC use to create a item by bring for NPC items and Zeny

If bring enough Zeny and Items, a menu confirm to make item will display

Else will display "Close" Button

Edit Menu text inside function.

Usage:

.@isSuccess = MakeItemReq(PRODUCT_ID,ZENY,ITEM1,ITEM1_QUANTITY,ITEM2,ITEM2_QUANTITY,.....)

.@isSuccess = 0, you dont want to create this item
.@isSuccess = 1, NPC created item for you

// Sample Struct NPC //

prontera,157,120,4	script	MakeItemReq	555,{
	mes "[NPC_NAME]";
	mes "Bla";
	mes "Bla Bla";
	mes "Bla Bla Bla";
	mes "Bla Bla Bla Bla";
	next;
	mes "[NPC_NAME]";
	
	// MakeItemReq(PRODUCT_ID,ZENY,ITEM1,ITEM1_QUANTITY,ITEM2,ITEM2_QUANTITY,.....)
	.@isSuccess = MakeItemReq(5353,1000000,501,1,502,2);
	
	// Doesn't add next, because next existed in function
	if(.@isSuccess){
		
		mes "[NPC_NAME]";
		mes "You success to create a item";
	}
	else {
		mes "[NPC_NAME]";
		mes "You dont need it";
	}
	close;
}

  • Submitter
  • Submitted
    06/11/2018
  • Category
  • Video
  • Content Author
    Ehwaz

 

Posted

So this is npc will make the quest base on this

.@isSuccess = MakeItemReq(PRODUCT_ID,ZENY,ITEM1,ITEM1_QUANTITY,ITEM2,ITEM2_QUANTITY,.....)
.@isSuccess = MakeItemReq(PRODUCT_ID,ZENY,ITEM1,ITEM1_QUANTITY,ITEM2,ITEM2_QUANTITY,.....)

or base player input. like this script

 

Posted
6 minutes ago, Ehwaz said:

@hendra814 no SQL, only text, they not same

sorry, need more define to you so you will understand what i mean.

1. this sript allow player put their request to NPC to make the quest, like player talk to npc to make quest, set the title quest, what the item reward and amount the item, and what items require fot the quest and amount the items.

or

2. the item reward and item required for the quest already defined in the script. so player just take the quest and bring the item require to get the reward item.

Posted

@hendra814

Quote

2. the item reward and item required for the quest already defined in the script. so player just take the quest and bring the item require to get the reward item.

bring the item require to get the reward item ?

It's just help you don't need to repeat countitem() too much

Quest logic must define above function:

Ex:

If(BaseLevel > 99){
	.@isSuccess = MakeItemReq(5353,1000000,501,1,502,2);
}
else {
	mes "You not allow to make this item";
}

And ".@isSuccess" use to continue quest logic if you want, maybe after created Item NPC will "do something"

Please ask if you still  does not understand ...

Posted
6 minutes ago, Ehwaz said:

@hendra814

bring the item require to get the reward item ?

It's just help you don't need to repeat countitem() too much

Quest logic must define above function:

Ex:


If(BaseLevel > 99){
	.@isSuccess = MakeItemReq(5353,1000000,501,1,502,2);
}
else {
	mes "You not allow to make this item";
}

And ".@isSuccess" use to continue quest logic if you want, maybe after created Item NPC will "do something"

Please ask if you still  does not understand ...

o great, i'm understand now.

Thanks @Ehwaz

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...