Results 1 to 7 of 7

Thread: simba - simba

  1. #1
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default simba - simba

    Forgive me if this is a stupid question, but is nil only used in setting up simba? Or does it have use in common scripts?

    Ex.

    Simba Code:
    {$ifdef Simba}
    {$loadlib irokiplugin}
    var
      Bladieblatempthingy : TForm;
    procedure CreateFormBladieblatempthingy;
    begin
      Bladieblatempthingy := TForm.Create(nil);
    end;
    {$endif}

    E: Er, title may be misleading, file path is:

    Simba > Includes > SRL > srl > core > simba.simba
    Last edited by Le Jingle; 04-12-2012 at 09:21 AM. Reason: see E:

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Also, another question;

    Simba Code:
    program New;
    {$DEFINE SMART}
    {$DEFINE SRL5}
    {$i srl/srl.simba}

    begin
      SendKeys(37, 200); // Key to send, wait time
    end.

    I get "Type mismatch at line 7", where sendkeys is, but I don't know what I'm doing wrong as I'm following the example.. :s

  3. #3
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I don't understand your first question.

    Answer to your second question.
    Simba Code:
    program New;

    begin
      SendKeys('Hello there!', 200); // Key to send, wait time
    end.

    It requires a string, not a number.
    Working on: Tithe Farmer

  4. #4
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Ah thanks, I didn't check to see if it said string >.>

    And I think I forget what I was trying to get at with the first question... :x

  5. #5
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Hmm, I'll ask another question here that hopefully may be looked upon and answered;

    Given my 2nd question, I'm trying to make a potential antiban suggestion;

    I'm thinking it has something to do with either my repeating method (how I used flight's label idea) or how I use the KeyUp/Down..

    Simba Code:
    // Synthesized from help via MasterBB, Flight, R1ch, Nebula and Wizzup?
    procedure RandomArrowKeyAngleToggle;
    var
      StartAngle, PressKeyz, i, a: integer;
    label
      Start; //Flight guided
    begin
      FindNormalRandoms;
      StartAngle := round(rs_GetCompassAngleDegrees());
      Start:
      PressKeyz:= RandomRange(50, 65);
      i:= random(4);

      begin
        case (i) of
         1:  begin
               KeyDown(VK_Left); // MasterBB guided
               KeyUp(VK_Left);
             end;
         2:  begin
               KeyDown(VK_Right);
               KeyUp(VK_Right);
             end;
         3:  begin
               KeyDown(40);
               KeyUp(40);
             end;
         4:  begin
               KeyDown(38);
               KeyUp(38);
             end;
        end;
        Inc(a);
      end;

        if (a<PressKeyz) then
        goto Start

        else if (a=PressKeyz) then
          begin
            MakeCompass(StartAngle);
          end;
    end;

    However when I run, my player will login, then idle/press a key, then just have the cam spin in circles until it reaches the "a=PressKeyz"

    Ideally I'm aiming to have the arrow keys be hit any # of times in the specified RandomRange, as to replicate how a bored human would toggle random arrow keys on a laptop..

    Any help appreciated.

  6. #6
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Didn't test it, but I think this would work.

    Simba Code:
    procedure RandomArrowKeyAngleToggle;
    var
      StartAngle, NumberOfSwitches, Key, i: integer;
    begin
      FindNormalRandoms;
      StartAngle := round(rs_GetCompassAngleDegrees);
      NumberOfSwitches:= RandomRange(2, 4);
      for i := 0 to NumberOfSwitches do
      begin
        Key := RandomRange(37,40);
        KeyDown(Key);
        wait(RandomRange(200,1000));
        KeyUp(Key);
      end;
      MakeCompass(StartAngle);      //Maybe also SetAngle?
    end;
    Working on: Tithe Farmer

  7. #7
    Join Date
    Jan 2011
    Location
    Denver, CO
    Posts
    1,351
    Mentioned
    2 Post(s)
    Quoted
    72 Post(s)

    Default

    About your first question:
    nil is used as a value for objects, it's the equivalent of null in many object-oriented languages. Since Simba is not object-oriented, you'll mostly see it in scripts with forms.

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
  •