Jump to content
  • 0

[Error]: buildin_delitem2: failed to delete 1 items


CyberDevil

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

In my logs I have this error:

Quote

[12/Feb 00:32][Info]: [Instance] Created map '0011@face' ('1001') from map '1@face' ('858')
[12/Feb 00:32][Info]: [Instance] Created: Faceworm's Nest (1).
[12/Feb 00:55][Error]: buildin_delitem2: failed to delete 1 items (AID=200xxxx item_id=20717).
[12/Feb 00:55][Debug]: Source (NPC): Identifier at prontera (147,174)
[12/Feb 01:00][Info]: [Instance] Destroyed 1.

After a check I found that the item with ID 20717 (Gigant Snake Skin) related to the "Faceworm's Nest" instance refers to this official rAthena script: https://github.com/rathena/rathena/blob/master/npc/re/instances/FacewormsNest.txt

On this forum I found others who had this error but for a different script (see HERE)... could it be a general bug that all servers have? And just replace the 4 "countitem" with "countitem2" to solve it?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

4 hours ago, CyberDevil said:

In my logs I have this error:

After a check I found that the item with ID 20717 (Gigant Snake Skin) related to the "Faceworm's Nest" instance refers to this official rAthena script: https://github.com/rathena/rathena/blob/master/npc/re/instances/FacewormsNest.txt

On this forum I found others who had this error but for a different script (see HERE)... could it be a general bug that all servers have? And just replace the 4 "countitem" with "countitem2" to solve it?

Countitem2??

Switching from delitem2 to delitem should solve your problem

but doing so does delete random 20717

 

any of the delitem series of command except *delitem require specific stuff

delitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};

like delitem2 if card1 is "1" is going to fail

if no carded item in card1 for item 20717 found when command execute

the same goes for any other details of 

<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

[12/Feb 00:55][Error]: buildin_delitem2: failed to delete 1 items (AID=200xxxx item_id=20717).
[12/Feb 00:55][Debug]: Source (NPC): Identifier at prontera (147,174)

it clearly says this happens from identifier npc script at prontera map

 

ok most Identifier script scatter on the board gives something like this

prontera,150,185,5	script	test	1_F_MARIA,{
	getinventorylist;
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( !@inventorylist_identify[.@i] ) {
			delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
			getitem @inventorylist_id[.@i],1;
		}
	}
}

which is true for most of the time, because monsters drop unidentified items without refine, no cards

but this instance script you showed, drops refined and enchanted equipment,

	makeitem2 .@d_item,1,'map_name$,.@x,.@y,0,.@refine,0,0,.@en_name_2,.@en_name_3,.@en_name_4;

and this custom Identifier script will fail to delete the item (as error shown)
perhaps should change the identifier script accordingly like this

prontera,150,185,5	script	test	1_F_MARIA,{
	getinventorylist;
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( !@inventorylist_identify[.@i] ) {
			delitem2 @inventorylist_id[.@i], 1, 0, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
			getitem2 @inventorylist_id[.@i], 1, 1, @inventorylist_refine[.@i], 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		}
	}
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

Thank you so much @AnnieRuru but in the line of the "getitem2" I have to leave to "0" where would go "@inventorylist_attribute"???
Below is my script commented and with your correction... can you confirm that everything is correct?
Thank you so much for your help.

prontera,147,174,5	script	Identifier::identifier	402,{
set .@Price, 100;	// Zeny per identificare
getinventorylist;
for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {
	if (@inventorylist_identify[.@i]) continue;
	if (Zeny < .@Price) {
		dispbottom "The price is "+.@Price+" zeny to identify an item."; break; }
	set Zeny, Zeny-.@Price;
//	delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
//	getitem @inventorylist_id[.@i],1;
	delitem2 @inventorylist_id[.@i], 1, 0, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
	getitem2 @inventorylist_id[.@i], 1, 1, @inventorylist_refine[.@i], 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
	setarray .@Total[0], .@Total[0]+1, .@Total[1]+.@Price; }
if (!.@Total[0]) {
	message strcharinfo(0),"No identified items."; end; }
specialeffect2 154;
message strcharinfo(0),"Identify "+.@Total[0]+" items"+((.@Total[1])?" for "+.@Total[1]+" Zeny":"")+".";
end;
}

