Dolphin86 Posted October 14, 2023 Posted October 14, 2023 (edited) hye i do know the problem is with the label, but how should i rename it without making error on the whole script as i need it to be 1 minute wait.. or someone can fix it for me or at least show me an example? the script: Spoiler new_1-3,118,54,5 script Workbench 665,{ if(BeginnerQuest == 2) goto BeginnerQuest2; if(BeginnerQuest == 3) goto BeginnerQuest3; if(BeginnerQuest == 4) goto BeginnerQuest4; if(BeginnerQuest == 6) goto BeginnerQuest6; if(BeginnerQuest == 7) goto BeginnerQuest7; BeginnerQuest2: mes "[Workbench]"; if(select("-Craft Stone Dagger:Cancel")==2) goto cancelstonedagger; if(countitem(40005) < 4 ) { mes "^ff0000 Not enough Rocks ^000000"; close; } else { delitem 40005,4; waitingroom("CRAFTING...", 0); set BeginnerQuest,3; initnpctimer; set #StoneDagger,gettimetick(2) + 60; end; OnTimer60000: delwaitingroom; waitingroom("COMPLETED !!", 0); end; } cancelstonedagger: next; mes "[Workbench]"; mes "Cancel craft"; close; BeginnerQuest3: if(#StoneDagger > gettimetick(2)) { mes "Please wait for until its finish. "; end; } else { if(BeginnerQuest == 3) { mes "Crafting Completed."; getitem 40007,1; getitem 40009,1; set BeginnerQuest,4; delwaitingroom; close; } } BeginnerQuest4: mes "I should meet back with Benimaru"; close; BeginnerQuest6: mes "[Workbench]"; if(select("-Craft Ropes:Cancel")==2) goto cancelrope; if(countitem(40008) < 8 ) { mes "^ff0000 Not enough Stalk ^000000"; close; } else { delitem 40008,8; waitingroom("CRAFTING...", 0); set BeginnerQuest,7; initnpctimer; set #Rope,gettimetick(2) + 60; end; OnTimer60000: delwaitingroom; waitingroom("COMPLETED !!", 0); end; } cancelrope: next; mes "[Workbench]"; mes "Cancel craft"; close; BeginnerQuest7: if(#Rope > gettimetick(2)) { mes "Please wait for until its finish. "; end; } else { if(BeginnerQuest == 7) { mes "Crafting Completed."; getitem 40007,1; getitem 40014,1; set BeginnerQuest,8; delwaitingroom; close; } } BeginnerQuest8: mes "I should meet back with Benimaru"; close; } thanks.. @Winterfox Edited October 14, 2023 by Dolphin86 Quote
0 Winterfox Posted October 14, 2023 Posted October 14, 2023 1 hour ago, Dolphin86 said: @Winterfoxi can take the item now, but the text box Completed is still there new_1-3,118,54,5 script Workbench 665,{ if($wrkb_crafting_state == 1) { mes "[" + .npc_name + "]"; mes "Please wait until the crafting process is finished. "; close; } if($wrkb_crafting_state == 2) { mes "[" + .npc_name + "]"; mes "Here are your products."; for(.@i = 0; .@i < getarraysize($product); .@i += 2) getitem($product[.@i], $product[.@i + 1]); delwaitingroom; $wrkb_crafting_state = 0; close; } mes "[" + .npc_name + "]"; mes "What do you want to craft?"; next; switch(select("Stone Dagger:Ropes:Cancel")) { case 1: if(countitem(40005) < 4) { mes "[" + .npc_name + "]"; mes "^ff0000 You do not have enough rocks ^000000"; close; } delitem(40005, 4); setarray($product, 40007, 1, 40009, 1); goto OnCraftingStart; case 2: if(countitem(40008) < 8) { mes "[" + .npc_name + "]"; mes "^ff0000 You do not have enough stalk ^000000"; close; } delitem(40008, 8); setarray($product, 40007, 1, 40014, 1); goto OnCraftingStart; case 3: mes "[" + .npc_name + "]"; mes "Crafting canceled."; close; } end; OnCraftingStart: $wrkb_crafting_state = 1; waitingroom("CRAFTING...", 0); initnpctimer; end; OnTimer60000: $wrkb_crafting_state = 2; delwaitingroom; waitingroom("COMPLETED!", 0); end; OnInit: .npc_name = strnpcinfo(1); if($wrkb_crafting_state == 1) goto OnCraftingStart; } Quote
0 Winterfox Posted October 14, 2023 Posted October 14, 2023 (edited) new_1-3,118,54,5 script Workbench 665,{ if($wrkb_crafting_state == 1) { mes "[" + .npc_name + "]"; mes "Please wait until the crafting process is finished. "; close; } if($wrkb_crafting_state == 2) { mes "[" + .npc_name + "]"; mes "Here are your products."; for(.@i = 0; .@i < getarraysize($product); .@i += 2) getitem($product[.@i], $product[.@i + 1]); $wrkb_crafting_state = 0; close; } mes "[" + .npc_name + "]"; mes "What do you want to craft?"; next; switch(select("Stone Dagger:Ropes:Cancel")) { case 1: if(countitem(40005) < 4) { mes "[" + .npc_name + "]"; mes "^ff0000 You do not have enough rocks ^000000"; close; } delitem(40005, 4); setarray($product, 40007, 1, 40009, 1); goto OnCraftingStart; case 2: if(countitem(40008) < 8) { mes "[" + .npc_name + "]"; mes "^ff0000 You do not have enough stalk ^000000"; close; } delitem(40008, 8); setarray($product, 40007, 1, 40014, 1); goto OnCraftingStart; case 3: mes "[" + .npc_name + "]"; mes "Crafting canceled."; close; } end; OnCraftingStart: $wrkb_crafting_state = 1; waitingroom("CRAFTING...", 0); initnpctimer; end; OnTimer60000: $wrkb_crafting_state = 2; delwaitingroom; waitingroom("COMPLETED!", 0); end; OnInit: .npc_name = strnpcinfo(1); if($wrkb_crafting_state == 1) goto OnCraftingStart; } Edited October 14, 2023 by Winterfox Quote
0 Dolphin86 Posted October 14, 2023 Author Posted October 14, 2023 @Winterfox this happen when i try to take the completed item, there is no error and i did not get the item, the npc still showing completed and when i talk again with the npc, the only option i have i to craft again, but item was never received Quote
0 Winterfox Posted October 14, 2023 Posted October 14, 2023 27 minutes ago, Dolphin86 said: @Winterfox this happen when i try to take the completed item, there is no error and i did not get the item, the npc still showing completed and when i talk again with the npc, the only option i have i to craft again, but item was never received new_1-3,118,54,5 script Workbench 665,{ if($wrkb_crafting_state == 1) { mes "[" + .npc_name + "]"; mes "Please wait until the crafting process is finished. "; close; } if($wrkb_crafting_state == 2) { mes "[" + .npc_name + "]"; mes "Here are your products."; for(.@i = 0; .@i < getarraysize($product); .@i += 2) getitem($product[.@i], $product[.@i + 1]); $wrkb_crafting_state = 0; close; } mes "[" + .npc_name + "]"; mes "What do you want to craft?"; next; switch(select("Stone Dagger:Ropes:Cancel")) { case 1: if(countitem(40005) < 4) { mes "[" + .npc_name + "]"; mes "^ff0000 You do not have enough rocks ^000000"; close; } delitem(40005, 4); setarray($product, 40007, 1, 40009, 1); goto OnCraftingStart; case 2: if(countitem(40008) < 8) { mes "[" + .npc_name + "]"; mes "^ff0000 You do not have enough stalk ^000000"; close; } delitem(40008, 8); setarray($product, 40007, 1, 40014, 1); goto OnCraftingStart; case 3: mes "[" + .npc_name + "]"; mes "Crafting canceled."; close; } end; OnCraftingStart: $wrkb_crafting_state = 1; waitingroom("CRAFTING...", 0); initnpctimer; end; OnTimer60000: $wrkb_crafting_state = 2; delwaitingroom; waitingroom("COMPLETED!", 0); end; OnInit: .npc_name = strnpcinfo(1); if($wrkb_crafting_state == 1) goto OnCraftingStart; } Quote
0 Dolphin86 Posted October 14, 2023 Author Posted October 14, 2023 (edited) On 10/15/2023 at 5:31 AM, Winterfox said: @Winterfoxi can take the item now, but the text box Completed is still there On 10/15/2023 at 7:00 AM, Winterfox said: perfect !!! thanks works fine now !!! Edited October 14, 2023 by Dolphin86 Quote
Question
Dolphin86
hye i do know the problem is with the label, but how should i rename it without making error on the whole script as i need it to be 1 minute wait..
or someone can fix it for me or at least show me an example?
the script:
new_1-3,118,54,5 script Workbench 665,{ if(BeginnerQuest == 2) goto BeginnerQuest2; if(BeginnerQuest == 3) goto BeginnerQuest3; if(BeginnerQuest == 4) goto BeginnerQuest4; if(BeginnerQuest == 6) goto BeginnerQuest6; if(BeginnerQuest == 7) goto BeginnerQuest7; BeginnerQuest2: mes "[Workbench]"; if(select("-Craft Stone Dagger:Cancel")==2) goto cancelstonedagger; if(countitem(40005) < 4 ) { mes "^ff0000 Not enough Rocks ^000000"; close; } else { delitem 40005,4; waitingroom("CRAFTING...", 0); set BeginnerQuest,3; initnpctimer; set #StoneDagger,gettimetick(2) + 60; end; OnTimer60000: delwaitingroom; waitingroom("COMPLETED !!", 0); end; } cancelstonedagger: next; mes "[Workbench]"; mes "Cancel craft"; close; BeginnerQuest3: if(#StoneDagger > gettimetick(2)) { mes "Please wait for until its finish. "; end; } else { if(BeginnerQuest == 3) { mes "Crafting Completed."; getitem 40007,1; getitem 40009,1; set BeginnerQuest,4; delwaitingroom; close; } } BeginnerQuest4: mes "I should meet back with Benimaru"; close; BeginnerQuest6: mes "[Workbench]"; if(select("-Craft Ropes:Cancel")==2) goto cancelrope; if(countitem(40008) < 8 ) { mes "^ff0000 Not enough Stalk ^000000"; close; } else { delitem 40008,8; waitingroom("CRAFTING...", 0); set BeginnerQuest,7; initnpctimer; set #Rope,gettimetick(2) + 60; end; OnTimer60000: delwaitingroom; waitingroom("COMPLETED !!", 0); end; } cancelrope: next; mes "[Workbench]"; mes "Cancel craft"; close; BeginnerQuest7: if(#Rope > gettimetick(2)) { mes "Please wait for until its finish. "; end; } else { if(BeginnerQuest == 7) { mes "Crafting Completed."; getitem 40007,1; getitem 40014,1; set BeginnerQuest,8; delwaitingroom; close; } } BeginnerQuest8: mes "I should meet back with Benimaru"; close; }
thanks..
@Winterfox
Edited by Dolphin865 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.