Macromod - Lottery Pot Display

Discussion in 'Basic Tutorials' started by rockboy2000, Jun 15, 2013.

  1. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    This macro keeps track of the amount of money in the lotto pot. Thanks to jakeyray18 for his help with this and for letting me use some of his screenshots from his tutorial for a balance display macro.

    [​IMG]

    First you must access the macro mod menu. To find the key press the Esc key. Then go to "Options", click on "Controls" and then use the arrows keys to find your "Macro activate" key. Default is grave which is the "~" key.

    [​IMG]

    Now you want to open the Macro Mod menu. Do this by pressing the shift key and your "macro activate" key simultaneously. Then click the GUI editor button located in the bottom right corner, circled in the screenshot below.

    [​IMG]

    Now you must double click on the tab called "ingame" listed under the available screens as shown in the screenshot below.

    [​IMG]

    Now we want to create a label in the "ingame" screen so first click on the "Button Panel Commands" icon. Then click on the "Add Label" button.

    [​IMG]

    Now you must choose where you would like to place the label, I have it at the top middle of my screen but it is up to you. It can be changed later on so it does not really matter. Once you have placed the label a box should appear. In the "Control name" box type "lotpot" without the quotation marks. Then click OK.

    [​IMG]

    Now we must add the script that will show which channel you are in. To do this go back to the screen with the keyboard on it. At the top it should have a box saying "Macro bindings: Keys", click the right arrow once, it should then say "Macro bindings: Events". Then click the "Text editor" button in the lower right corner as shown in the picture.

    [​IMG]

    Now you want to create a new file. Type the word "Lottery" without quotes in the box under "Create a new file:". Then click "Create".

    [​IMG]

    A screen like this should appear:

    [​IMG]

    In the editor copy and paste this code:
    Code:
    $${
    STRIP(&chat,%CHAT%)
    IFMATCHES(%&chat%,^\[LOTTERY\] (.*) just bought [0-9]+ tickets?)
        MATCH(%&chat%,^\[LOTTERY\] (.*) just bought ([0-9]+) tickets?,{&username,#tickets})
        #amount = #tickets * 850
        #pot =  #pot + #amount
        SETLABEL(lotpot,Lotto: $%#pot%,lotpot)
    ENDIF()
    IFMATCHES(%&chat%,^\[LOTTERY\] There is currently \$[0-9]+ in the pot\.)
        MATCH(%&chat%,^\[LOTTERY\] There is currently \$([0-9]+) in the pot\.,{#current})
        #pot = #current
        SETLABEL(lotpot,Lotto: $%#pot%,lotpot)
    ENDIF()
    IFMATCHES(%&chat%,^\[LOTTERY\] Congratulations go to (.*) for winning \$[0-9]+ with [0-9]+ tickets\.)
        #pot = 0
        SETLABEL(lotpot,Lotto: $%#pot%,lotpot)
    ENDIF()
    }$$
    
    After clicking the save button you need to go back to the "Macro bindings: Events" page and click on "onChat" In the box at the bottom type "$$<Lottery.txt>" without the quotes. If you already have something in the box separate it with "|". For example:
    $$<random.txt>|$$<Lottery.txt>

    [​IMG]

    Now finally we must make the lottery pot update upon log in so go back to the "Macro bindings: Events" page and click on "onJoinGame" In the box at the bottom copy and paste this:

    Code:
    $${ECHO(/lot)}$$
    If you already have something in the box separate it with "|". For example:
    $${ECHO(/bal|/lot)}$$
     
    #1 rockboy2000, Jun 15, 2013
    Last edited: Jun 15, 2013
  2. TdoggTL

    TdoggTL Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jul 22, 2012
    Messages:
    1,705
    Trophy Points:
    32,340
    Gender:
    Male
    EcoDollars:
    $552
    Ratings:
    +532
    How do you have a display for your armor dura? Post it pl0x :)
     
  3. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    I will post it some other time, it is fairly easy.
     
  4. TdoggTL

    TdoggTL Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jul 22, 2012
    Messages:
    1,705
    Trophy Points:
    32,340
    Gender:
    Male
    EcoDollars:
    $552
    Ratings:
    +532
    Can u post it soon? :p
     
  5. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    I have a life, need sleep and food just like you. Just cause I'm a rock doesn't mean I'm a robot :/
     
  6. TdoggTL

    TdoggTL Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jul 22, 2012
    Messages:
    1,705
    Trophy Points:
    32,340
    Gender:
    Male
    EcoDollars:
    $552
    Ratings:
    +532
    I did everything you had, but the lottery thing doesnt show up. On the label do i add anything for the label text or binding?
     
  7. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    No, if you have done it right it should fill in, type /lot to get it started for the first time. I also need to apply a minor fix for the last instruction.
     
    #7 rockboy2000, Jun 15, 2013
    Last edited: Jun 15, 2013
  8. TdoggTL

    TdoggTL Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jul 22, 2012
    Messages:
    1,705
    Trophy Points:
    32,340
    Gender:
    Male
    EcoDollars:
    $552
    Ratings:
    +532
    Got it working now! I just had to switch the order with certain other commands from another macro
     
    #8 TdoggTL, Jun 15, 2013
    Last edited: Jun 15, 2013
  9. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    Yea, that was the fix I was talking about in the previous post.
     
  10. 12345shane

    12345shane ρяєѕι∂єитιαℓ ρяαєтσя
    Builder ⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 25, 2011
    Messages:
    2,853
    Trophy Points:
    81,160
    Gender:
    Male
    Ratings:
    +2,134
    At the last step, the server stops and I am "Temporarily Denied to join This Server"
     
  11. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    Do you have anything else in the box?
     
  12. 12345shane

    12345shane ρяєѕι∂єитιαℓ ρяαєтσя
    Builder ⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 25, 2011
    Messages:
    2,853
    Trophy Points:
    81,160
    Gender:
    Male
    Ratings:
    +2,134
    I have $${ECHO(/bal)} or something like that
     
  13. rockboy2000

    rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,344
    Trophy Points:
    50,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    Use this: $${ECHO(/bal|/lot)}$$
     
  14. GungnirIncarnate

    Builder ⛰️ Ex-President ⚒️⚒️ Premium Upgrade

    Joined:
    Jul 18, 2012
    Messages:
    3,229
    Trophy Points:
    47,340
    Gender:
    Male
    Ratings:
    +481

    Yes this will work, however for users that have been saying that they get temporarily denied to join the server, this is because they have spammed the commands they have on onjoingame, they will need to separate them with a wait.
    For Example:

    Code:
    $${ECHO("/bal");WAIT(2);ECHO("/lot")}$$
    This should solve the little spamming problem when users attempt to connect and get denied. Just a heads up if anyone else asks.

    - Jakey
     
  15. AscendedSSC

    AscendedSSC Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Jul 1, 2013
    Messages:
    108
    Trophy Points:
    25,500
    Ratings:
    +30
    Can I get a download link for the macro mod?
     
  16. Falconaire

    Falconaire Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    May 19, 2013
    Messages:
    2,065
    Trophy Points:
    37,990
    Gender:
    Male
    Ratings:
    +1,416
  17. MaxToMinimum

    MaxToMinimum President
    President ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Dec 25, 2013
    Messages:
    1,225
    Trophy Points:
    24,860
    Gender:
    Male
    Ratings:
    +313
    Ugh, there is no Mac download for the macromod
     
  18. Agent86_

    Agent86_ Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Dec 25, 2013
    Messages:
    40
    Trophy Points:
    19,400
    Gender:
    Male
    Ratings:
    +30
    There is, although it doesnt explicitly say Mac Download, its the first download link given.
     
  19. AscendedSSC

    AscendedSSC Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Jul 1, 2013
    Messages:
    108
    Trophy Points:
    25,500
    Ratings:
    +30
  20. ze7707

    ze7707 Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Feb 5, 2014
    Messages:
    1,365
    Trophy Points:
    25,640
    Ratings:
    +442
    Does this still work??