What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

How do I make a toon sleep in a nearby bed with the least amount of lines.

Voyager92

Member
Joined
Nov 3, 2014
Messages
287
Reaction score
1
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:
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.
 
Back
Top