uint[] Reload = { CHOSEN_USE_ITEM, item.Id, 0, TARGET_SELF_ITEM, -1, ITEM_MODE_RELOAD, 0 };
the -1 causes the weapon to unload (0 instead of -1 loads with current ammo)...
(if you want to load weapon with specific ammunition, you can use id of ammo item instead of the -1)
uint[] uses = { CHOSEN_MOVE_ITEM_CONT, <id of placed or taken item... NOT the container's>, <300 if placing into container/ 301 if taking>, count, 0, 0, 0 };
no idea why are 300 and 301 there... you have to first use the container via the CHOSEN_PICK_ITEM for this to work
I would recomend placing following code into "void critter_action" callback function (in 2238 source this function is in client_mapper_animation.fos)
if(cr.IsChosen())
{
array<uint> actions;
uint cnt = GetChosenActions(actions);
if(cnt != 0)
{
Message(actions[0]+" "+actions[1]+" "+actions[2]+" "+actions[3]+" "+actions[4]+" "+actions[5]+" "+actions[6]);
}
}
This should give you 7 numbers defining the chosen action everytime(?) your char does some action - they don't tell you much if you have no idea what you are doing, but with help of the comments near the CHOSEN_ACTION #defines it can be deciphered (4billions large number usually means -1 because of the unsigned conversion)