Quote:
Originally Posted by eziorav
/run add_creature_value( get_creature_handle(0),"jp",1)
i think this should work
|
no you should read carefully ;)
Quote:
Originally Posted by stivenson2005
Good day all,
i have used /run set_creature_value( get_creature_handle(0),"jp",1)
it will set the JP to 1 and wont increase it by 1.
|
He wants to increase the jp and don't want to set the jp to 1. Your command will set the JP to 1 my command will add 1 JP to the current JP of the pet.
Code:
/run set_creature_value( get_creature_handle(0),"jp", (get_creature_value( get_creature_handle(0),"jp")+1))
Explanation:
set_creature_value = will set the value of a pet
get_creature_handle = pointer to the correct pet (0 = formation slot 1, 1 = formation slot 2...)
get_creature_value = will return the current value of a pet
get_creature_value( get_creature_handle(0),"jp")+1
This part will read the current JP of the pet and will add 1 JP to the current value