Results 1 to 4 of 4

Thread: Logging and Timing

  1. #1
    Join Date
    Dec 2006
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Logging and Timing

    How do I make my script log things and get current time, I want my log to look somethin like this

    3:45:12 - Bought Item
    3:53:23 - Missed Item
    3:53:45 - Bought Item

    I want this to be a seperate dubug box than the big one that logs 'succesfully compiled'

    Also I want to add something where the user can select how long to run the script before terminating the script or let them select how long to run the script before the script sleeps for like 15 minutes, then starts again

    thanks
    Download Looney/GoFez0r's Merchanter v.1.1
    http://www.fenjer.com/adnan/SRLStats/57.png
    http://www.fenjer.com/adnan/SRL/8/2/...nt%20Alpha.png
    MSN:ghettogeec@hotmail.com
    Procedure CreateCommonItemMerchant;
    if CommonItemMerchant=Working then
    CreateFullMerchant;

    Scar= Me=

  2. #2
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    For the first question ,you could use something like this:

    SCAR Code:
    Procedure GoingOn(What:string);
    begin
    Writeln(What+' ('+TheTime+')')
    status(What+' ('+TheTime+')')
    end;

    REMEMBER THAT THIS IS STRAIGHT OUT OF PENTTI'S MULTI CITY MINER AND I DON'T KNOW IF YOU MAY USE THIS!!!!

    For the debug thing: I really don't know
    For the timing use something like this:

    SCAR Code:
    begin
      repeat
       Login;
       MarkTime(LoginTime)
       repeat
        //MainLoop here
       until ((not(LoggedIn) or (TimeFromMark(LoginTime) > YOURTIMEHERE))
       MarkTime(StayLoggedOut);
       repeat
        wait(5000)
       until (TimeFromMark(StayLoggedOut) > YOURTIMEHERE)
       NextPlayer(True);
      until(false);
    end.
    Hup Holland Hup!

  3. #3
    Join Date
    Dec 2006
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks alot ill try this out when I get home

    edit: do i need to use an include or somethin?
    Download Looney/GoFez0r's Merchanter v.1.1
    http://www.fenjer.com/adnan/SRLStats/57.png
    http://www.fenjer.com/adnan/SRL/8/2/...nt%20Alpha.png
    MSN:ghettogeec@hotmail.com
    Procedure CreateCommonItemMerchant;
    if CommonItemMerchant=Working then
    CreateFullMerchant;

    Scar= Me=

  4. #4
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    285
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes (SRL of course ), you also need to define your players user/pass if you're going to use
    SCAR Code:
    NextPlayer(True);
    To add text to the Report box, use the procedure
    SCAR Code:
    AddToReport('Text here');
    You can find a list of pre-made procedures by hitting F1 in SCAR, it includes this and many other useful ones.
    Huehuehuehuehue

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Timing?
    By marpis in forum OSR Help
    Replies: 7
    Last Post: 11-06-2008, 05:56 PM
  2. Drop timing ?????????
    By havoc928 in forum OSR Help
    Replies: 22
    Last Post: 08-22-2007, 07:06 PM
  3. timing
    By omgh4x0rz in forum OSR Help
    Replies: 4
    Last Post: 02-14-2007, 02:42 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
  •