This is what I intend to do...
I tested it here and it is giving this when it clicks on npc.
[Error]: buildin_setunitdata: Invalid object!
[Debug]: Source (NPC): Test#HPbar at payon (147,229)
[Error]: buildin_setunitdata: Invalid object!
[Debug]: Source (NPC): Test#HPbar at payon (147,229)
[Warning]: buildin_getunitdata: Error in argument! Please give a variable to store values in.
[Debug]: Source (NPC): Test#HPbar at payon (147,229)
[Warning]: buildin_getunitdata: Error in argument! Please give a variable to store values in.
[Debug]: Source (NPC): Test#HPbar at payon (147,229)
[Error]: script:op_2num: division by zero detected op=C_DIV i1=0 i2=0
[Debug]: Source (NPC): Test#HPbar at payon (147,229)