Results 1 to 7 of 7

Thread: Need help with my FightMonseter procedure :S

  1. #1
    Join Date
    Oct 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Need help with my FightMonseter procedure :S

    i keep getting the "Failed when compiling
    Line 75: [Error] (14928:1): Identifier expected in script C:\entertainment\Jess's pics\jesse's vids\Scar 3.10\SCAR 3.10\Scripts\MyScripts\my first script, nibblits autofighter.scar" error and i am having trouble fixing it. I have attached my script to this post, if someone could help me. BTW: i have already ended all the begins, i think unless i have missed one but can you please just go over my script in general and tell me if im going ok, lol its my first script
    Another post by your freindly scar-scripter wannabe nibblit :P

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

    Default

    You don't need to put begin FightMonster. Just put begin. And NO semi colon after begin. You've also missed out on several semi colons in the same procedure... semi colon at the end of every line except after begin, if then, while do, repeat, and before else. In that same procedure, you've put this:
    SCAR Code:
    procedure FightMonster;

      begin

          (FindColor (x,y,MonsterColor1,0,0,600,600))
          (FindColor (x,y,MonsterColor2,0,0,600,600))
          (FindColor (x,y,MonsterColor3,0,0,600,600))
          (IsUpText('Attack'))
          Mouse(x,y,1,1,true)



     end;
    I think you want this:

    SCAR Code:
    procedure FightMonster;

      begin

          if (FindColor (x,y,MonsterColor1,0,0,600,600)) or
          (FindColor (x,y,MonsterColor2,0,0,600,600)) or
          (FindColor (x,y,MonsterColor3,0,0,600,600)) then
            MMouse(x, y, 1, 1);
            Wait(50);
          if (IsUpText('Attack')) then
            Mouse(x,y,1,1,true)



     end;

  3. #3
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    procedure FightMonster;

      begin FightMonster;

          (FindColor (x,y,MonsterColor1,0,0,600,600))
          (FindColor (x,y,MonsterColor2,0,0,600,600))
          (FindColor (x,y,MonsterColor3,0,0,600,600))
          (IsUpText('Attack'))
          Mouse(x,y,1,1,true)



     end;

    That wont work at all.

    1.you need If before FindColor and FindColor doesnt add tolerance and rs changes colors every once in a while.
    2. 0,0,600,600. Those are the coords your looking for that color for. I dont believe those fit the rs screen.
    3. Its pretty much kinda wat Zeph said but this is the best way.

    SCAR Code:
    Program FindMonster;
    If(FindColorSpiralTolerance(x,y,MonsterColor1,msx1,msy1,msx2,msy2,10))Then
     Mmouse(x,y,2,2,);
     If(IsUpText('ttack'))Then
     Mouse(x,y,0,0,True);
    End;

  4. #4
    Join Date
    Oct 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    pk thnanx heaps for the help ;~), ill try it again now and see if it works :P
    Another post by your freindly scar-scripter wannabe nibblit :P

  5. #5
    Join Date
    Oct 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, umm i tried your procedure Drunkenoldma but i keep getting this error, any ideas??:

    Line 78: [Error] (14931:13): Invalid number of parameters in script C:\entertainment\Jess's pics\jesse's vids\Scar 3.10\SCAR 3.10\Scripts\MyScripts\my first script, nibblits autofighter.scar
    Another post by your freindly scar-scripter wannabe nibblit :P

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

    Default

    Lol drunkenoldma didn't do any of these. Which one were you talking about? If its my one then copy it again cos I missed out some bits because it was 1 am when I wrote it.

  7. #7
    Join Date
    Oct 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, no this is my first script, and i needed help with writing my fighting procedure, but its fixed now
    Another post by your freindly scar-scripter wannabe nibblit :P

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  2. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  3. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 PM

Posting Permissions

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