• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Shop system help

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2007
Messages
920
Is possible to make a shop that sells items in a spellbook, like when i wanna buy some item, and i click on it, it opens new window with few items ?

Or can i make that on hero, but for choosing what ability to learn ?
 
Last edited:
Well I have done something that is a spellbook hero ability and you can level up the spell book and different levels give different skills... Im not sure if you can do what you are saying.

Ah but you could have a hidden unit store that you cant click on IN the store and have triggers that when someone 'buys' the book to look into it it autoselects the hidden store then they could buy from that...

---

That didnt sound very clear...

When someone wants to look into the spellbook, or new window, they 'buy' the spellbook thing, then triggers make the player select a different store that is hidden nearby that they cant normally click on. Then from there you can decide if it takes money to even look into the store by putting a price on the dummy item, the spellbook thingy. Or you can make it free and it is just like opening a catalog.
 
Level 11
Joined
Jul 28, 2007
Messages
920
"When someone wants to look into the spellbook, or new window, they 'buy' the spellbook thing, then triggers make the player select a different store that is hidden nearby that they cant normally click on. Then from there you can decide if it takes money to even look into the store by putting a price on the dummy item, the spellbook thingy. Or you can make it free and it is just like opening a catalog."

That's a quite good idea. I'll give it a try, tnx.

I only need this for change spells, like shop is like spell invnetory, you can take( buy for free ) any spell from shop, but i need extra window to be able to choose hotkey, like if you buy 2 spells so they dont have same hotkeys, when you buy firebolt for an example, and you click on it, then u have to choose Q W E R firebolt.
 
Well that makes it simpler, I think it could be easier if you choose what hotkey first though.

Then you can send them to different stores by what hotkey they chose and have triggers saying

IF THEY BOUGHTED THE SPELL
IF THE BOUGHTED THE SPELL FROM THE STORE
IF THE STORE WAS THE W STORE
give them a spell that has a hotkey of w
endif
endif
endif

etc etc etc

But if you do it where they buy the spell first you will need to store the spell in a variable, to save player's space I'd use an integer then when you choose a hotkey just remember,
if spellchose = 1, fireball
if spellchose = 2, thunderamazinglightningattack
if spellchose = 3, givethemacookie
if spellchose = 4, youracheateritakeallyourmoney

so on a so forth like that
btw this is my hundredth post :D
 
Level 11
Joined
Jul 28, 2007
Messages
920
OK, can you explain just how can i make shop connection system, if you know hat i mean, and i must put spell first, there are 11 spells, each of them has 4 to 6 hotkeys. So when i buy spell(powerup) if will send me to another shop, but i dont know realy how to make that, i know but its buggy... only i must be able to use those shops, all players that are allied with me, can not, and i must be able to buy from anywhere, so ? :D

My only problem is that all players can use shops, dunno how to reverse it... nad make it for only specific player.
 
Ok give me a minute...

  • Melee Initialization
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Selling unit) Equal to (Spells Incorperated)
      • (Sold Item) Equal to (Spells with W hotkey)
    • Actions
      • Selection - Clear selection for (Owner of (Buying unit))
      • Selection - Add (Super Secret W Store) to selection for (Owner of (Buying unit))
Then when they buy stuff from the Super Secret W store

  • Melee Initialization
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Selling unit) Equal to (Super Secret W store)
      • (Sold Item) Equal to (Fireball(w))
    • Actions
      • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) the text: |cff99ff99You just bought|r |cffff9999Fireball|r|cff99ff99.|r
      • Unit - Add (Fireball(w)) to (Buying unit)
Make sure you put plenty of Editor Suffixies around all your spells so you dont mix em up.
As for this:
|cff99ff99You just bought|r |cffff9999Fireball|r|cff99ff99.|r
That just shows "You just bought" in green "Fireball" in red and "." in green again.
 
Status
Not open for further replies.
Top