Jump to content
  • 0

Repair 1 broken item from menu.


Selerie

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  13
  • Reputation:   0
  • Joined:  12/27/21
  • Last Seen:  

		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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  13
  • Reputation:   0
  • Joined:  12/27/21
  • Last Seen:  

i got it figured out. ?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2361
  • Joined:  10/28/11
  • Last Seen:  

*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);

 

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