Results 1 to 10 of 10

Thread: Who wants to help make my Multiplayer Form? (already started)

  1. #1
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default Who wants to help make my Multiplayer Form? (already started)

    Ok, let me first say I've finished the "template" (basically the looks, i even made the code nice and smooth.)

    Example of my form code:
    SCAR Code:
    procedure initForm;
    begin
      frmDesign := createForm;
      with frmDesign do
      begin
        left := 229;
        top := 60;
        width := 800;
        height := 545;
        caption := 'frmDesign';
        color := clBtnFace;
        font.Color := clWhite;
        font.Name := 'Myriad Web';
        borderStyle := bsNone;
      end;
      for i := 0 to 4 do
      begin
        groupBoxes[i] := tGroupBox.create(frmDesign);
        groupBoxes[i].parent := frmDesign;
        case(i)of
          0:
            begin
              groupBoxes[i].left := 20;
              groupBoxes[i].top := 192;
              groupBoxes[i].width := 257;
              groupBoxes[i].height := 161;
              groupBoxes[i].caption := 'Player List';
            end;
          1:
            begin
               groupBoxes[i].left := 20;
               groupBoxes[i].top := 368;
               groupBoxes[i].width := 257;
               groupBoxes[i].height := 129;
               groupBoxes[i].caption := 'Start';
            end;
          2:
            begin
              groupBoxes[i].left := 296;
              groupBoxes[i].top := 192;
              groupBoxes[i].width := 273;
              groupBoxes[i].height := 305;
              groupBoxes[i].caption := 'Player'#39's Setup';
              groupBoxes[i].font.Color := clWhite;
              groupBoxes[i].font.Name := 'Myriad Web';
              groupBoxes[i].parentFont := False;
            end;
          3:
            begin
              groupBoxes[i].left := 592;
              groupBoxes[i].top := 192;
              groupBoxes[i].width := 177;
              groupBoxes[i].height := 185;
              groupBoxes[i].caption := 'Script Settings';
            end;
          4:
            begin
              groupBoxes[i].left := 592;
              groupBoxes[i].top := 392;
              groupBoxes[i].width := 177;
              groupBoxes[i].height := 105;
              groupBoxes[i].caption := 'Credits';
            end;
        end;
      end;
      for i := 0 to 1 do
      begin
        images[i] := tImage.create(frmDesign);
        images[i].parent := frmDesign;
        case(i)of
          0:
            begin
              images[i].width := 800;
              images[i].height := 545;
              b := loadBitmap(scriptPath+'background_g.bmp');
              getBitmapSize(b, w, h);
              copyCanvas(getBitmapCanvas(b), images[i].canvas, 0, 0, w, h, 0, 0, w, h);
            end;
          1:
            begin
              images[i].width := 630;
              images[i].height := 100;
              images[i].left := 88;
              images[i].top := 48;
              b := loadBitmap(scriptPath+'banner.bmp');
              getBitmapSize(b, w, h);
              copyCanvas(getBitmapCanvas(b), images[i].canvas, 0, 0, w, h, 0, 0, w, h);
            end;
        end;
      end;
      Captions := ['Players Username', 'Players Password', 'Players Nick', 'Players Pin',
      'Loads Until Switch?', 'Players Location', 'Player Active?', 'Highest Rock?',
      'Wield Pickaxe?', 'SRL ID', 'SRL Password', 'World', 'Members?',
      'Signed Client?', 'Script coded by In My Control', 'Thank you SRL Community'];
      for i := 0 to 15 do
      begin
        case(i)of
          0..8:
            begin
              labels[i] := tLabel.create(groupBoxes[2]);
              labels[i].parent := groupBoxes[2];
              labels[i].top := 24+30*i;
              labels[i].left := 20;
            end;
          9..13:
            begin
              labels[i] := tLabel.create(groupBoxes[3]);
              labels[i].parent := groupBoxes[3];
              labels[i].top := 24+30*(i-9);
              labels[i].left := 20;
            end;
          14, 15:
            begin
              labels[i] := tLabel.create(groupBoxes[4]);
              labels[i].parent := groupBoxes[4];
              labels[i].top := 24+30*(i-14);
              labels[i].left := 20;
            end;
        end;
        labels[i].font.name := 'Myriad Web';
        labels[i].font.color := clWhite;
        labels[i].caption := Captions[i];
      end;
      for i := 0 to 8 do
      begin
        case(i)of
          0..5:
            begin
              edits[i] := tEdit.create(groupBoxes[2]);
              edits[i].parent := groupBoxes[2];
              edits[i].width := 120;
              edits[i].height := 21;
              edits[i].left := 130;
              edits[i].top := 24+30*i;
            end;
          6..8:
            begin
              edits[i] := tEdit.create(groupBoxes[3]);
              edits[i].parent := groupBoxes[3];
              edits[i].width := 65;
              edits[i].height := 21;
              edits[i].left := 100;
              edits[i].top := 24+30*(i-6);
            end;
        end;
        edits[i].font.name := 'Myriad Web';
        edits[i].font.color := clBlack;
      end;
      edits[1].passwordChar := '*'; // See **
      edits[3].passwordChar := '*';
      edits[7].passwordChar := '*';
      edits[2].MaxLength := 4;
      edits[3].MaxLength := 4;
      edits[5].MaxLength := 4;
      edits[6].MaxLength := 4;
      for i := 0 to 4 Do
      begin
        case(i)of
          0..2:
            begin
              comboBoxes[i] := tComboBox.create(groupBoxes[2]);
              comboBoxes[i].parent := groupBoxes[2];
              comboBoxes[i].width := 120;
              comboBoxes[i].height := 21;
              comboBoxes[i].left := 130;
              comboBoxes[i].top := 204+30*i;
            end;
          3, 4:
            begin
              comboBoxes[i] := tComboBox.create(groupBoxes[3]);
              comboBoxes[i].parent := groupBoxes[3];
              comboBoxes[i].width := 65;
              comboBoxes[i].height := 21;
              comboBoxes[i].left := 100;
              comboBoxes[i].top := 114+30*(i-3);
            end;
        end;
        comboBoxes[i].font.color := clBlack;
        comboBoxes[i].font.name := 'Myriad Web';
      end;
      comboBoxes[0].items.add('True');
      comboBoxes[0].items.add('False');
      comboBoxes[1].items.add('Adamant');
      comboBoxes[1].items.add('Mithril');
      comboBoxes[1].items.add('Coal');
      comboBoxes[2].items.add('True');
      comboBoxes[2].items.add('False');
      comboBoxes[3].items.add('True');
      comboBoxes[3].items.add('False');
      comboBoxes[4].items.add('True');
      comboBoxes[4].items.add('False');
      playerList := tListBox.create(groupBoxes[0]);
      with playerList do
      begin
        parent := groupBoxes[0];
        left := 20;
        top := 24;
        width := 100;
        height := 120;
        font.Color := clBlack;
        font.Name := 'Myriad Web';
        playerList.onClick := @itemClicked;
      end;
      Captions := ['Load Player List', 'Save Player List', 'Add Player',
      'Delete Player', 'Start Script', 'Exit Without Saving', 'Save and Exit'];
      for i := 0 to 6 do
      begin
        buttons[i] := tButton.create(frmDesign);
        buttons[i].parent := FrmDesign;
        buttons[i].height := 20;
        buttons[i].onClick := @itemClicked;
        buttons[i].caption := Captions[i];
        case(i)of
          0..3:
            begin
              buttons[i].left := 160;
              buttons[i].top := 222+i*30;
              buttons[i].width := 100;
            end;
          4..6:
            begin
              buttons[i].left := 40;
              buttons[i].top := 400+(i-4)*30;
              buttons[i].width := 150;
            end;
        end;
      end;
    end;

    procedure safeInitForm;
    var
      v: tVariantArray;
    begin
      setArraylength(v, 0);
      threadSafeCall('initForm', v);
    end;

    procedure showFormModal;
    begin
      frmDesign.showModal;
    end;

    procedure safeShowFormModal;
    var
      v: tVariantArray;
    begin
      setArraylength(v, 0);
      threadSafeCall('showFormModal', v);
    end;

    Procedure showPlayerForm;
    begin
      safeInitForm;
      safeShowFormModal;
      if(not(startReady))then
        terminateScript;
    end;
    Just to show a bit of my script to show that reading it will be easier because i formated it just for you ^^

    I'll send you the nesseary files, a long my MSN so i can help aid you on what button corresponds, which box goes to the Player's values, etc...

    So whats the problem?
    I got the form down, i just don't know how to make a multiplayer form, and how to merge it with my script :/ So it would be great if you fill in the missing gaps. Will this be helpful for the future? Certainly. Because i'll learn multiplayer form and how to make/use it in my script, than now i wont spam for help on forms every time i got a new script xD

    If you say "oh just read scripts", trust me. I read Wizard Whackers Form.scar but it was no good, than i read VEM MK's form, i was close but i kept getting errors. so now, i tried Users but all i had to say was holy shit. So if for some odd reason my multiplayer form works, i can study through my OWN SCRIPT which will be WAY easier to study from and BAM! I learn. This how i usually learn scripting anyways ^^

    THANKS!

  2. #2
    Join Date
    May 2007
    Location
    Sydney, Australia (Faggot Region)
    Posts
    1,465
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Ask MasterKill or N1ke!


  3. #3
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    They're not on yet :/ but i will if i get the chance. I posted my work to MK to make him proud of what he taught me about forms ^^ but he hasnt taught me multiplayer so the only thing the script has is the forms and non-working buttons that just says "LOL SAVE BUTTOn"

  4. #4
    Join Date
    May 2007
    Location
    Sydney, Australia (Faggot Region)
    Posts
    1,465
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    There should be some Tutorials on forms


  5. #5
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Its not the forms that I'm concerend (i already finished the forms) its how i can make it multiplayer and make it work in my script :s

    ive checked the tutorials section for any multiplayer form, but all i got was MK which isnt complete yet and a few others. but they dont explain multiplayer etc...

  6. #6
    Join Date
    May 2007
    Location
    Sydney, Australia (Faggot Region)
    Posts
    1,465
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Look at SRL Player Form i think that has mutiplayer


  7. #7
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Deathscytex View Post
    They're not on yet :/ but i will if i get the chance. I posted my work to MK to make him proud of what he taught me about forms ^^ but he hasnt taught me multiplayer so the only thing the script has is the forms and non-working buttons that just says "LOL SAVE BUTTOn"
    Best luck of getting me online is adding my msn, N_1_c_e@hotmail.com
    Just make sure you tell me it's you, or I might not respond

    However,

    MultiPlayer forms are basicly a array of strings that you save/change around..
    A bit hard to explain here, as it would meaning writing a tutorial, which I'm in no mood for, in other words.. Add my msn.

  8. #8
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    <3 yay! i will, thanks.

  9. #9
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  10. #10
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    too bad MK didnt finish it >> QQ

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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