Author Topic: Buying regs from faction vendors  (Read 11681 times)

0 Members and 1 Guest are viewing this topic.

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Buying regs from faction vendors
« Reply #15 on: June 04, 2010, 01:14:02 PM »
0
I have not been able to get it to do this. Can you maybe provide some more info to help me figure out what happened?


Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Buying regs from faction vendors
« Reply #16 on: June 08, 2010, 05:35:14 PM »
0
I guess i should maybe change the name of this thing so that everyone knows that you do not have to be in factions to buy from faction vendors.

Offline NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Buying regs from faction vendors
« Reply #17 on: June 08, 2010, 08:03:03 PM »
0
my favorite is still Gen's auto item buyer
http://www.scriptuo.com/index.php?topic=3099.0;highlight=buyer

Gen's is so good I stopped writing my own script after a few valuable learning points.

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Buying regs from faction vendors
« Reply #18 on: June 15, 2010, 02:37:37 AM »
0
I think this is running pretty solid now IMO, but I am working on making it stack regs in 60k piles and turn deed them. I have it working i just need to let it run a while and watch for bugs.

Offline Wilk

  • Sr. Member
  • *
  • Posts: 308
  • Activity:
    0%
  • Reputation Power: 3
  • Wilk has no influence.
  • Gender: Male
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Buying regs from faction vendors
« Reply #19 on: August 30, 2010, 12:06:49 PM »
0
Hmm...I've tried this for the last half hour to no avail.

I'm inside the bank.
My bank box is open.
The script opens the purchase menu on each vendor.
The script does not purchase anything.
It just moves on to the next npc vendor.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Buying regs from faction vendors
« Reply #20 on: August 30, 2010, 12:13:42 PM »
0
Does it cycle through the items on the NPC Vendor?

If it's not cycling then there is a "click x y" value that doesn't line up.

Do this:

Open an NPC Vendor buy gump by hand.

Type this into EUO

contpos 0 0
halt

Then hit play. That will move the vendor's gump to position 0, 0 on your screen.

Now hover your mouse over the down slider spot.... and note the cursorX and cursorY position.

Check those numbers against what is in the script. That's where it should be clicking until it finds the appropriate item type in the vendors gump.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Wilk

  • Sr. Member
  • *
  • Posts: 308
  • Activity:
    0%
  • Reputation Power: 3
  • Wilk has no influence.
  • Gender: Male
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Buying regs from faction vendors
« Reply #21 on: August 30, 2010, 12:23:28 PM »
0
There is only one item type on the vendors I am searching.

It's the bottle vendors.

It opens the buy menu, but doesn't purchase the 500 bottles listed.

Then it moves on to the next bottle vendor. Rinse and repeat.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Buying regs from faction vendors
« Reply #22 on: August 30, 2010, 01:05:19 PM »
0
Are the bottle visible in the gump when it's opened?
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Wilk

  • Sr. Member
  • *
  • Posts: 308
  • Activity:
    0%
  • Reputation Power: 3
  • Wilk has no influence.
  • Gender: Male
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Buying regs from faction vendors
« Reply #23 on: August 30, 2010, 01:26:47 PM »
0
Yes they are.

It just does not double click the bottles to start the transaction.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Buying regs from faction vendors
« Reply #24 on: August 30, 2010, 01:53:03 PM »
0
Ok, so go from there... what is the ID of the bottles?

Do the same thing I said earlier, but hover your mouse over the "buy up these bottles" button and note the cursor position. See if that's the same in the script.

You know you can use F7 and F8 to do the script line by line right? Just use F7 and try to find the area where it's not working correctly.
« Last Edit: August 30, 2010, 01:55:45 PM by Cerveza »
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Buying regs from faction vendors
« Reply #25 on: December 25, 2010, 04:56:28 PM »
0
Wilk,

I want to apologize for not responding to your problem. I have not been active in UO for several months I am on christmas break from school and I will look at this and see what I messed up and try to fix it while I am out of school.

All the Best,

Noobie

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Buying regs from faction vendors
« Reply #26 on: December 25, 2010, 05:26:36 PM »
0
Wilk,

You should be good to go now if you re-download the script.

All the best,

Noobie


Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Buying regs from faction vendors
« Reply #27 on: August 05, 2011, 12:11:13 PM »
0
Can I get a Elite to take a look at this for me and give some constructive Criticism? I Would like some ideas to make it more stable and efficient as well ECT...

Thanks in advance!

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Buying regs from faction vendors
« Reply #28 on: August 05, 2011, 04:03:42 PM »
0
Tried your script today, it works pretty well, but it has some issues.
1: When a buying menu has, e.g. two one type regs it only buys one of them.
2; line 18; sset%buyMandrakeRoot N/A
3;
Code: [Select]
sub check_gold
  if #gold < 10000
   {
    event macro 1 1 sacar 10000
    wait 20
   }
return

instead of

Code: [Select]
sub getgold
gosub isbankopen
finditem POF C_ , %bankbox
if #findstack < 10000 && #findcnt <= 1
{
gosub findcheck
return
}
else
if #findstack < 10000
{
 while #findstack < 10000
 {
 ignoreitem #findid
 finditem POF C_ , %bankbox
 {
 if #findcnt = 0
 {
 gosub findcheck
 return
 }
 }
 }
 }
gosub gold
gosub goldck
return

sub goldck
event macro 8 2
finditem POF C_ , #BACKPACKID
if #FINDSTACK < 10000
gosub getgold
return

sub gold
finditem POF C_ , %bankbox
if #findstack < 10000
gosub findcheck
else
Exevent drag #FINDID 10000
wait 12
Exevent Dropc #BACKPACKID
wait 8
return


I'm not sure, but I think this isnt the right way to end a sub(with brackets after return)?   Few example.

Code: [Select]
;Your code was a little bit haotic, so i used ScriptUOs autoindent to organise it.
sub journal
  if #jindex > %jrnl
  {
    scanjournal %jrnl
    if Begging thy pardon in #journal
    {
      display you bank is out of gold
      halt
    }
    else
    {
      set %jrnl %jrnl + 1
    return
  }
}
;#######################################
sub findvendor
  finditem IS G
  if #FINDCNT > 0
  {
    for #FINDINDEX 1 #FINDCNT
    {
      event property #FINDID
      wait 1
      if Reagent notin #PROPERTY
      {
        ignoreitem #findid
      }
      else
      {
        set #LTARGETID #findid
      return
    }
  }
}
else
{
  event macro 15 43
  target
  event macro 23 0
  wait 200s
  event macro 15 43
  target
  event macro 23 0
  wait 200s
  event macro 15 43
  target
  event macro 23 0
  wait 200s
  goto n1
}
;#######################################
sub buybottles
  finditem IS G
  if #FINDCNT > 0
  {
    for #FINDINDEX 1 #FINDCNT
    {
      event property #FINDID
      wait 1
      if Bottle notin #PROPERTY
      {
        ignoreitem #findid
      }
      else
      {
        set #LTARGETID #findid
        return
      }
    }
  }
  else
  {
  return
}

And so on.

I made few changes so your code would look better to the eye, and wont get an overload. But it's still a haotic one.

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
Noobie's faction reg buyer ver 6_1_10.1.txt
« Last Edit: August 05, 2011, 05:04:41 PM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Buying regs from faction vendors
« Reply #29 on: August 05, 2011, 09:51:41 PM »
0
stupid idea but:
Code: [Select]
sub popup
  exevent Popup #findid
  gosub GumpWait NULL normal_gump normal_gump
return
why not directly choose the entry u want?
Code: [Select]
exevent Popup #findid 3??

Tags: