fulldevilman 0 Posted March 8, 2014 (edited) 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];} Edited March 8, 2014 by AnnieRuru use [code] if the script > 10 lines Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted March 8, 2014 this is not the full script, show us the full script, and post it at http://upaste.me/ so we can see it better Quote Share this post Link to post Share on other sites
0 Mystery 594 Posted March 8, 2014 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 Quote Share this post Link to post Share on other sites
0 fulldevilman 0 Posted March 8, 2014 (edited) i got it thanks. if( !.@failed ){ mes "Please wait..."; progressbar "FFFFFF",10; if cast the progressbar you dont move. Edited March 8, 2014 by fulldevilman Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted March 8, 2014 (edited) FFFFFF should be 0xFFFFFF progressbar "0xFFFFFF",10; Edited March 8, 2014 by Dastgir Pojee Quote Share this post Link to post Share on other sites
0 fulldevilman 0 Posted March 9, 2014 (edited) 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 March 9, 2014 by fulldevilman Quote Share this post Link to post Share on other sites
0 fulldevilman 0 Posted March 11, 2014 i got the script thanks. Quote Share this post Link to post Share on other sites
whats the problem,
use [code] if the script > 10 lines
Share this post
Link to post
Share on other sites