Results 1 to 10 of 10

Thread: Bug with Cast

  1. #1
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default Bug with Cast

    Date: 4/24/09

    Public/Development: Public
    Revision #: 32

    File Involved (if known): Magic.scar


    The Cast function doesn't currently click. Taking a peak inside the code, I found out why:
    SCAR Code:
    if (Result) then
      begin
        MouseBox(B.X1, B.Y1, B.X2, B.Y2, 3);
        Wait(500 + Random(500));
      end;

    For some reason, it's using the movement only version of MouseBox when it finds the spell to cast.

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Ah that would have been from when I was making/testing the function. Thanks for picking that up.

  3. #3
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I thought I was the only one having that problem.

  4. #4
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Dark Arcana View Post
    I thought I was the only one having that problem.
    Why didn't you post about it then?

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Closed, Fix added to list.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Ah that would have been from when I was making/testing the function. Thanks for picking that up.
    We need constants for Mousebox.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    We need constants for Mousebox.
    Agreed.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #8
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    We need constants for Mousebox.
    Feel Free to add them then. But I still think we should make some universal constants for LeftClick, RightClick, Move and Nothing which could be used in FindTextTPA and other similar functions too.

    EDIT: Reopened, people might like to discuss this.

  9. #9
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Feel Free to add them then. But I still think we should make some universal constants for LeftClick, RightClick, Move and Nothing which could be used in FindTextTPA and other similar functions too.

    EDIT: Reopened, people might like to discuss this.
    Types should always be started with a t. And, Type wat = (a, b, c) is just an enum.
    There is no big difference between the two, except for the calc one can perform more calculations with constants. (One can only perform a == with an enum. That generally only fits for a case)
    Constants can also be used for bitwise operations, thus allowing much more flexibility. (This might not be extremely useful in the case of clicks, but it is still nice and good practice to do so. It also allows some nice bitwise coding.)

    Like this:

    pascal Code:
    const
        srl_MoveOnly   = 0;
        srl_LeftClick     = 1;
        srl_RightClick   = 2;
        srl_MiddleClick = 4;

    type
        SRLClickType = Integer;

    var
       myClick: SRLClickType;

    begin
        myClick := srl_MoveOnly or srl_MiddleClick;
    end.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  10. #10
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Isn't there already a type in SRL for clicking?

    SCAR Code:
    { type fnct_ActionOptions;
      Description: Action options. }

    type
      fnct_ActionOptions = (ClickLeft, ClickRight, Move, Nothing);

    That...
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

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
  •