• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Auction House Trigger

Status
Not open for further replies.
Level 3
Joined
Jul 30, 2017
Messages
13
I've been thinking about this auction house trigger, but I cannot phase it in my mind how it'd exactly work ... because I don't understand hashtables very well and maybe overestimate what they can do.

Please forgive my horrible, horrible pseudo-code and sloppy presentation. I'm writing this before going to bed.

hashtable holds x[n1,n2, . . . nn]
n = slots in building hero buys items
if hero sells item to building
then n1 = sold item with price y
then player owning selling hero receives prompt for price y
if hero buys n1 for price y
then n1 is removed from building's inventory
n1 goes into purchasing hero's inventory
price y is removed from player's gold

Is this possible?
 
Level 15
Joined
Aug 31, 2009
Messages
776
Yes, it would indeed be possible, but dynamically displaying the information in clean, intuitive way is the hard part. Having the items show up on some kind of multiboard is probably the best course of action, or you could show floating text, and use the building with 2 abilities buttons for left / right arrows to cycle through the items in your hashtable.

Suffice to say, it's possible, but challenging.
 
Status
Not open for further replies.
Top