hye i need help on getting random chance if player had (40101) Butchering's Tier 2, from the script below, if player had (40043) Butchering's Tier 1, it will proceed to craft the item with current script which all thanks to @Winterfox who created it, but I'm kind of confused how to add on the second option which is random chance to gain some different item result by 10%, if else player will just get a normal item (40011) Low Quality Bone,
also the script need a little improvement, when the time is up the chat box disappear, while the item are still have not taken out, i would like the chat box disappear only when the item had been taken out only, thanks
Spoiler
new_1-3,87,138,6 script PublicButcherTable665,{.@wrkb_id= atoi(strnpcinfo(2));if($wrkb_crafting_state[.@wrkb_id]==1){
mes "Please wait until the cooking process is finished. ";
close;}if($wrkb_crafting_state[.@wrkb_id]==2){
mes "Here are your crafted items.";for(.@i=0;.@i< getarraysize(getd("$wrkb_"+.@wrkb_id+"_products"));.@i+=2)
getitem(getd("$wrkb_"+.@wrkb_id+"_products["+.@i+"]"), getd("$wrkb_"+.@wrkb_id+"_products["+(.@i+1)+"]"));
delwaitingroom;
$wrkb_crafting_state[.@wrkb_id]=0;
close;}
mes "Select :-";
next;switch(select("- Take Bone only:- Take Meat Only:- Take Monster Skin Only:- Cancel")){case1:switch(select("- Use Stone Blade:- Use Make Shift Bone Blade:- Cancel")){case1:if(countitem(40043)==1){// T1 Butcheringif(countitem(40026)<1|| rentalcountitem(40024)<1){
mes "Take Out Bone";
mes "Require:-";
mes "[1] Monster Loot";
mes "[1] Stone Blade";
close3;}
delitem(40026,1);
getitem(40036,1);// Prove Of Butchering
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40036,1,40011,1);gotoOnCraftingStart;}if(countitem(40106)==1){
mes "How to add random chance?";
close3;}case2:
mes "WIP";
close3;case3:
mes "Cancel";
close3;}case2:
mes "WIP";
close3;case3:
mes "WIP";
close3;case4:
mes "Process Cancel";
close3;}OnCraftingStart:
$wrkb_crafting_state[.@wrkb_id]=1;
waitingroom("Butchering...",0);
initnpctimer;
end;OnTimer10000:
$wrkb_crafting_state[atoi(strnpcinfo(2))]=2;
delwaitingroom;
waitingroom("COMPLETED!",0);
end;OnInit:.@wrkb_id= atoi(strnpcinfo(2));if(.@wrkb_id<1) end;if($wrkb_crafting_state[.@wrkb_id]==1)gotoOnCraftingStart;}//Duplicate//=====================================================
chry_fld,81,74,6 duplicate(PublicButcherTable)PublicButcherTable#1 665
ma_fild01,317,289,6 duplicate(PublicButcherTable)PublicButcherTable#2 665
ma_fild01,264,358,6 duplicate(PublicButcherTable)PublicButcherTable#3 665
ma_fild01,231,316,6 duplicate(PublicButcherTable)PublicButcherTable#4 665
ma_fild01,144,285,6 duplicate(PublicButcherTable)PublicButcherTable#5 665
ma_fild01,54,193,6 duplicate(PublicButcherTable)PublicButcherTable#6 665
ma_fild01,91,91,6 duplicate(PublicButcherTable)PublicButcherTable#7 665
ma_fild01,196,185,6 duplicate(PublicButcherTable)PublicButcherTable#8 665
ma_fild01,234,240,6 duplicate(PublicButcherTable)PublicButcherTable#9 665
ma_fild01,182,107,6 duplicate(PublicButcherTable)PublicButcherTable#10 665
ma_fild01,281,120,6 duplicate(PublicButcherTable)PublicButcherTable#11 665
Question
Dolphin86
hye i need help on getting random chance if player had (40101) Butchering's Tier 2, from the script below, if player had (40043) Butchering's Tier 1, it will proceed to craft the item with current script which all thanks to @Winterfox who created it, but I'm kind of confused how to add on the second option which is random chance to gain some different item result by 10%, if else player will just get a normal item (40011) Low Quality Bone,
also the script need a little improvement, when the time is up the chat box disappear, while the item are still have not taken out, i would like the chat box disappear only when the item had been taken out only, thanks
Link to comment
Share on other sites
2 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.