Results 1 to 5 of 5

Thread: HELPP DTMs!!

  1. #1
    Join Date
    Jan 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    HELPP DTMs!!

    program New;
    {.include SRL/SRL.scar}

    Var
    x, y, Runes : Integer;


    Procedure DeclarePlayers;

    begin
    NumberOfPlayers(2);
    CurrentPlayer := 0;
    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active :=True;

    Players[1].Name :='';
    Players[1].Pass :='';
    Players[1].Nick :='';
    Players[1].Active :=True;

    end;

    Procedure LoadDTM;
    Begin
    Runes := DTMFromString('78DA6314666060106140015D8D0D0CFF813 42' +
    '310FF07024619208383010D302291409A0B48701250C30624 2409' +
    'A85120420DC8CD8AF8D5000031EC0782');
    End;

    Procedure DTMFind;
    Begin
    If FindDTM(Runes,x, y, MIX1, MIY1, MIX2, MIY2) then
    Mmouse (x, y, 0, 0)
    writeln('Congratz! You have just found your first DTM!')
    End;

    Begin
    SetupSRL;
    DeclarePlayers;
    if LoggedIn then Logout;
    LoginPlayer;
    DTMFind;
    End.


    Successfully compiled
    SRL Compiled in 16 msec
    Name
    [Runtime Error] : Exception: Access violation at address 0072408B in module 'scar.exe'. Read of address 00000000 in line 34 in script

  2. #2
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Please post your script in Scar tags, you do it like this:

    SCAR Code:
    Writeln('I put scar tags');
    Writeln('They go like [scar(capitalized] code [/scar(capitalized]');

    I don't know the answer but I think it's easier to read when in the tag form.
    Formerly known as Cut em2 it

  3. #3
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ehh... noobs these days...
    lol Jk here...

    Drag crosshair onto client and have your main loop as this..
    the problem was, well, your forgot to declare your DTM...
    lol and i standered it 4 ya =]

    SCAR Code:
    Begin
      SetupSRL;
      DeclarePlayers;
      LoadDTM;
      ActivateClient;
      Wait(2000+random(100));
      if LoggedIn then
        Logout;
      LoginPlayer;
      DTMFind;
    End.

  4. #4
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    make sure you FreeDTM(DTM: Integer); so it would be FreeDTM(Runes);

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  5. #5
    Join Date
    Nov 2007
    Location
    USA, Michigan
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default



    FIRST...give credit when credit is due..

    And this concludes Yohojo's DTM Tutorial

    program New;
    var Logs,x,y:integer;
    begin
    Logs := DTMFromString('78DA63AC666460286740017509960CFF813 45' + '086 E13F1030B663AA81C8C248205D0B64D51050934F849A2A202B ' + '8B809 A26202B13BF1A0034E80BCD');
    if FindDTM(Logs,x, y,1, 1, 200, 200) then
    writeln('Congratz! You have just found your first DTM!')
    end.

    ...look familiar?

    Here's yours complete with the above help, and thank you added...it compiles.

    program New;
    {.include SRL/SRL.scar}
    //Thanks to Yohojo's DTM Tutorial
    Var
    x, y, Runes : Integer;

    Procedure DeclarePlayers;

    begin
    NumberOfPlayers(2);
    CurrentPlayer := 0;
    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active :=True;

    Players[1].Name :='';
    Players[1].Pass :='';
    Players[1].Nick :='';
    Players[1].Active :=True;

    end;

    Procedure LoadDTM;
    Begin
    Runes := DTMFromString('78DA6314666060106140015D8D0D0CFF813 42' +
    '310FF07024619208383010D302291409A0B48701250C30624 2409' +
    'A85120420DC8CD8AF8D5000031EC0782');
    End;

    Procedure DTMFind;
    Begin
    If FindDTM(Runes,x, y, MIX1, MIY1, MIX2, MIY2) then
    Mmouse (x, y, 0, 0);
    writeln('Congratz! You have just found your first DTM!');
    FreeDTM(Runes);
    End;


    Begin
    SetupSRL;
    DeclarePlayers;
    LoadDTM;
    ActivateClient;
    Wait(2000+random(100));
    if LoggedIn then
    Logout;
    LoginPlayer;
    DTMFind;
    End.

    ALWAYS, always give credit where credit is due... it only costs a couple of
    // lines in a script.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. helpp?
    By joshdabest01 in forum OSR Help
    Replies: 1
    Last Post: 10-31-2008, 03:47 PM
  2. Help with DTMs
    By Richard in forum OSR Help
    Replies: 2
    Last Post: 01-27-2008, 02:46 PM
  3. Help with DTMs...
    By Runescapian321 in forum OSR Help
    Replies: 6
    Last Post: 12-30-2007, 02:28 AM
  4. DTMs
    By Jackrawl in forum OSR Help
    Replies: 6
    Last Post: 11-25-2007, 09:00 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
  •