Results 1 to 13 of 13

Thread: 4 Quostions.

  1. #1
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default 4 Quostions.

    1. How i can set up properly FindNormalRandoms; I mean where i need put it on script.
    2. Here is an way to find RewardBox? no bitmaps or dtms? and function?
    3. Can anyone show Example about response something like this
      Player1:Hi, what is your *autoing* level?
      Autoer:My *corrent autoing level*.
      Autoer:Like you see I am busy don`t disturb me please...
    4. Banking. exmaple. if i do ..
      SCAR Code:
      OpenBank('db', true, true);

      And it can't open bank. how i can falesafe like

      SCAR Code:
      if OpenBank('veb', true, true)  *not open 1min* then
      begin
         FindSymbol((x-Random(10)), y, 'bank');
      end;

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    3.

    my autoresponder (its really basic) and allow for user input etc.

    SCAR Code:
    var HowManyResponses, ChatTimer: Integer; Question, Response: Array of TStringArray;

    Procedure SetResponderArr;
    begin
      HowManyResponses := 4;

      SetLength(Question, HowManyResponses);
      SetLength(Response, HowManyResponses);

      Question[0] := ['Hi', 'Hello', 'Hey', 'Sup', 'Howdy', 'Hiya'];
      Response[0] := ['Hi', 'Hello', 'Hey', 'Sup', 'Howdy', 'Hiya','Hi there'];

      Question[1] := ['Lol', 'Rofl', 'Lawl', 'Haha', 'funny', 'Lmao', 'Lmfao'];
      Response[1] := ['Lol', 'Rofl', 'Lawl', 'Haha', 'funny', 'Lmao', 'Lmfao'];

      Question[2] := ['noob', 'Nub', 'N00b', 'Nooblet'];
      Response[2] := ['your a noob','loser','go away','sigh...'];

      Question[3] := ['macro', 'autoer', 'cheater', 'bot', 'autoing'];
      Response[3] := ['lol who?','who me?','haha how?'];

     {Question[4] := [];
      Response[4] := [];}

    end;

    Function InChatAr(Text: array of string): Boolean; //Credits to EvilChicken & Nava2
    var I, H: integer; s: string;
    begin
      H := High(Text);
      if (not (GetLastChatText(s))) then
        LastChatter(s);
      for I := 0 to H do
      begin
        if (Pos(Lowercase(Text[i]), (Lowercase(s))) > 0) then
        begin
          Result := true;
          Exit;
        end;
      end;
    end;

    Function Responder: Boolean;
    var i, ii, OldMsg, NewMsg: Byte; TexttoType: String;
    begin
      if not Players[CurrentPlayer].Booleans[1] then Exit;
      if (GetSystemTime-ChatTimer < 120000 +RandomRange(-25000, 25000)) then Exit;
      for i := 0 to High(Question) do
      begin
        for ii := 0 to High(Question[i]) do
        begin
          if InChatAr([Question[i][ii]]) then
          begin
            NewMsg := i;
            if (NewMsg = OldMsg) then Exit;
            TextToType := Response[i][Random(High(Response)+1)];
            if (TextToType <> '') and (TextToType <> Question[i][ii]) then
              TypeSend(TextToType) else Exit;
            NewMsg := OldMsg;
            ChatTimer := GetSystemTime;
            Result := True;
          end;
        end;
      end;
      if Result then Inc(Players[CurrentPlayer].Integers[15]);
    end;
    “Ignorance, the root and the stem of every evil.”

  3. #3
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Thank you BlumBleBlee !

    EDIT:It do not want to work...

  4. #4
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OpenBank('db', true, true)
    if not bankscreen then openbank or something like that

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    1:

    SCAR Code:
    BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];

    ^ You would put something like that in your DeclarePlayers procedure, and it will choose one of the rewards depending on what you have in the TStringArray.

    2:

    You should call FindNormalRandoms in the procedures/functions that take a while to go through. For example, you would want to call it while you're woodcutting, or after you bank, or right before you walk to the bank, etc.

    When you call FindNormalRandoms, it will find the Random Event box in your inventory, and claim your reward.

    I hope that helps.

    Coh3n

  6. #6
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Laimonas171 View Post
    Thank you BlumBleBlee !

    EDIT:It do not want to work...
    it should, how are you calling it?
    “Ignorance, the root and the stem of every evil.”

  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    1:
    2:

    You should call FindNormalRandoms in the procedures/functions that take a while to go through. For example, you would want to call it while you're woodcutting, or after you bank, or right before you walk to the bank, etc.

    When you call FindNormalRandoms, it will find the Random Event box in your inventory, and claim your reward.
    To add to this, put it at the beginning of the MainLoop where the character is actually loggedIn, incase you log into an account that is in a random.

  8. #8
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    it should, how are you calling it?

    Copied all, used responder function on loops procedure. have error in line

    SCAR Code:
    Function Responder: Boolean;
    var i, ii, OldMsg, NewMsg: Byte; TexttoType: String;
    begin
      if not Players[CurrentPlayer].Booleans[1] then Exit;//showed here firstly
    //so i changed it like on your powerminer v2.
      if (GetSystemTime-ChatTimer < 120000 +RandomRange(-25000, 25000)) then Exit;
      for i := 0 to High(Question) do
      begin
        for ii := 0 to High(Question[i]) do //then i got here error. don't know what to chnage...
        begin
          if InChatAr([Question[i][ii]]) then
          begin
            NewMsg := i;
            if (NewMsg = OldMsg) then Exit;
            TextToType := Response[i][Random(High(Response)+1)];
            if (TextToType <> '') and (TextToType <> Question[i][ii]) then
              TypeSend(TextToType) else Exit;
            NewMsg := OldMsg;
            ChatTimer := GetSystemTime;
            Result := True;
          end;
        end;
      end;
      if Result then Inc(Players[CurrentPlayer].Integers[15]);
    end;

  9. #9
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    did you add the global variables
    SCAR Code:
    var HowManyResponses, ChatTimer: Integer; Question, Response: Array of TStringArray;
    and the players[currentplayer].Booleans[0] is just for if you want to use the responder or not (used in my script) so you can just take that line out.
    “Ignorance, the root and the stem of every evil.”

  10. #10
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    i have vars, also i have players[currentplayer].Booleans[0].. :/

  11. #11
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    You have to set "Question" to something... plus what is the error.

  12. #12
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    can i see the script? It should work by all accounts
    “Ignorance, the root and the stem of every evil.”

  13. #13
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    You need to put "SetResponderArr" in the mainloop.

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
  •