paramk,102,60,6	duplicate(identifier)	Identifier	402

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@inventorylist_attribute[] - whether it is broken.
1 = broken, 0 = not broken

well, because my healer script actually has ... many functions, including *repairall, which your script missing ...
https://drive.google.com/file/d/19jGaMK0QqAU76XufxwiyqEAZ_AUJaJRu/view
note this is hercules script ... rathena doesn't support skill name or item name as constants ... also SC_INC_AGI is SC_INCREASEAGI in rathena .. etc

looking at your script, having high identify cost, I guess your players has to go to repairman to get equipment repair

prontera,147,174,5	script	Identifier::identifier	402,{
//	getitem2 1201, 1,0,0,0, 4001,4002,4003,4004;
//	getitem2 1202, 1,0,3,0, 4001,4001,4001,4001;

	.@price = 100; // that's expensive ... 1 magnifier cost 40 zeny actually
	getinventorylist;
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( @inventorylist_identify[.@i] )
			continue;
		if ( Zeny < .@price ) {
			dispbottom "The price is "+ .@price +" zeny to identify an item.";
			break;
		}
		Zeny -= .@price;
		delitem2 @inventorylist_id[.@i], 1, 0, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		getitem2 @inventorylist_id[.@i], 1, 1, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		++.@total_item'
		.@total_zeny += .@price;
	}
	if ( !.@total_item ) {
		message strcharinfo(0),"No identified items.";
		end;
	}
	specialeffect2 EF_REFINEOK;
	message strcharinfo(0), "Identify "+ .@total_item +" items for "+ .@total_zeny +" Zeny";
	end;
}

 

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

Thank you @AnnieRuru all work perfectly... and yes, we prefer that our players pay a higher price to identify multiple items at once and if they do not want to bring with them the Magnifiers!

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Note that the script doesn't identify properly the items with random option.

How about identifyall command instead? https://github.com/rathena/rathena/blob/90d5b47025d07a78f52b82b9f58685efc97ed993/doc/script_commands.txt#L3037

prontera,147,174,5	script	Identifier::identifier	402,{
	.@price = 100;

	.@count = identifyall(false);
	if (!.@count) {
		message strcharinfo(0), "No identified items.";
		end;
	}
	.@total_cost = .@price * .@count;
	if (Zeny < .@total_cost) {
		message strcharinfo(0), "You need " + .@total_cost + " Zeny to identify the " + .@count + " items.";
		end;
	}
	identifyall(true);
	Zeny -= .@total_cost;
	specialeffect2 154;
	message strcharinfo(0), "Identify " + .@count + " items for " + .@total_cost + " Zeny.";
	end;
}

paramk,102,60,6	duplicate(identifier)	Identifier	402

The system is slightly different than the previous script though, this one doesn't identify the items one by one.

Edited by Capuche
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

1 hour ago, Capuche said:

The system is slightly different than the previous script though, this one doesn't identify the items one by one.

Yup but I have a question does using that system shows or list what items get identified or not??

comparing to the single item identifying??

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

utofaery is correct, my script uses getitem2 actually shows which item I got,

You got Lucky Vital Hard Dexterous Knife [3] (1)
You got +3 Quadruple Lucky Knife [4] (1)

and using identifyall script command only shows

Item Appraisal has completed successfully
Item Appraisal has completed successfully

 

identifyall script command .... unique to rathena ... check

I not really sure how players gets random option equipment officially ... though
I thought this system is custom .... there is no getitem3 anywhere in rathena npc folder... although we just kinda make emulator supports it

Link to comment
Share on other sites

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.

×
×
  • Create New...