Auto-Accepting Vendor Jobs

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

Auto-Accepting Vendor Jobs

Postby Dell-Leafsong on Thu Mar 25, 2004 7:17 pm

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.
Dell-Leafsong
Sr. Regular Poster
 
Posts: 172
Joined: Mon Jan 27, 2003 8:42 pm
Location: Central Texas, USA

Postby SDonald on Fri Mar 26, 2004 6:32 am

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.
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia

Postby Drocket on Sat Mar 27, 2004 3:40 am

Hehe. I keep forgetting to fix that. I'll definitely fix that right now :)
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron