Shopmenus?

BrokenX

New Member
Reaction score
26
Hehe, i got this idea, yes, again. What if i made a dialog, so when a hero types -shopmenu, it makes a dialog with items they can buy telling them the price beside it? Would that be cool you think? Sort of like Counter-strike in those warcraft3 mods.
 

SilverHawk

General Iroh - Dragon of the West
Reaction score
89
Personally, I think it depends on what you're playing. In some maps it would be awesome, but in my map, for instance, it would be unfair for a player to buy items anywhere but at a shop. I think it would be especially good in DOTA-type games. Great idea! :)
 

BrokenX

New Member
Reaction score
26
Well i am making an AoS, that is where I thought i would use it ;). So yes :/ it is sort of cool, cause you can buy items without having to go back. Non-stop killing lol.
 
H

Hell-Pleaque

Guest
I think that having to go back in town to shop just balances the game a little, so this way when a hero is really alot stronger than the others, while he shops it gives the others time to kill and get some gold. But it's a good idea still, even though you'd need a huge dialog O_O
 

BrokenX

New Member
Reaction score
26
Theres nothing huger then the dialog i already have made, so they can choose from 18 heroes at the start. Its about, page and a half long of trigger, just to show the dialog.


Having some difficulty making the buttons show, I created two buttons to test it, but they don't show for some reason?
 

Rinpun

Ex TH Member
Reaction score
105
You've got to have a dialog variable. You've got to chain in the dialog button variables with the dialog, and then you have to show the dialog.

It's not too hard to do actually. With the power of strings you can simplify your whole dialog box if you have a whole bunch of string/integer variables set several seconds into the game.
 

Rinpun

Ex TH Member
Reaction score
105
As a matter-of-fact, this should/will work. It's tedious I know, but it will be cool in the game.

In case you're wondering why TheShoppe has that interesting condition, it's because you can activate this even before you choose your avatar, and most likely the game will crash or get confused when you tell it to create an item and give it to nobody. So, the menu won't activate until your dude is chosen.

Also, I was lazy on the events here. TheShoppe needs every player who has a hero to have it as an event. I only set it to player red because I didn't feel like adding in all the other 9 to 11 players.

I also noticed I left out an exit button. I may add one to these triggers in the future, but it is quite simple what you have to do. State one as exit and put it on every menu. Then, if it doesn't quit the menu already when you press the button (nothing's going to happen in ShoppeButtonClick), you can tell it to hide ShopMenus[0] through all the other ShopMenus.

ShopMenus -- Dialog Array for how many different pages of menu you want.
MenuButtons -- Dialog Button Array for the number of buttons on all of your menus totaled up.
Hero -- Unit Array for the number of players. He's the dude who will receive this crud, so set him as your chosen avatar.

Code:
TheShoppe
    Events
        Player - Player 1 (Red) types a chat message containing -shopmenu as An exact match
    Conditions
        Hero[(Player number of (Triggering player))] Not equal to No unit
    Actions
        Dialog - Clear ShopMenus[0]
        Dialog - Change the title of ShopMenus[0] to Basic Equipment
        Dialog - Create a dialog button for ShopMenus[0] labelled Basic Sword -- 300 Gold
        Set MenuButtons[0] = (Last created dialog Button)
        Dialog - Create a dialog button for ShopMenus[0] labelled Basic Bow -- 300 Gold
        Set MenuButtons[1] = (Last created dialog Button)
        Dialog - Create a dialog button for ShopMenus[0] labelled Basic Staff -- 300 Gold
        Set MenuButtons[2] = (Last created dialog Button)
        Dialog - Create a dialog button for ShopMenus[0] labelled Basic Armor -- 500 Gold
        Set MenuButtons[3] = (Last created dialog Button)
        Dialog - Create a dialog button for ShopMenus[0] labelled Advanced Equipment
        Set MenuButtons[4] = (Last created dialog Button)
        Dialog - Show ShopMenus[0] for (Triggering player)

ShoppeButtonClick
    Events
        Dialog - A dialog button is clicked for ShopMenus[0]
        Dialog - A dialog button is clicked for ShopMenus[1]
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[0]
                ((Triggering player) Current gold) Greater than or equal to 300
            Then - Actions
                Hero - Create Basic Sword and give it to Hero[(Player number of (Triggering player))]
                Player - Add -300 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[1]
                ((Triggering player) Current gold) Greater than or equal to 300
            Then - Actions
                Hero - Create Basic Bow and give it to Hero[(Player number of (Triggering player))]
                Player - Add -300 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[2]
                ((Triggering player) Current gold) Greater than or equal to 300
            Then - Actions
                Hero - Create Basic Staff and give it to Hero[(Player number of (Triggering player))]
                Player - Add -300 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[3]
                ((Triggering player) Current gold) Greater than or equal to 500
            Then - Actions
                Hero - Create Basic Armor and give it to Hero[(Player number of (Triggering player))]
                Player - Add -500 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[4]
            Then - Actions
                Dialog - Clear ShopMenus[1]
                Dialog - Change the title of ShopMenus[1] to Advanced Equipment
                Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Sword -- 750 Gold
                Set MenuButtons[5] = (Last created dialog Button)
                Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Bow -- 750 Gold
                Set MenuButtons[6] = (Last created dialog Button)
                Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Staff -- 750 Gold
                Set MenuButtons[7] = (Last created dialog Button)
                Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Armor -- 1000 Gold
                Set MenuButtons[8] = (Last created dialog Button)
                Dialog - Create a dialog button for ShopMenus[1] labelled Basic Equipment
                Set MenuButtons[9] = (Last created dialog Button)
                Dialog - Show ShopMenus[1] for (Triggering player)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[5]
                ((Triggering player) Current gold) Greater than or equal to 750
            Then - Actions
                Hero - Create Advanced Sword and give it to Hero[(Player number of (Triggering player))]
                Player - Add -750 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[6]
                ((Triggering player) Current gold) Greater than or equal to 750
            Then - Actions
                Hero - Create Advanced Bow and give it to Hero[(Player number of (Triggering player))]
                Player - Add -750 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[7]
                ((Triggering player) Current gold) Greater than or equal to 750
            Then - Actions
                Hero - Create Advanced Staff and give it to Hero[(Player number of (Triggering player))]
                Player - Add -750 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[8]
                ((Triggering player) Current gold) Greater than or equal to 1000
            Then - Actions
                Hero - Create Advanced Armor and give it to Hero[(Player number of (Triggering player))]
                Player - Add -1000 to (Triggering player) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to MenuButtons[9]
            Then - Actions
                Trigger - Run TheShoppe <gen> (ignoring conditions)
            Else - Actions
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top