Results 1 to 6 of 6

Thread: Line 220: [Error] (16088:10): Unknown identifier 'GetXp' in script ----------- HELP!!

  1. #1
    Join Date
    Mar 2007
    Posts
    732
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Line 220: [Error] (16088:10): Unknown identifier 'GetXp' in script ----------- HELP!!

    i have a cursing script:
    {---------------------------------------------------------}
    { ________ }
    { ____ ____ / _____/ }
    { / \ / __ \/ \ ___ }
    { | | \| ___/\ \_\ \ }
    { |___| / \___ >\______ / _ }
    { \/ \/ \/ |_| }
    {---------------------------------------------------------}
    {---------------------------------------------------------}
    { DUMMY CURSER + UNDEAD CRUMBLER }
    {---------------------------------------------------------}
    program SpellDummy;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\magic.scar}
    var
    NumOfCurses:Integer;
    AntiBann:Integer;
    AB:Integer;
    StartXP,EndXP,TotalXP:Integer;
    zx,zy:Integer;
    CurBMP,CruBMP:Integer;

    {---------------------------------------------------------}
    { SETUP }
    {---------------------------------------------------------}

    const
    RunAwayDir = 'S'; // Direction to run away. N,S,E or W (Choose Well)
    CursesToDo = 449; // Set this properly,

    DummyColor = 4147116; // Colour of your dummy
    DummyName = 'Monk of Zamorak'; // Dummys name eg. 'Chicken'

    CrumbleUndead = False; // Use Crumble Undead?

    MouseSpeeed = 3; // Lower is Faster, (idea from fours)

    {---------------------------------------------------------}
    { Declare Players }
    {---------------------------------------------------------}
    Procedure DeclarePlayers;
    begin
    Status('Loading Players')

    HowManyPlayers := 1;
    NumberOfPlayers( HowManyPlayers );
    CurrentPlayer := 0;

    Players[0].Name := '-----';
    Players[0].Pass := '-----';
    Players[0].Nick := '----'; // 3-4 letters of username
    Players[0].Active := True;
    end;

    {---------------------------------------------------------}
    { Find Talk + Fights }
    {---------------------------------------------------------}
    procedure TalkingRandoms;
    begin
    FindTalk;
    wait(10);
    if (FindFight = true) then
    begin
    RunAwayDirection('N');
    Wait(10000 + random(2000));
    RunBack;
    end;
    FindTalk;
    end;
    {---------------------------------------------------------}
    { Load BMPS }
    {---------------------------------------------------------}
    procedure LoadDTM;
    begin
    CurBMP := BitmapFromString(8, 8, 'z78DA3330000243537' +
    '3537347375CA401580D26895FA5A3A58199AB0B84C46502A6 CAC1' +
    '4312EF36FC7EC1197A26268EC64E00195D5483');

    CruBMP := BitmapFromString(6, 6, 'z78DA7335733577337' +
    '3C5200D40C0104242440C4D0DCD0D2C2124A64A4C35C82A49 5583' +
    'DF3D105D4ECECE46CE0698B2A666262E26460024D32EFF');
    end;

    {---------------------------------------------------------}
    { Antiban Case }
    {---------------------------------------------------------}
    Procedure AntiBannage; //Got examples from Chamrz
    begin
    AB:= Random(8)+1;
    FindTalk;
    Case AB of
    1 : SleepAndMoveMouse(750+Random(2000));
    2 : SendArrowSilentWait(((Random(2)*2)), 1000+Random(200));
    3 : SendArrowSilentWait(((Random(2)*2) + 1), 200+Random(200));
    4 : SendArrowSilentWait(((Random(2)*2)), 200+Random(200));
    5 : SendArrowSilentWait(((Random(2)*2) + 1), 20+Random(20));
    6 : begin GameTab(1+Random(7)) Wait(Random(300)) GameTab(4) end;
    7 : IdleTime(500, 500, 1.0);
    8 : begin GameTab(1+Random(7)) Wait(Random(300)) GameTab(4) end;
    9 : IdleTime(300, 200, 2.0);
    end;
    FindTalk;
    end;

    {---------------------------------------------------------}
    { Random Case Randoms }
    {---------------------------------------------------------}
    Procedure NormalRandoms;
    begin
    if(not(LoggedIn))then Exit;
    AntiBann:= 1 + Random(4)
    case AntiBann of
    1: FindNormalRandoms;
    2: AntiBannage;
    3: AntiBannage;
    4: AntiBannage;
    5: AntiBannage;
    end;
    end;

    {---------------------------------------------------------}
    { PROGRESS REPORT }
    {---------------------------------------------------------}
    procedure Report;
    begin
    ClearDebug;
    SRLRandomsReport;
    WriteLn('>--------------------<>--------------------<')
    WriteLn('> neGs Dummy Curser - Progress Report ')
    WriteLn('> ')
    WriteLn('> Running Time: ' + (TimeRunning) +'')
    WriteLn('> Curses Cast: ' + IntToStr (NumOfCurses) +'')
    WriteLn('> XP Gained: ' + IntToStr (TotalXP) +'')
    WriteLn('>--------------------<>--------------------<')
    end;

    {---------------------------------------------------------}
    { CURSING PROCEDURE }
    {---------------------------------------------------------}
    var i,tries:integer;
    procedure CurseDummy;
    begin
    GameTab(7);
    if(not(LoggedIn))then Exit;
    if(CrumbleUndead)then
    begin
    GameTab(7);
    wait(300)
    if (GetColor(599,307)=15533737)then
    begin
    Cast('Crumble Undead');
    TalkingRandoms;
    FindObj(zx,zy,DummyName,DummyColor,10);
    MMouse(zx,zy,0,0)
    if (IsUpText(DummyName))then
    begin
    Mouse(zx,zy,0,0,true)
    end else
    begin
    tries:=tries+1
    if (tries>30) then
    begin
    WriteLn('Couldnt Find Dummy')
    WriteLn('Logging Out..')
    Logout;
    Exit;
    end;
    CurseDummy;
    end;
    TalkingRandoms;
    NumOfCurses:=NumOfCurses+1
    i:=i+1
    end else
    begin
    WriteLn('Not enough runes for cast.'); Wait(500);
    WriteLn('Logging out.');
    Logout;
    Exit;
    end;
    end else

    begin
    GameTab(7);
    wait(300)
    if (GetColor(669,265)=15533737)then
    begin
    Cast('Curse');
    TalkingRandoms;
    FindObj(zx,zy,DummyName,DummyColor,10);
    MMouse(zx,zy,0,0)
    if (IsUpText(DummyName))then
    begin
    Mouse(zx,zy,0,0,true)
    end else
    begin
    tries:=tries+1
    if (tries>30) then
    begin
    WriteLn('Couldnt Find Dummy')
    WriteLn('Logging Out..')
    Logout;
    Exit;
    end;
    CurseDummy;
    end;
    TalkingRandoms;
    NumOfCurses:=NumOfCurses+1
    i:=i+1
    end else
    begin
    WriteLn('Not enough runes for cast.'); Wait(500);
    WriteLn('Logging out.');
    Logout;
    Exit;
    end;
    end;

    if (i>13+random(4)) then
    begin
    EndXP := GetXp('Magic')
    wait(10);
    TotalXP := (EndXP - StartXP) + (TotalXP)
    wait(10)
    Report;
    i:=0
    end;

    end;

    {---------------------------------------------------------}
    { MAIN LOOP }
    {---------------------------------------------------------}
    begin
    SetupSRL;
    ActivateClient;
    DeclarePlayers;
    Newline := Newline;
    MouseSpeed:=MouseSpeeed+random(2);
    begin
    if(not(LoggedIn))then
    begin
    Status('Logging In')
    Loginplayer;
    HighestAngle;
    MouseSpeed:=MouseSpeeed+random(2);
    end;
    end;
    repeat
    StartXP := GetXp('Magic')
    repeat
    MouseSpeed:=MouseSpeeed+random(2);
    CurseDummy;
    NormalRandoms;
    if(not(LoggedIn))then NextPlayer(False)
    until(NumOfCurses=CursesToDo);
    LogOut;
    NextPlayer(True);
    NumOfCurses := 0;
    HighestAngle;
    StartXP := GetXp('Magic')
    If(Not(LoggedIn))Then NextPlayer(False)
    until(false);
    end.

    and im realy anoyed cuz it wont work! these are my results:

    Failed when compiling
    Line 220: [Error] (16088:10): Unknown identifier 'GetXp' in script C:\Documents and Settings\Lance\Desktop\Auto's\seans scripts\DummyCurser neG v1.2.scar

    can somone plz help me? Oh, and i already downloaded SRL and installed it correctly. So that cant be the problem =/

  2. #2
    ronny.m.p Guest

    Default

    Try to run this script:

    begin
    SetupSrl;
    MMouse(1,1,0,0);
    end.
    If it runs correctly then it isnt a problem with SRL.

  3. #3
    Join Date
    Mar 2007
    Posts
    732
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Failed when compiling
    Line 2: [Error] (2:1): Unknown identifier 'SetupSrl' in script

  4. #4
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    What scar do you have? and have you installed SRL?

    SCAR Code:
    Successfully compiled
    SRL Compiled in 203msec.
    Successfully executed

  5. #5
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its a problem scripts have when you use the new version of scar (Scar Divi).

    Try to use Scar 2.03 untill most of the scripts are modified
    Srl simply rocks.

  6. #6
    Join Date
    Mar 2006
    Location
    USA
    Posts
    948
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I would help but...
    You will get more help when you put your script in tags, and by implementing proper standards: http://wiki.srl-forums.com/index.php...ting_Standards

    Bam Bam

    Edit:

    Successfully compiled
    SRL Compiled in 31msec.
    Successfully executed


    SCAR Code:
    begin
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      Newline := Newline;
      MouseSpeed:=MouseSpeeed+random(2);
      if(not(LoggedIn))then
      begin
        Status('Logging In') //Try to remember to use ';' in the proper places
        Loginplayer;
        HighestAngle;
        MouseSpeed:=MouseSpeeed+random(2);
      end;
      repeat
        StartXP := GetXp('Magic');
        repeat
          MouseSpeed:=MouseSpeeed+random(2);
          CurseDummy;
          NormalRandoms;
          if(not(LoggedIn))then
            NextPlayer(false); //You should use break; here instead of instructing a new player to login inside this loop
        until(NumOfCurses=CursesToDo); //In order to have a failsafe you could use >= so that it can't miss the logout point
        LogOut;          
        NextPlayer(True); //I would move this
        NumOfCurses := 0; //To the beginning of this loop
        HighestAngle;     //So your loop is in logical order: Login - Logout
        StartXP := GetXp('Magic');// You dont need StartXP here, you set it in the next logical line
        If(Not(LoggedIn))then
          NextPlayer(False)
      until(false);
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 01-19-2008, 09:16 AM
  2. Replies: 7
    Last Post: 10-07-2007, 10:41 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
  •