Results 1 to 11 of 11

Thread: checking if char is in a trade.

  1. #1
    Join Date
    Jun 2006
    Location
    N Wales
    Posts
    558
    Mentioned
    2 Post(s)
    Quoted
    56 Post(s)

    Default checking if char is in a trade.

    im making a script and i need it to trade with other players.

    what i need to do is to make it check if it is in a trade to see if the trade has begun.

    i need to know a code for this.

    at the moment the only thing i know of is to make it look for a colour in a certain place because i know that colour will be there. this is the code i have so far.

    SCAR Code:
    if (FindColor(x,y,color,1,1,200,200))then
      begin
        writeln 'in trade now';
      end;

    is there a better way of checking if its in a trade though because i know that the rs colors change slightly and i dont know how to make a script auto color

    Thanx to every one that helps.

  2. #2
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    theres an include misc trade but i dunno how to use it

  3. #3
    Join Date
    Jun 2006
    Location
    N Wales
    Posts
    558
    Mentioned
    2 Post(s)
    Quoted
    56 Post(s)

    Default

    oo thanx ill look at it now!

    can any one save me a bit of time and help me out on learning how to use it?

  4. #4
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ill try n find a tut for u

  5. #5
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    if(someonetrades)then


    {.include SRL/SRL/misc/Trade.scar}
    Interested in C# and Electrical Engineering? This might interest you.

  6. #6
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    simple lol

  7. #7
    Join Date
    Jun 2006
    Location
    N Wales
    Posts
    558
    Mentioned
    2 Post(s)
    Quoted
    56 Post(s)

    Default

    sorry im such a noob at this. in the file trade.scar there are lots of procedures and functions.

    whats the difference between a procedure and a function and do i call on a function the same as i do a procedure?

  8. #8
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    With both a procedure and a function, you can do this:
    Hello; (procedure)
    Hello; (function)

    but, you can only do this with a function:

    if(Hello=true)then...

    if(Goodbye=5)then...
    Interested in C# and Electrical Engineering? This might interest you.

  9. #9
    Join Date
    Jun 2006
    Location
    N Wales
    Posts
    558
    Mentioned
    2 Post(s)
    Quoted
    56 Post(s)

    Default

    ah thanx a lot smartz.

    to save me making another thread and cloging up the forums im just going to ask this question here.

    once im in the trade is there a file in the srl library that will offer a certain amount of coins. then check what the other player is offering. if the thing the player is offering is what i want it to be eg a rune scimi. it accepts the trade if not it declines the trade.

    and if there is how do i use it? lol.

  10. #10
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You could search the inventory for the coin color, right click the found color, choose 'offer x', type in what amount to pay, then search the trade window for a rune scimmy dtm....
    Interested in C# and Electrical Engineering? This might interest you.

  11. #11
    Join Date
    Jun 2006
    Location
    N Wales
    Posts
    558
    Mentioned
    2 Post(s)
    Quoted
    56 Post(s)

    Default

    oh yea ok i never thought of using dtms well thanx for all your help! i wont use this thread again so no need to post on here any one else.

    oh and +rep for you smartz

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. gametab checking
    By stanky in forum OSR Help
    Replies: 4
    Last Post: 05-24-2008, 12:10 PM
  2. Char*, Char *, Char *var, Char var[] ... Me is confused...
    By Jason2gs in forum C/C++ Help and Tutorials
    Replies: 11
    Last Post: 04-17-2008, 02:56 PM
  3. Replies: 4
    Last Post: 05-15-2007, 01:42 AM

Posting Permissions

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