Page 1 of 1

Auto-Accepting Vendor Jobs

PostPosted: Thu Mar 25, 2004 7:17 pm
by Dell-Leafsong
I remember finding the spot where the gump comes up to ask the player whether they accept the job or not. I can disable the gump by putting // in front of it, but how would I use the .options switch to determine whether or not to skip it? I guess my big question is: where is "Auto-accept Vendor jobs=YES" stored? The last script release I pulled didn't seem to use the flag anywhere.

PostPosted: Fri Mar 26, 2004 6:32 am
by SDonald
Drocket once claimed he never got around to getting it working, so you will have to do it yourself.

Find the lines in job.src where it has:

Code: Select all
      if (!YesNo (player,"Accept?") )
         PrintTextAbovePrivate (merchant, "Very well.", player);
         EraseObjProperty (player, "#workingonajob");
         EraseObjProperty (player, "#useskill");
         return;
      endif


Now wrap that with some code that checks whether you have that option set in .options and if so simply ignore the yesno prompt. So it might look like this:

Code: Select all
   var account := player.acct;
   var job_options := account.GetProp("job_options");
   if (!job_options)
     job_options := {0,0};
   endif
   if (!job_options[1])
      if (!YesNo (player,"Accept?") )
         PrintTextAbovePrivate (merchant, "Very well.", player);
         EraseObjProperty (player, "#workingonajob");
         EraseObjProperty (player, "#useskill");
         return;
      endif
   endif



I can't remember if Drocket did the .options part or not. You can always try it and see!

It works for me anyway......

Regards,
Stephen Donald.

PostPosted: Sat Mar 27, 2004 3:40 am
by Drocket
Hehe. I keep forgetting to fix that. I'll definitely fix that right now :)