Results 1 to 3 of 3

Thread: If... Then statement help

  1. #1
    Join Date
    May 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default If... Then statement help

    I'm working on a project at the moment and if you wanted the script to detect that it hasn't been in combat for like one minute so it could log out and then back on how would you go about getting it to detect that? I'm not sure if this question even makes sense..
    Got me

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    MarkTime(t)
    Repeat
    wait(200);
    Until (NotFighting) or (TimefromMark(t)>60000)


    Use pixel shift or something for fighting

  3. #3
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

    Default

    Well, when you're in combat your character should be moving, right? So why don't you use pixelshift? Here's an excellent tutorial on pixelshift: http://villavu.com/forum/showthread.php?t=74090.

    So you could call that pixelshift function "InCombat". Then in your code you'd do something like:

    Simba Code:
    procedure ######;
    begin
      repeat
        DoStuff
        OtherStuff;
        Antiban;
      until(insertsomethinghere);
      if not (InCombat) then
      begin
        WriteLn('Out of combat for 60 seconds. Logging out.');
        TerminateScript;
      end;
    end;

    Please excuse that horrid excuse of an example. I hope you get the point, though. If you need too, you can look through other people's scripts for examples!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •