Jump to content
  • 0

One-Click Identify and Repair ?


healthydude

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   2
  • Joined:  02/05/13
  • Last Seen:  

Hello everyone, I've been searching the forums for a script that allows the players to have their items repaired by doing one click. Same goes to identifier.

 

Is there such script? I will appreciate any reply from the rA community :)

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  10/14/17
  • Last Seen:  

I know this is an old topic but I couldn't bring myself to delete and re-create an item to identify it. Its sound like a unnecessary risk, so I added a identifyall script command based on the @identifyall command. Figured I should share it and this was the first thing on google about identifying NPC.

 

script.inc

BUILDIN_FUNC(identifyall)
{
	int i;
	TBL_PC* sd;

	if( !script_rid2sd(sd) )
		return SCRIPT_CMD_SUCCESS;

	for(i=0; i<MAX_INVENTORY; i++) {
		if (sd->inventory.u.items_inventory[i].nameid > 0 && sd->inventory.u.items_inventory[i].identify != 1) {
			sd->inventory.u.items_inventory[i].identify = 1;
			clif_item_identified(sd,i,0);
		}
	}
	return SCRIPT_CMD_SUCCESS;
}

script_def.inc

BUILDIN_DEF(identifyall,""),

Usage

-	script	Deckard Cain	-1,{
	identifyall;
	end;
}

If you see a flaw in this, please let me know, cause I'm using it on my server :)

Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   2
  • Joined:  02/05/13
  • Last Seen:  

 

 

 

Great work, but I kinda need something else.

Can you make it 2 separate NPCs? I was using this one and it accidentally deletes some items when the player's inventory has an unidentified item and broken equipment.

healthydude 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

I want to add a message after clicking the npc! I tried adding but it doesnt exist after i click

 

 

 
prontera,155,181,5    script    Sample    757,{
mes "^FF0000Repaired and Identified!^000000";
mes "Thank you for coming! ;)";
if( getbrokenid(1) ) repairall;
getinventorylist;
while( .@i < @inventorylist_count ){
    if ( !@inventorylist_identify[.@i] ){
        delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
        getitem @inventorylist_id[.@i],1;
    }
    .@i++;
}
end;
}

 

 

Link to comment
Share on other sites


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

.@i++;

}

end;

}

.@i++;

}

close;

}

?

Link to comment
Share on other sites


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

there should be an error in your map server whenever a NPC is failed to load into the game...

mes "Thank you for coming!";
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...