Jump to content
McKay Development

mar71n

Member
  • Posts

    20
  • Joined

  • Last visited

Reputation Activity

  1. Like
    mar71n got a reaction from PonyExpress in Using editProfile-Function kicks out other settings of my profile   
    Whenever I use this function, I do lose my profiles background and also a custom textbox that i have setup manually. Do i need to hardcode those or is there a way of ignoring them?
  2. Like
    mar71n got a reaction from seang in Auto Accept script doesn't accept sometimes   
    To make interactions with bots and alts easier, I wanted to get an autoaccept-script going, that simply accepts everything where the itemstogive.length ==0.
     
    This is my code:
     
    manager.on('newOffer', function (offer) {
        accept(offer);

    });
    function accept(offer) {    if (offer.itemsToGive.length == 0) {        offer.accept(true, function (err) {            console.log("offer.State: " + offer.state);            if (err) {                console.log("error: " + err);                console.log("offer.State: " + offer.state);
                    if (!(offer.state == 3 || offer.state == 6 || offer.state == 8)) {                    setTimeout(accept(offer), 3000);                    return;                }            }           }); 
     
    Sometimes just nothing happens, and the offer gets ignored completely. My guess is, that the trade-offer is buggy at the beginning (no items show on both sides), and that offer.itemstogive.length is undefined then, and my if is never true? Its quite hard to debug it for me, since this "error-case" isn't really reproduceable since it happens just very rarely.
×
×
  • Create New...