Results 1 to 12 of 12

Thread: Merchanting Script Help

  1. #1
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default Merchanting Script Help

    ok so now i think i have a pretty good hold on scripting i want to try to make a slightly more difficult script. My goal is to make a merchanter script that will BUY/SELL items for you flawlessly so you can auto merchant =p

    ive begun this script already and i am about 170 lines in and i realized i have no idea on how to make a procedure to check the second trade screen to prevent a scam... =(

    i would like for an expirenced scripter to help me in this area or for people to show me some procedures used to check for numbers on the screen or something. Ive looked through SRL amount, trade, and text and cant seem to find anything for the second trade screen...so any help would be appreciated

    thanks
    METAL HEAD FOR LIFE!!!

  2. #2
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Look man, I don't really have any experience at all with using the trade screens. You could possibly go to:
    http://www.villavu.com/forum/showthr...?t=5906?t=6804
    You might find a tutorial there that will help you? Have you tried Searching?
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  3. #3
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im the resident merchant dev

    i never really bothered to write a tutorial or anything for my work though..

    sorry, the documentation is not much better

    anyway, this wiki page kind of explains how you find the number of an item in your inventory or trade screens: http://wiki.srl-forums.com/index.php/Amount.scar

    what it sounds like you are interested in is this, in trade.scar:
    {************************************************* ******************************
    function CheckItem(them: Boolean; name: string): Integer;
    By: masquerader modified by Pyro and Cheesehunk
    Description: returns number item at second screen
    the first letter of the item's name must be capitalized, and the rest are lowercase

  4. #4
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    ooooooooooooo thanks for your help!! =)

    totally overlooked CheckItem because i didnt see that it was for tradescreen2 lol

    a quick couple questions about it though before i start using it...

    if i want it to check for money do i just put like "gold" or "gp" in the name part?
    and also
    is for them "true" and for you "false?


    thanks sooo much really helped alot =p
    METAL HEAD FOR LIFE!!!

  5. #5
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    to find the amount of coins the other player has on their second trade screen, use

    gp:=CheckItem(True,'Coins');

  6. #6
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The problem I run into with an auto merchanter is that when I used to merchant abyssal whips the prices would constantly change so I would constantly change how much to sell/buy for...

    I wish you luck in finding a way for a script to think so humanly so it can make the correct decisions when merchanting. Merchanting, if I remember correctly, was the best way to make money and a challenge to the brain which is why from time to time I'll play around with my gold I get from autoing. If I come up with any ideas on how go about on doing that I'll be sure to post them here.

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

    Default

    What if, for every item it sells, the script raises the price a little, then, when it doesn't sell any for x (IE: if(timefrommark(itemsaletime[currentitem - 2])) > CurrentNoSaleTime) time, it lowers the price a little, until people start buying again.

    Also, you'd have to make it check that there's people around you, either with getchatmessage (count how often people talk and estimate amount of people) or the white player dots (count how many are on visible in the mm)

    If you do this, don't forget to set some limits as to how low it can go...you might wake up one morning to find that your script nearly gave away all your goods
    Interested in C# and Electrical Engineering? This might interest you.

  8. #8
    Join Date
    May 2007
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, wut smaertz said. but meby if you could create a checkitemprice procedure, and it would check the chat box for various forms of (buying aby whip *money here*) it would then check how much your selling the aby whip for. if its lower then the one whos buying, it then ads 1 count. after it has 3-5 counts, it lowers the price 50-100k or so.
    Originally Posted by YoHoJo
    I like hentai.

  9. #9
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    man you guys have some really sweet ideas! Im just gonna make it basic at first so i can kink out any trading problems and then i will attempt to add in those ideas because they sound pretty damn solid =p

    thanks for all your help guys and i am open to any and all suggestions!!!
    METAL HEAD FOR LIFE!!!

  10. #10
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If for some reason, you ever build a chat finder that doesn't search the chat box, you would need to remember to turn of chat special affects.

  11. #11
    Join Date
    May 2007
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nvr sed it wud need to be fer ms, in fact, chatbox wud cover a larger area... is my idfea ne good though?
    Originally Posted by YoHoJo
    I like hentai.

  12. #12
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    yea thats true chat effects would f it up...

    and yes i do like your idea but if you are merchanting usually you turn chat to hide in order to detect the trade more efficiantly (mostly for W1 and crouded worlds) so i would have to search the ms to use your idea. Once i get my basic version im going to post it to see wat u guys think
    METAL HEAD FOR LIFE!!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. OMG Yet another way to do merchanting!!!
    By palmpilot71 in forum Cash Guides
    Replies: 36
    Last Post: 12-21-2008, 12:44 AM
  2. Merchanting tip
    By chris2k8 in forum NOTA
    Replies: 13
    Last Post: 12-20-2008, 07:37 PM
  3. New merchanting-how to do it
    By bupdaddy in forum Cash Guides
    Replies: 22
    Last Post: 06-04-2008, 03:35 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
  •