Skip to content
Permalink
Browse files

Cleaned up countitem-type script commands (#3657)

* Fixes #3612.
* Separated the countitem-type script commands into their own functions.
* Created a global count function to be used between them.
Thanks to @kisuka, @Normynator and @Atemo!
  • Loading branch information...
aleos89 committed Apr 12, 2019
1 parent 0602050 commit f047a6a510ba4fc771ba0c3ccad3fa004e05b4c1
Showing with 242 additions and 114 deletions.
  1. +6 −6 doc/script_commands.txt
  2. +236 −108 src/map/script.cpp
@@ -4941,8 +4941,8 @@ If player is not in a guild or storage is open, 'guildstoragedelitem2' will retu

---------------------------------------

*countitem(<item id>)
*countitem("<item name>")
*countitem(<item id>{,<accountID>})
*countitem("<item name>"{,<accountID>})

This function will return the number of items for the specified item ID that the
invoking character has in the inventory.
@@ -4978,10 +4978,10 @@ If player is not in a guild or storage is open, 'guildstoragecountitem' will ret

---------------------------------------

*countitem2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
*countitem2("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
*countitem3(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>)
*countitem3("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>)
*countitem2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<accountID>})
*countitem2("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<accountID>})
*countitem3(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<accountID>})
*countitem3("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<accountID>})

Expanded version of 'countitem' function, used for created/carded/forged items.

Oops, something went wrong.

0 comments on commit f047a6a

Please sign in to comment.
You can’t perform that action at this time.