| Rednie   Junior Member
 
 Posts: 8
 Threads: 2
 Joined: Apr 2020
 Reputation: 
0
 | 
			| Script that checks AMOUNT of an item 
 
				Hi
 I really need help with a script.
 I want to create a function that checks the AMOUNT of an item (say: check if inventory has 10 of laudanum or if there is <10 of laudanum) in inventory.
 Is it even possible in HPL2?
 |  | 
	| 04-06-2020, 02:48 PM |  | 
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| RE: Script that checks AMOUNT of an item 
 
				I don't think this is currently possible. You can hack a way to count how many have been picked up, but it would be hard to know if the player has used any. Technically with a looping timer, you could compare player health over time to see if it jumps by 25 at any points, and assume one has been used, but this is a lot of fiddling.
			 
 
				
(This post was last modified: 04-07-2020, 05:40 PM by Mudbill.)
 |  | 
	| 04-07-2020, 05:38 PM |  | 
	
		| Rednie   Junior Member
 
 Posts: 8
 Threads: 2
 Joined: Apr 2020
 Reputation: 
0
 | 
			| RE: Script that checks AMOUNT of an item 
 
				 (04-07-2020, 05:38 PM)Mudbill Wrote:  I don't think this is currently possible. You can hack a way to count how many have been picked up, but it would be hard to know if the player has used any. Technically with a looping timer, you could compare player health over time to see if it jumps by 25 at any points, and assume one has been used, but this is a lot of fiddling. 
Alright thanks!    |  | 
	| 04-08-2020, 04:45 PM |  |