Jump to content
  • 0
fulldevilman

request script item

Question

whats the problem,

 

	for( .@i = 0; .@i < .item_id_size; .@i++ ){		mes .item_amount[.@i]+" x "+getitemname( .item_id[.@i] );		if( countitem( .item_id[.@i] ) < .item_amount[.@i] )			.@failed = 1;	}	if( !.@failed ){		mes "Please wait...";		progressbar "FFFFFF",10;		for( .@i = 0; .@i < .item_id_size; .@i++ )			delitem .item_id[.@i],.item_amount[.@i];		if( rand( 100 ) < .craft_rate ){			mes "Gained 1 items.";			callfunc "valkyrie_armor";		}else{			mes "Failed";		}	}	close;OnInit:	// craft settings	.craft_rate = 50;	setarray .item_id,30005;	setarray .item_amount,10;	.item_id_size = getarraysize( .item_id );	end;}function script valkyrie_armor {	getinventorylist;	for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {		if ( @inventorylist_id[.@i] == 2357 ) {			delitem2 @inventorylist_id[.@i], 1, @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];			getitem2 30101 + @inventorylist_refine[.@i], 1, 1, 0, 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];			end;		}	}	dispbottom "You don't have "+ getitemname(2357) +" in your inventory";	end;}function script get_valkyrie_armor {	getitem2 2357, 1, 1, getarg(1), 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];}
 

fk8mqg.jpg

Edited by AnnieRuru
use [code] if the script > 10 lines

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Also, if you're a registered user on upaste, upload the NPC as Athena and click the Run button to run the script and see the error yourself ;3

Share this post


Link to post
Share on other sites
  • 0

i got it thanks.

 

  if( !.@failed ){

mes "Please wait...";
progressbar "FFFFFF",10;

 

if cast the progressbar you dont move.

Edited by fulldevilman

Share this post


Link to post
Share on other sites
  • 0

FFFFFF should be 0xFFFFFF

progressbar "0xFFFFFF",10;
Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

not work progressbar "0xFFFFFF",10;

 

here the script.

if cast the progressbar you dont move.

 

[cbox]prontera,155,181,5 script Sample 757,{
for( .@i = 0; .@i < .item_id_size; .@i++ ){
mes .item_amount[.@i]+" x "+getitemname( .item_id[.@i] );
if( countitem( .item_id[.@i] ) < .item_amount[.@i] ) .@failed = 1;
}
if( !.@failed ){
mes "Please wait...";
progressbar "0xFFFFFF",10;
for( .@i = 0; .@i < .item_id_size; .@i++ )
delitem .item_id[.@i],.item_amount[.@i];
if( rand( 100 ) < .craft_rate ){
mes "Gained 1 items.";
getnameditem( .craft_gain,strcharinfo(0) );
}else{
mes "Failed";
}
}
close;

OnInit:
// craft settings
.craft_rate = 50;
setarray .item_id,607,608;
setarray .item_amount,1,2;
.item_id_size = getarraysize( .item_id );

// item gain
.craft_gain = 7539;
end;
}[/cbox]

Edited by fulldevilman

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.