Jump to content
Sign in to follow this  
Mumbles

identifyall()

Recommended Posts

Function: identifyall()

Quick function to complement commit #24c4d53.
 

Full version:
Identifies all unidentified items in user's inventory and returns the number of items identified.

Quick-use version:
Identifies all unidentified items in user's inventory without returning any additional values.

Usage:

Spoiler
11 minutes ago, Mumbles said:

This script-command version of identifyall() provides the following:

  • A return value for the number of items identified
    • Enables the possibility of using the amount of items identified to create individual cost or bulk pricing
      • i.e. 10 items identified for 400 Z (base cost for 10x items identified @ 40 Z each)
      • i.e. 23 items identified for 805 Z (bulk cost for 23x items identied @ 35 Z each, when identifying 20 or more at once)
    • Allows for the number of items identified (and the maths on cost) to be displayed to the user, for informational purposes
    • Eliminates redundant scripting by alternatively using atcommand "@identifyall"; in a script and still needing to gather the number of items identified
  • Allows for use of identifyall as a script-command rather than an atcommand, particularly under circumstances when using atcommands in general are restricted, limited, or undesirable
  • With some modification, this can be changed into a global function so it can be used across multiple scripts

With a little imagination and creativity,  identifyall as a script-command can be used for interfacing with various utilities, zeny sinks, and other features. Like I said -- this little script command would find its niche mostly in low-rate servers, but it'll be here if it's needed.

Download:
identifyall.txt

Mirror:
https://upaste.me/f75351070d03c790e

 

Edited by Mumbles
Updated download options and added usage information ¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites
5 hours ago, Ridley said:

identifyall was just recently added https://github.com/HerculesWS/Hercules/pull/2487

identifyall was solely added as an atcommand, wasn't it?

I made this as a script-command based on reiterations of identify() so users could make an inline function in their quest, event, or utility scripts.

The benefits are trivial and would mostly suit low-rate servers with a low zeny pool, but they're beneficial nonetheless. ¯\_(ツ)_/¯
 

This script-command version of identifyall() provides the following:

  • A return value for the number of items identified
    • Enables the possibility of using the amount of items identified to create individual cost or bulk pricing
      • i.e. 10 items identified for 400 Z (base cost for 10x items identified @ 40 Z each)
      • i.e. 23 items identified for 805 Z (bulk cost for 23x items identied @ 35 Z each, when identifying 20 or more at once)
    • Allows for the number of items identified (and the maths on cost) to be displayed to the user, for informational purposes
    • Eliminates redundant scripting by alternatively using atcommand "@identifyall"; in a script and still needing to gather the number of items identified
  • Allows for use of identifyall as a script-command rather than an atcommand, particularly under circumstances when using atcommands in general are restricted, limited, or undesirable
  • With some modification, this can be changed into a global function so it can be used across multiple scripts

With a little imagination and creativity,  identifyall as a script-command can be used for interfacing with various utilities, zeny sinks, and other features. Like I said -- this little script command would find its niche mostly in low-rate servers, but it'll be here if it's needed.

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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