Jump to content

Question

Posted (edited)

if you crafting the +7 valkyrie armor fail the +7 valkyrie armor not lost and  the box empty is lost  


if success the crafting same loss +7 valkyrie armor and box empty and get box of valkyrie


 


 




prontera,142,177,5 script Sample1 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 "FFFFFF",10;
for( .@i = 0; .@i < .item_id_size; .@i++ )
delitem .item_id[.@i],.item_amount[.@i];
if( rand( 100 ) < .craft_rate ){
failedrefitem .@part;
mes "Gained 1 items.";
getitem .craft_gain,1;
}else{
mes "Failed";
}
}
close;

OnInit:
// craft settings
.craft_rate = 50;
setarray .item_id,30005;
setarray .item_amount,10;
.item_id_size = getarraysize( .item_id );

// item gain
.craft_gain = 30004;
end;
}

Edited by sandbox
codebox'd

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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