Feedback on store class idea

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Feedback on store class idea

#1 Post by rock5 » Thu Jan 20, 2011 4:33 am

Hi,

I'm about to commit an update to rombot with a lot of changes. 1 of the things I ended up doing was create a 'store' class. The way it works is, whenever buying stuff, it loads the store data once only for that npc. From then on player merchant should run supper fast. It only changes the data when you visit a different store.

I need peoples opinion as to which functions should be moved to the store class. buyItem() was a no brainer. buyconsumables() wasn't so obvious because it also uses the inventory but seeing as it's about 'buying' I moved that too. The main 1 I'm not sure about is autosell(). It also uses the inventory but doesn't use the data stored in 'store'. Seeing as the 'store' class is mainly about the items for sale I'm not sure if a selling function should be moved to it. But then again selling is still a store function I guess.

What are people opinions?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Feedback on store class idea

#2 Post by Personalausweis » Thu Jan 20, 2011 7:18 am

hi Rock5,

one thing that is disturbing me is the fact that consumables are always bought one by one.
perhaps it is possible to check how many potions are in bag and then buy the rest to maximun in one stack.

sth like this:

Code: Select all

inBag = getBagItemCount(ID)
toBuy = (Maximum to buy from profile?! - inBag)
sendmacro("StoreBuyItem(position,toBuy)")
:)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Feedback on store class idea

#3 Post by rock5 » Thu Jan 20, 2011 8:05 am

Personalausweis wrote:one thing that is disturbing me is the fact that consumables are always bought one by one.
Yeah, me too. That's why I fixed it in rev 559.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Feedback on store class idea

#4 Post by jduartedj » Thu Jan 20, 2011 10:57 am

I love the idea. Idk if it exists but a buy-item-by-name option would be swell!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Feedback on store class idea

#5 Post by rock5 » Thu Jan 20, 2011 11:50 am

jduartedj wrote:I love the idea. Idk if it exists but a buy-item-by-name option would be swell!
That would be

Code: Select all

store:buyItem(nameIdOrIndex, quantity)
By the way I've committed now. Guess I couldn't wait. Check out the changelog here
http://www.solarstrike.net/phpBB3/viewt ... =21&t=2101
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests