Jump to content
  • 0

Error with = set_label : dup label


Question

Posted (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?

1.PNG.7d9309eeb0959e4f74974b57b4e6d33a.PNG

 

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 by Dolphin86

5 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, Dolphin86 said:

@Winterfoxi can take the item now, but the text box Completed is still there

1.png.564c8c71290facb4ad0a98ecfbf71cd7.png

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;
}

 

  • 0
Posted (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 by Winterfox
  • 0
Posted

1.png.558b60e0a347655c68ba6cdc4ba56b8e.png

@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 

  • 0
Posted
27 minutes ago, Dolphin86 said:

1.png.558b60e0a347655c68ba6cdc4ba56b8e.png

@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;
}

 

  • 0
Posted (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

1.png.564c8c71290facb4ad0a98ecfbf71cd7.png

 

On 10/15/2023 at 7:00 AM, Winterfox said:

 

perfect !!! thanks works fine now !!!

Edited by Dolphin86

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