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.
 
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! :)
 
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.
 
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
 
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?
 
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.
 
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.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top