Results 1 to 7 of 7

Thread: DoEmote

  1. #1
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default DoEmote

    Finally, again I hope it will be added. Its very outdated 9 new emotes had been added and the co-ords were off along with the colors.

    SCAR Code:
    {*******************************************************************************
    procedure DoEmote(EmoteNumber:ShortInt);
    By: NaumanAkhlaQ and Sumilion
    Description: Clicks on an emote specified by EmoteNumber (1 to 46)
    *******************************************************************************}


    Procedure DoEmote(EmoteNumber : ShortInt);
    Var I, X, Y, Row, Col : Integer;
    Begin
      If Not InRange(EmoteNumber, 1, 47) Then
      Begin
        srl_Warn('DoEmote', 'Invalid EmoteNumber: ' + IntToStr(EmoteNumber) + ', Valid Emotes: 1..46', warn_AllVersions);
        Exit;
      End;
      Case EmoteNumber Of
        01..20 : If (GetColor(723, 226) = 2106924) Then
                   Mouse(723, 226, 8, 4, True);
        21..40 : If (GetColor(727, 364) = 1975337) Then
                   Mouse(727, 364, 4, 1, True);
        41..46 : If GetColor(725, 438) = 1975337 Then
                   Mouse(725, 438, 5, 5, True);
      End;
      Wait(300 + Random(200));
      If InRange(EmoteNumber, 21, 40) Then I := 20;
      If InRange(EmoteNumber, 41, 46) Then I := 28;
        DecEx(EmoteNumber, I);

      Row := Trunc(EmoteNumber / 4) + 1;
      If ((EmoteNumber Mod 4) = 0) Then Dec(Row);
      Col := (EmoteNumber Mod 4);
      If (Col = 0) Then Col := 4;

      X := 550 + (44 * (Col-1));
      Y := 219 + (49 * (Row-1));
      Mouse(X, Y, 26, 39, True);
    End;
    Last edited by Naum; 07-23-2009 at 01:20 AM.

  2. #2
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    Procedure DoEmote(EmoteNumber : ShortInt);

    If you wanna be that 1337, byte is enough
    Nice that someone updates these not-so-necessary functions too!

    edit: is byte actually even smaller than shortint? range is the same but shortint goes below 0?

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    SCAR Code:
    Procedure DoEmote(EmoteNumber : ShortInt);

    If you wanna be that 1337, byte is enough
    Nice that someone updates these not-so-necessary functions too!

    edit: is byte actually even smaller than shortint? range is the same but shortint goes below 0?
    type ShortInt = -128..127;
    type Byte = 0..255;

    They both amount to the same .
    But thanks for commenting

    EDIT:
    Updated first post!

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great..should be added.

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

    Default

    lol, nice. to think i was gonna use it in my script.

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Thanks all, Fixed a massive bug, there should have been 1 more increment on the cases, also I added a wait after the case statement.

    Thanks to who ever added it
    Last edited by Naum; 07-23-2009 at 06:57 PM.

  7. #7
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Thanks all, Fixed a massive bug, there should have been 1 more increment on the cases, also I added a wait after the case statement.

    Thanks to who ever added it

    Could you please comment your code as i have not idea what all the hard coded values are?

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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
  •