PapaZola Posted January 10, 2012 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
0 Tofee Posted April 20, 2017 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 .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) if( countitem( .Item[.@i] ) < .Item[.@i + 1] ){ for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) mes "Need "+.Item[.@i + 1]+" x "+getitemname( .Item[.@i] ); close; } if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close; for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) delitem .Item[ .@i ],.Item[ .@i + 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[.@i + 1]+" x "+getitemname( .Item[.@i] ); 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
Emistry Posted January 10, 2012 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 .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) if( countitem( .Item[.@i] ) < .Item[.@i + 1] ){ for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) mes "Need "+.Item[.@i + 1]+" x "+getitemname( .Item[.@i] ); close; } if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close; for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) delitem .Item[ .@i ],.Item[ .@i + 1 ]; getitem .GiveItem,1; mes "You have Make ^FF0000"+getitemname( .GiveItem )+"^000000"; announce "["+strcharinfo(0)+"] has made ["+getitemname( .GiveItem )+"]",0; close; } Quote
Snap Posted April 16, 2012 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 .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) if( countitem( .Item[.@i] ) < .Item[.@i + 1] ){ for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) mes "Need "+.Item[.@i + 1]+" x "+getitemname( .Item[.@i] ); close; } if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close; for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 ) delitem .Item[ .@i ],.Item[ .@i + 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
manabeast Posted April 19, 2012 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
miczster Posted November 9, 2012 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
Emistry Posted November 9, 2012 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
Question
PapaZola
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
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.