Jump to content
  • 0

Repair 1 broken item from menu.


Question

Posted
		for (.@i=0; .@i < @inventorylist_count; .@i++) {
			if( @inventorylist_attribute[.@i] ){
				.@items[.@broken] = @inventorylist_id[.@i];
				.@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + ":";
				.@broken++;
			}
		}
		if (!.@broken) {
			mes "["+ .@npc_name$ +"]";
			mes "Oh wow, this is incredible!";
			mes "You must take very good care of your things. None of your items are damaged!";
		}
		next;
		.@select = select(.@menu$) - 1;
		mes "["+ .@npc_name$ +"]";
		mes "You are trying to repair the item "+getitemname(.@items[.@select]);
		next;
		if( select( "Yes","No" ) == 2 ) end;
	!!!	repair (Help with the Formula of the specific/selected broked id?)
		mes "["+ .@npc_name$ +"]";
		mes "Okay! All done. Now, try to be a little more careful. Items have lives too you know.";
		close;

I need help in identifying the correct formula in repairing a selected broken item from the menu.

I tried...
        

Quote

.@choice = .@broken - 1;
        repair (.@choice - getarraysize(.@broken));

but it's not quite right.. the repaired item is the wrong selection...  Anyhelp is appreciated.

2 answers to this question

Recommended Posts

  • 0
Posted
*repair <broken item number>{,<char_id>};

This command repairs a broken piece of equipment, using the same list of broken
items as available through 'getbrokenid'.
repair(1);

 

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