Results 1 to 4 of 4

Thread: Question....

  1. #1
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Question....

    If I want each player to mine a different ore (or ore color), if I had an option to choose the color(s) in the DeclarePlayers, would it work?

    Example

    Say I have

    SCAR Code:
    Players[0].Name := '';
        Players[0].Pass := '';
        Players[0].Nick := '';
        Players[0].Active := True;
        RockColor = 1111111111
       
        Players[1].Name := '';
        Players[1].Pass := '';
        Players[1].Nick := '';
        Players[1].Active := True;
        RockColor = 9999999999

    And then later I have something like

    SCAR Code:
    procedure Mining
      begin
        if (FindObjCustom(x, y, ['Mine','ine O','ne Or','e Ore','Ore'], [RockColor], 1)) then
               Mouse(x, y, 0, 0, True)
      end;

    Would the RockColor be changed for player [1] or would it give me some sort of error that I'm declaring RockColor as two different things?

    It seems that it doesn't look right like that in the declare players, do I have to put something like
    SCAR Code:
    Players[1].RockColor=99999999
    ? If so, would stating it as RockColor when I want it to look for the the color be fine?

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You would define it as Players[1].Integers[1]:= TheColorHere;

  3. #3
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So I would do
    SCAR Code:
    //Do I have to put 'var RockColor:integer' or something like that somewhere?


    procedure DeclarePlayers;    
      begin
        Players[0].Name := '';
        Players[0].Pass := '';
        Players[0].Nick := '';
        Players[0].Active := True;
        Players[0].RockColor[0]:= 1111111;
       
        Players[1].Name := '';
        Players[1].Pass := '';
        Players[1].Nick := '';
        Players[1].Active := True;
        Players[1].RockColor[1]:= 99999999;

    //etc...
      end;

    And then
    SCAR Code:
    procedure Mining
      begin
        if (FindObjCustom(x, y, ['Mine','ine O','ne Or','e Ore','Ore'], [RockColor], 1)) then
               Mouse(x, y, 0, 0, True)
      end;

    That would work?

  4. #4
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Almost. The 1 in Integers[1] would stay for all the players.

    And for your mining procedure, you'd have
    SCAR Code:
    procedure Mining
      begin
        if (FindObjCustom(x, y, ['Mine','ine O','ne Or','e Ore','Ore'], [Players[CurrentPlayer].Integers[1]], 1)) then
               Mouse(x, y, 0, 0, True)
      end;

    EDIT: I just realized that you had Players[1].RockColor[1]:= 99999999;. You can't do that. You'd change the "RockColor" to "Integers".

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. i has a question
    By Solkrieg in forum OSR Help
    Replies: 5
    Last Post: 10-30-2008, 08:20 AM
  2. tab 5 question
    By dvdcrayola in forum OSR Help
    Replies: 4
    Last Post: 07-04-2008, 06:43 AM

Posting Permissions

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