Buying items and units with your allies gold

merlin

New Member
In wc3 team games when your allies leave you can no longer buy items or tavern heroes (and I think mercenaries) for them. It always uses your gold even if the allied hero is the one there by the shop. Is there a way around this for my map? I'd hate to have to create a custom building for every possible neutral building (merc camps, shops, taverns) with custom abilities that manually deduct gold amount from the buying player. If there even is a way to detect the buying/selected player via trigger.
 
I don't think so, since the players are no longer active/playing, I guess the transaction was only between you and the shop, as you know inactive players cannot any items/units/heroes...
Unless you used this:
Unit - Create... (also works for heroes)
Items - Create... (then give it to your allies hero)
And finally just reduce your allies gold, so it looks like your allies buying it from the shop...


Note: If the player are already gone, why did you want to buy units/items for them...?
 

merlin

New Member
Same reason you do in a regular wc3 team game, you never have enough gold to buy items or pandas for 4 people. Since it sounds like it's impossible, do you know of any good maps or threads with custom shops? I'm thinking I'll have to either manipulate the inventory of the shops with triggers, or else make my own shops with abilities that target a unit and award the item/deduct the gold from that player (so clicking on a Scroll of Protection Ability and targeting the pink archmage would deduct gold from the pink player and give the item to the archmage).

The last thing I can think of is to take your suggestion and so that when I buy an item I can issue a command to add the gold back to me and deduct it from the ally. The problem there is what if you didn't happen to have enough gold at the time you bought it (say the item costs 250 gold and you only have 200 gold). I guess you could issue a text command *before* you buy the item which adds 1,000 gold, then subtracts (1000- Cost of the Item) from you. If only there was a way with trigger to force a unit to buy or sell an item. :(
 
Hmm, the only way that I can think of is to make a list of variables that contains the prices of items and units that was sell by the shop, adds the number to your gold amount, then buy it from the shop... Though you must use this with another trigger event, like A units come within 256.00 of SHOP, or Player types a chat message containing -GOLD as An exact match...
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
This is possible, just store the allies gold in a variable and have that set to go off every second or something. When you buy an item from the store remove that from the allied player and add the gold lost to you're player. That also could be done with a variable.You could have it set so that if the player # leaves then it turns on a trigger that checks the players gold. Just a suggestion.

-- "Player buys item(ITEM)" - this condition and (event?) will provide useful too, but you'd have to set it so that it adds and removes the players gold and also checks to see if the ally can buy the item.

-- The triggers should be turned off UNTIL the players leave, in which it turns on the trigger that will turn on the checking trigger.
 

afisakov

You can change this now in User CP.
umm, why not just have a trigger that periodically gives the gold form "left" players to those still in the game...
if the reason for doing this is: "you never have enough gold to buy items or pandas for 4 people"
then that would solve the problem much easier. Their gold becomes yours to split among your and their heroes as you see fit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • C Cherry.Grove:
    My one game was basically Among Us but you sabotaged an entire medieval city simulated drastically inefficiently with dynamic NPCs :S
  • C Cherry.Grove:
    of course I never finished it x D
  • jonas jonas:
    xD
  • jonas jonas:
    I think you can still run the original game, just there's a chance your map won't work with the newer patches
  • jonas jonas:
    what development framework have you been looking at for mobile development?
  • jonas jonas:
    I'm currently creating (as a hobby) a space invaders like game for mobile using Xamarin, after starting a few larger projects that I also may not have finished :rolleyes::p
  • The Helper The Helper:
    Awesome! you should look at the Atari VCS platform it does not have a huge user base but the one it has is super active at around 11k and they have no games in there store
  • The Helper The Helper:
    basically it is linux
  • The Helper The Helper:
    OMG it is BanLord as Blackveiled on the forum
  • The Helper The Helper:
    what is up buddy
  • jonas jonas:
    thanks for the tip, that sounds cool. Never heard about the VCS before but seems like it should be a good match
  • tom_mai78101 tom_mai78101:
    The winter vacation left a toll on me. I missed staying up late and sleeping in late.
  • C Cherry.Grove:
    i haven't looked into it yet
  • C Cherry.Grove:
    If I could use something Python compatible it would save me some learning
  • C Cherry.Grove:
    But Unity might be easiest
  • C Cherry.Grove:
    looking at old posts here makes me happy. Makes me be all like "wow I was pretty smart in 2009"
  • C Cherry.Grove:
    mostly failing at life through adulthood really demotivated me for a while
  • C Cherry.Grove:
    ....what I don't get is why the fuck they would force us to permanently convert to a version of the game everyone fucking hated : \
  • C Cherry.Grove:
    Raid Shadow Legends texture pack smh
  • jonas jonas:
    Most people fail at life throughout their adulthood. Sometimes we get to learn from it. Usually it just feels like crap.
    +1
  • The Helper The Helper:
    What does not kill you makes you stronger is what they say
  • C Cherry.Grove:
    for real! :cool:
  • Varine Varine:
    Are we still on the topic of failing? I failed lots!
  • jonas jonas:
    If you ever want to talk about it we're here. The way I see it, you're still around. That required a few very difficult successes if you ask me:)

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top