Here is the thing, I have a couple slaves that work on my farms, however they are often bullied, poor slaves, so I'm thinking of making them sleep in a nearby bed that its theirs, I have an idea on how to do that, but the code will be a bit big with foreach to check ownerId and to get skillId, anyway I can do that with only a couple lines?
Something along the lines of:
PS: Anyone know the skillId for sleep?
PPS: How to get nearestdoodad(bed) owned by player.
Something along the lines of:
Code:
DoodadObject newObject = getNearestDoodad("BedName");
UseDoodadSkill(skillId, newObject , true, 0);
PS: Anyone know the skillId for sleep?
PPS: How to get nearestdoodad(bed) owned by player.






