- script Workbench FAKE_NPC,{.@wrkb_id= atoi(strnpcinfo(2));if($wrkb_crafting_state[.@wrkb_id]==1){
mes "Please wait until the crafting 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 "==============================";
mes "^ff0000 Any item crafted by using the public Workbench can be stolen by other players !! ^000000";
mes "==============================";
next;
mes "What do you want to craft?";
next;switch(select("- Material Crafting:- Tool Crafting:- Weapon Crafting:- Armor Crafting:- Cancel")){case1:
next;switch(select("- Rock Chunk:- Rope:- Blade:- Handle:- Padded Leaf:- Tanned Skin:- Cancel")){case1:if(countitem(40005)<4){
mes "^ff0000 Rock Chunk ^000000";
mes "Requires:-";
mes "- [4] Rock";
close;}
delitem(40005,4);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40018,1);gotoOnCraftingStart;case2:if(countitem(40008)<4){
mes "^ff0000 Ropes ^000000";
mes "Require:-";
mes "- [4] Stalk";
close;}
delitem(40008,4);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40014,1);gotoOnCraftingStart;case3:if(countitem(40021)<4){
mes "^ff0000 Blade ^000000";
mes "Require:-";
mes "- [4] Boulder";
close;}
delitem(40021,4);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40022,1);gotoOnCraftingStart;case4:if(countitem(40002)<2){
mes "^ff0000 Handle ^000000";
mes "Require:-";
mes "- [2] Log";
close;}
delitem(40002,2);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40023,1);gotoOnCraftingStart;case5:if(countitem(40004)<4){
mes "^ff0000 Padded Leaf ^000000";
mes "Require:-";
mes "- [4] Leaf";
close;}
delitem(40004,4);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40028,1);gotoOnCraftingStart;case6:if(countitem(40027)<4){
mes "^ff0000 Tanned Skin ^000000";
mes "Require:-";
mes "- [4] Skin";
close;}
delitem(40027,4);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40029,1);gotoOnCraftingStart;}case2:
next;
next;switch(select("- Stone Dagger:- Stone Axe:- Stone Hammer:- Wood Needle :- Cancel")){case1:if(countitem(40005)<4){
mes "^ff0000 Stone Dagger ^000000";
mes "Requires:-";
mes "- [4] Rocks";
close;}
delitem(40005,4);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40009,1);gotoOnCraftingStart;case2:if(countitem(40018)<1|| countitem(40014)<2|| countitem(40003)<1){
mes "^ff0000 Stone Axe ^000000";
mes "Requires:-";
mes "- [1] Rock Chunk";
mes "- [2] Ropes";
mes "- [1] Branch";
close;}
delitem(40018,1);
delitem(40014,2);
delitem(40003,1);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40017,1);gotoOnCraftingStart;case3:if(countitem(40018)<1|| countitem(40014)<2|| countitem(40003)<1){
mes "^ff0000 Stone Hammer ^000000";
mes "Requires:-";
mes "- [1] Rock Chunk";
mes "- [2] Ropes";
mes "- [1] Branch";
close;}
delitem(40018,1);
delitem(40014,2);
delitem(40003,1);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40020,1);gotoOnCraftingStart;case4:if(countitem(40003)<2|| countitem(40018)<1||!isequipped(40016)){
mes "^ff0000 Wood Needle ^000000";
mes "Requires:-";
mes "- [2] Branch";
mes "- [1] Stone Chunk";
mes "- [1] Stone Axe";
close;}
delitem(40003,2);
delitem(40018,1);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40033,1);gotoOnCraftingStart;}case3:
next;switch(select("- Stone Blade:- Cancel")){case1:if(countitem(40023)<2|| countitem(40022)<1|| countitem(40014)<2||!isequipped(40019)){
mes "^ff0000 Stone Blade ^000000";
mes "Requires:-";
mes "- [2] Handle";
mes "- [1] Blade";
mes "- [2] Rope";
mes "- [1] Stone Hammer";
close;}
delitem(40023,2);
delitem(40022,1);
delitem(40014,2);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40025,1);gotoOnCraftingStart;case2:
mes "Cancel Crafting.";
close;}case4:
next;switch(select("- Animal Skin Armor:- Cancel")){case1:if(countitem(40028)<2|| countitem(40029)<2|| countitem(40030)<1){
mes "^ff0000 Animal Skin Armor ^000000";
mes "Requires:-";
mes "- [2] Padded Leaf";
mes "- [2] Tanned Skin";
mes "- [1] Needle";
close;}
delitem(40028,2);
delitem(40029,2);
setarray(getd("$wrkb_"+.@wrkb_id+"_products"),40007,1,40032,1);gotoOnCraftingStart;case2:
mes "Crafting Cancel.";
close;}case5:
mes "Crafting Cancel.";
close;}
end;OnCraftingStart:
$wrkb_crafting_state[.@wrkb_id]=1;
waitingroom("CRAFTING...",0);
initnpctimer;
end;OnTimer60000:
$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//=====================================================
new_1-3,98,58,6 duplicate(Workbench)Workbench#1 665
new_1-3,98,50,6 duplicate(Workbench)Workbench#2 665
new_1-3,98,43,6 duplicate(Workbench)Workbench#3 665
chry_fld,58,89,6 duplicate(Workbench)Workbench#4 665
chry_fld,55,85,6 duplicate(Workbench)Workbench#5 665
chry_fld,52,81,6 duplicate(Workbench)Workbench#6 665
chry_fld,63,86,6 duplicate(Workbench)Workbench#7 665
chry_fld,60,81,6 duplicate(Workbench)Workbench#8 665
chry_fld,57,77,6 duplicate(Workbench)Workbench#9 665
chry_fld,68,83,6 duplicate(Workbench)Workbench#10 665
chry_fld,65,78,6 duplicate(Workbench)Workbench#11 665
chry_fld,61,74,6 duplicate(Workbench)Workbench#12 665
Question
Dolphin86
as title i did manage to make the item using the requirement before, but some how now its not working as it should?
script :
item db :
Full Script:
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.