PapaZola Posted January 10, 2012 Share Posted January 10, 2012 hello all i want request npc make hunting spear quest item require -poring coin 1000 -sticky mucus 500 -feather 1000 and this npc will annoucement player make this quest thx Quote Link to comment Share on other sites More sharing options...
0 Tofee Posted April 20, 2017 Share Posted April 20, 2017 (edited) On 1/10/2012 at 5:55 PM, Emistry said: try this prontera,155,181,5 script Sample 757,{ // What Item you want to Make ? set .GiveItem,5001; // Item Requirements + Amounts setarray .Item[0], 607,100, 608,50, 512,200; for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) if( countitem( .Item[[email protected]] ) < .Item[[email protected] + 1] ){ for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) mes "Need "+.Item[[email protected] + 1]+" x "+getitemname( .Item[[email protected]] ); close; } if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close; for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) delitem .Item[ [email protected] ],.Item[ [email protected] + 1 ]; getitem .GiveItem,1; mes "You have Make ^FF0000"+getitemname( .GiveItem )+"^000000"; announce "["+strcharinfo(0)+"] has made ["+getitemname( .GiveItem )+"]",0; close; } what if i want an input of how many items i want to make? and i want this part to count the item. mes "Need "+.Item[[email protected] + 1]+" x "+getitemname( .Item[[email protected]] ); example mes "you only have",; mes "<item count>/6 <item name>"; instead of just echoing how many items is required Edited April 20, 2017 by Tofee Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 10, 2012 Share Posted January 10, 2012 try this prontera,155,181,5 script Sample 757,{ // What Item you want to Make ? set .GiveItem,5001; // Item Requirements + Amounts setarray .Item[0], 607,100, 608,50, 512,200; for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) if( countitem( .Item[[email protected]] ) < .Item[[email protected] + 1] ){ for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) mes "Need "+.Item[[email protected] + 1]+" x "+getitemname( .Item[[email protected]] ); close; } if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close; for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) delitem .Item[ [email protected] ],.Item[ [email protected] + 1 ]; getitem .GiveItem,1; mes "You have Make ^FF0000"+getitemname( .GiveItem )+"^000000"; announce "["+strcharinfo(0)+"] has made ["+getitemname( .GiveItem )+"]",0; close; } Quote Link to comment Share on other sites More sharing options...
PapaZola Posted January 10, 2012 Author Share Posted January 10, 2012 thx sir emistry Quote Link to comment Share on other sites More sharing options...
Snap Posted April 16, 2012 Share Posted April 16, 2012 try this prontera,155,181,5 script Sample 757,{ // What Item you want to Make ? set .GiveItem,5001; // Item Requirements + Amounts setarray .Item[0], 607,100, 608,50, 512,200; for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) if( countitem( .Item[[email protected]] ) < .Item[[email protected] + 1] ){ for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) mes "Need "+.Item[[email protected] + 1]+" x "+getitemname( .Item[[email protected]] ); close; } if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close; for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 ) delitem .Item[ [email protected] ],.Item[ [email protected] + 1 ]; getitem .GiveItem,1; mes "You have Make ^FF0000"+getitemname( .GiveItem )+"^000000"; announce "["+strcharinfo(0)+"] has made ["+getitemname( .GiveItem )+"]",0; close; } Can i add more requirements? Quote Link to comment Share on other sites More sharing options...
manabeast Posted April 19, 2012 Share Posted April 19, 2012 (edited) try add see ? like this? setarray .Item[0], 607,100, 608,50, 512,200, Item ID,require, Item ID,require, Item ID,require; Edited April 19, 2012 by manabeast Quote Link to comment Share on other sites More sharing options...
miczster Posted November 9, 2012 Share Posted November 9, 2012 how about adding more quest items...what part do I need to edit/add and can I ask for an example??? not good yet in scripting Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 9, 2012 Share Posted November 9, 2012 how about adding more quest items...what part do I need to edit/add and can I ask for an example??? not good yet in scripting duplicate the same script....or find any other script.. Quote Link to comment Share on other sites More sharing options...
hello all
i want request npc make hunting spear quest
item require
-poring coin 1000
-sticky mucus 500
-feather 1000
and this npc will annoucement player make this quest
thx
Link to comment
Share on other sites