Jump to content

Utility: MakeItemReq, check requirements to make a item


Ehwaz

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   9
  • Joined:  01/09/12
  • Last Seen:  

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

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1181
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

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

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   9
  • Joined:  01/09/12
  • Last Seen:  

@hendra814 no SQL, only text, they not same

Maybe my instruction not clearly ?

Edited by Ehwaz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1181
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   9
  • Joined:  01/09/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1181
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  248
  • Reputation:   34
  • Joined:  11/19/11
  • Last Seen:  

thanks for this mate. gonna test this. ?

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

×
×
  • Create New...