Share This!

Monday, April 9, 2007

Sims Sitter 3

I like to play The Sims Online. Unlike the Sims 2 (which I have not played), the little cartoon characters do nothing unless you tell them to. They would literally starve to death standing next to a buffet table if you don't tell them to eat.

Doing anything fun in the Sims Online (TSO) requires you to build up your skills. Here's how fun it is building skills:

  1. select a skill
  2. find a skill house that does that skill
  3. go there
  4. choose the skill item and your sim will start using it (like weight benches for body skill)
  5. skill for about 20 hours to max the skill.
  6. Every hour or so, you need to green (eat, sleep, shower, pee)
  7. Every 15 minutes TSO will log you out for inactivity if you haven't clicked your mouse or typed a keystroke into the Sims window.
The fact that it takes so long and you must stay on the skill object makes skilling
  1. boring
  2. perfect for when you're away from the keyboard (afk)
The only gotcha there is that when you're afk, the inactivity warning comes up and logs you out every 15 minutes. So some guys made this thing called SimsSitter. Don't bother downloading it, Maxis has defeated it's effectiveness with a recent update. That's what prompted me (as a programmer) to write SimsSitter2 in Delphi. It's the same thing, but it works with the changes Maxis made to the program that make SimsSitter not work. Now I want to redo it as a learning experience in C Sharp. Here are the design specs...
  1. must wait for a delay of less than 15 minutes (5 should be optimal)...
  2. must get a list of all the windows from the OS that have the caption "The Sims Online"
  3. must bring each of these to the top and type some keys to keep the window active ("A" then Backspace should work nicely)
  4. must be able to stop and start it's timer with a button click (like the original)
Nice to haves:
  1. blink it's icon for 5 seconds before it takes control so the user can pause what he's doing.
  2. restore whatever window was on top when it's done.
  3. if it could recognize when your sim stops skilling and stop pressing keys for you that would be peachy (because you will die if you forget to green)
Ok. In Delphi the main thing I needed to accomplish this were the Timer Object, the EnumWindows API call and the SendKeys API call. So I opened a project in Visual Studio and called it SimsSitter3. I found the timer object and was able to set it to 5 minutes right away, and watch it trigger. Piece of cake so far. Now, where is the enumWindows procedure? I found a reference to it here. They seem to be interested in building a list of running windows, but I need to iterate through and put the system caret on that window if it's title matches my template.

No comments:

Post a Comment

Contact Us


Email *

Message *