• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Spell] Sell Items To Specific Player

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

Since I am unable to test with multiple computers and because I don't have available friends to test this with I'd like to ask --

How to make a shop sell items only to the player controlling the shop?
Is this as simple as just set the shop controller to the player?

Or I would have to remove specific abilities from the shop in addition to something else?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Hi all.

Since I am unable to test with multiple computers and because I don't have available friends to test this with I'd like to ask --

How to make a shop sell items only to the player controlling the shop?
Is this as simple as just set the shop controller to the player?

Or I would have to remove specific abilities from the shop in addition to something else?

i think easier if shop owner is the player but somewhere in this section someone already got a demo map about it.


hardest methode if u do your own shop with trackables :D

http://shadowvzs87.uw.hu/upload/new_101.jpg
http://www.hiveworkshop.com/forums/spells-569/mui-full-screen-inventory-shop-custom-item-230191/
 
Last edited:

sentrywiz

S

sentrywiz

i think easier if shop owner is the player but somewhere in this section someone already got a demon map about it.


hardest methode if u do your own shop with trackables :D

http://shadowvzs87.uw.hu/upload/new_101.jpg
http://www.hiveworkshop.com/forums/spells-569/mui-full-screen-inventory-shop-custom-item-230191/

Idk what trackables are.

Demon map what? I don't get it.

EDIT: Just checked screenshots. No I don't need a shop like that. I just want an ordinary shop to sell items only to a specific player (The one in control of the shop)

I think you could changed the Targets Allowed of the Select Unit ability.

What would I put there, Player Units only?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
You could always detect when shop sells an item. Then check who picked it up by picking units in a certain range and checking if they have the item. Then check if that player is the same owner as the shop. If it isn't the same owner remove item and give the gold / lumber cost of the item back. You could use my system that detects http://www.hiveworkshop.com/forums/.../?prev=status=g&d=list&r=20&u=deathismyfriend.
 

sentrywiz

S

sentrywiz

You could always detect when shop sells an item. Then check who picked it up by picking units in a certain range and checking if they have the item. Then check if that player is the same owner as the shop. If it isn't the same owner remove item and give the gold / lumber cost of the item back. You could use my system that detects http://www.hiveworkshop.com/forums/.../?prev=status=g&d=list&r=20&u=deathismyfriend.

Thanks for your reply however I think there is a much simpler solution to this than detecting all the buy/sell procedure.
 

sentrywiz

S

sentrywiz

There is none, it is simple enough and foolproof.

In standard melee maps, each race has their own shop right? Their heroes can use it and I believe if you remove Shop Sharing ability then allies wouldn't be able to purchase there?

I should test this, but there is no foolproof way to test it alone.

What you and shadowvzs suggest is a rather complicated take on a simple solution. True, the triggers would work but why bother making them if there a rather click once solution?

Idk, I think there is a way.
 

sentrywiz

S

sentrywiz

You can test it alone with JNGP 2.0

It has a multiplayer emulator. ( creates several instances of the game on one machine)

I only used JNGP once when I tried to learn vJass. Can you point out specific click instructions on how to test ?
 

sentrywiz

S

sentrywiz

Click JNGP 2.0.X
Then click Start Multiplayer Emulation
Then set the amount of instances you want.
Finally set up the instances by clicking through lan and play as normal.

Alright, thanks I will give this a try.
 
Status
Not open for further replies.
Top