Jump to content
  • 0

hunting spear quest


Question

7 answers to this question

Recommended Posts

  • 0
Posted (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 by Tofee
Posted

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;
}

Posted

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?

Posted

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

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.

  • Recently Browsing   0 members

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