Jump to content
  • 0
healthydude

One-Click Identify and Repair ?

Question

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

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

 

 

 

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

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( [email protected] < @inventorylist_count ){
    if ( [email protected]_identify[[email protected]] ){
        delitem2 @inventorylist_id[[email protected]],1,0,0,0,0,0,0,0;
        getitem @inventorylist_id[[email protected]],1;
    }
    [email protected]++;
}
end;
}

 

 

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.