Basic Balance Display For Macromod

Discussion in 'Basic Tutorials' started by GungnirIncarnate, Apr 7, 2013.

  1. GungnirIncarnate

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

    Joined:
    Jul 18, 2012
    Messages:
    3,226
    Trophy Points:
    47,340
    Gender:
    Male
    Ratings:
    +481
    This is just a simple way to display your balance using macromod, I may do a few updates in the future so that it auto updates on transactions but for now it loops /bal in the background every minute or so then logs it to the on screen label.

    This is how the finish product will kind of roughly look:
    [​IMG]
    (Top right corner of the screen)

    1. Ok so first up you need to make a new label for more detail instruction on how to create an on screen label go to this post and follow steps 1 - 3:
    http://ecocitycraft.com/forum/threads/durability-display-for-macromod.46357/
    This time you will want to change the control name of the label to "balance":
    [​IMG]


    2. Once you have created your on screen label you can put it anywhere on the screen you like, personally I prefer the top right corner. Next return back to game and press your "crouch + macro activate" keys and go to the events tab which can be found by using the arrows in the top left corner of the screen then click the "...I" button in the lower right corner of the screen:
    [​IMG]


    3. You should come to the below screen and in the "Create a new file:" Textbox type "balchecker" and hit create:
    [​IMG]

    4. In the text field that appear you will need to copy paste the text from the below code so it looks like the picture below then hit save in the lower right corner of the screen:
    Code:
    $${
    STRIP(&chat,%CHAT%)
    IFMATCHES(%&chat%,^\[EcoDollars\] (.*))
        MATCH(%&chat%,^\[EcoDollars\] \$(.*),{@&balance})
        IFMATCHES(%@&balance%,^([0-9]+)\.([0-9]+))
            MATCH(%@&balance%,^([0-9]+)\.([0-9]+),{@&balanceround,@&rest})
            SET(@#balance,%@&balanceround%)
        ELSE
            SET(@#balance,%@&balance%)
        ENDIF
        SETLABEL(balance,Balance: $%@&balance%,balance)
    ENDIF
    }$$
    [​IMG]

    5. Now we need to assign the macro we just created to the on chat event, so go back to your "Macro Bindings: Events" screen and click "onChat":
    [​IMG]
    In the onChat window that appears type in "$$<balchecker.txt>", then click save in the lower right corner:
    [​IMG]
    Now everything we just did was just to get the label to display your balance everytime it sees it in chat, so now we need to set up a macro that loops /bal in the background so you don't have to do it every minute to make the label update, lets be honest what would be the point of this if we had to do that?

    6. back to your events screen click the "...I" button again and this time create a file named "balloop" (called it balloop as in /bal loop)then hit create:
    [​IMG]
    This time we are going to paste in a script that will turn on only when you join ECC as it identifies the server using its ip address (mc.ecocitycraft.com), to do this you are going to paste the below script from the code into the text window that just appeared when you hit create:
    Code:
    $${
    IF(%SERVER% == "mc.ecocitycraft.com");
        DO();
            ECHO("/bal");
            WAIT(90);
        LOOP();
    ENDIF
    }$$
    This will loop the command /bal every minute and a half. Once you have that it should look something like this except where mine says 120 yours should say 90 (this is just where you can adjust the seconds in between each time it does the command /bal, you can adjust this if you with to suit you personally) Then just hit save, once again save is in the lower right corner of there screen:
    [​IMG]


    7. ok now to make that macro run every time we log in, to do this go back to the events screen again and click on the event that says "onJoinGame":
    [​IMG]

    8. in the screen that appears you are going to type in "$$<balloop.txt>", this justs tell macro mod to run the script balloop whenever you login, all shown in the picture below:
    [​IMG]
    Then once again hit that save button in the right corner to save everything you have just done and then simply return to the game, for everything we just did to become fully active you will need to disconnect from any server you are connected to and join ECC for it to work (in other words simply relog) if you want to make doubly sure restart your client. when you log in to ECC the label that you created named balance should update after a couple of seconds and you balance should display in chat and the label and the label will refresh itself every interval that was set with the loop we made.

    That should be it, if you have trouble following this or just need a hand please feel free to Pm me on the forums, it it much easier to help that way, trying to sort out problems in game can become rather hard.

    I will try to update this macro so it updates on transaction with users/trade signs/lotto/survival games and whatever else I can think of but for now this is all I got for you guys. The next Tutorial I make will probably be the other one shown in the first image in the upper right corner displaying my coordinates, that one is very simple in comparison to this one.

    Hope you enjoy this one any way, I quite enjoy making these for you guys, but remember a little constructive criticism never hurt anyone so if there is something I can do better just shoot me a forum Pm and I'll see what I can do for you.

    I must also thank Kukelekuuk00 for this as when I first started making little macros I had no Idea what I was doing and this was originally his I am just helping you all out with it :) Thanks Kuke.

    -jakey
     
    #1 GungnirIncarnate, Apr 7, 2013
    Last edited: Apr 9, 2013
  2. CamoTitan

    CamoTitan Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Feb 20, 2013
    Messages:
    46
    Trophy Points:
    25,275
    Gender:
    Male
    Ratings:
    +3
    First picture has a word which you might want to sensor. xD Apart from that, another superb tutorial. Thank you sir!
     
  3. iSneaky

    iSneaky This is a local server for local people
    Resident ⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐ VI ⭐ Premium Upgrade

    Joined:
    Jul 14, 2012
    Messages:
    3,489
    Trophy Points:
    77,660
    Gender:
    Male
    Ratings:
    +1,260
    I had this ages ago, kuke posted it in chat :p
     
    #3 iSneaky, Apr 7, 2013
    Last edited by a moderator: Apr 7, 2013
  4. pikes67

    pikes67 Builder
    Builder ⛰️ Ex-Resident ⚒️

    Joined:
    Dec 5, 2012
    Messages:
    5
    Trophy Points:
    25,105
    Gender:
    Male
    Ratings:
    +0
    Thank you very much for this tutorial this is awesome
     
  5. JacksonML

    JacksonML Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    May 21, 2012
    Messages:
    301
    Trophy Points:
    26,120
    Gender:
    Male
    Ratings:
    +24
    Thank you!!!
     
  6. Lee1104

    Lee1104 Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Oct 5, 2012
    Messages:
    1,913
    Trophy Points:
    31,940
    Gender:
    Male
    Ratings:
    +322
    Can't get this to work D:
     
  7. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    Lol just noticed the background to the pics. Moms + Andrew is that? How adorable
     
  8. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    Hey Jakey I found the problem,
    If u want the balloop to work you must delete if server == mc.eco...
    Make sure to set it to a high wait time, I got booted for spamming commands
     
  9. Lee1104

    Lee1104 Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Oct 5, 2012
    Messages:
    1,913
    Trophy Points:
    31,940
    Gender:
    Male
    Ratings:
    +322
    Well you wouldn't want it to update your bal every 5 seconds of course.. Pretty sure every 60 or 90 seconds would be reasonable.
     
  10. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    Gah, I keep getting kicked for spamming commands
     
  11. Lee1104

    Lee1104 Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Oct 5, 2012
    Messages:
    1,913
    Trophy Points:
    31,940
    Gender:
    Male
    Ratings:
    +322
    How long are you setting it to wait?
     
  12. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    90, it seems lik it is 90 milliseconds and I didn't add the ms, it appears to have a mind of its own, any suggestions?
     
  13. GungnirIncarnate

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

    Joined:
    Jul 18, 2012
    Messages:
    3,226
    Trophy Points:
    47,340
    Gender:
    Male
    Ratings:
    +481
    I have since fixed this, the problem was there were no quotation marks around mc.ecocitycraft.com, I have updated the code since then and it works fine, just copy the loop code again and its perfectly fine.

    The code in the tutorial is set to update every 90 seconds (minute and a half).

    Did you adjust the wait timer per chance?
     
  14. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    I have simply copy and pasted the code into the correct chat, it simply echoes literally every millisecond
     
  15. GungnirIncarnate

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

    Joined:
    Jul 18, 2012
    Messages:
    3,226
    Trophy Points:
    47,340
    Gender:
    Male
    Ratings:
    +481
    Thank you for informing me of this I do not read chat when I am taking the screen, I should have paid more attention, screenshot has been edited.
     
  16. GungnirIncarnate

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

    Joined:
    Jul 18, 2012
    Messages:
    3,226
    Trophy Points:
    47,340
    Gender:
    Male
    Ratings:
    +481
    Sneaky in that case why are you here, I posted this for the 40 other users who were interested in how to make it
     
  17. GungnirIncarnate

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

    Joined:
    Jul 18, 2012
    Messages:
    3,226
    Trophy Points:
    47,340
    Gender:
    Male
    Ratings:
    +481
    I have since tweaked the code for the loop try replacing your current code with the one I have just updated
     
  18. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    I have recopied it twice and it still has the same result. Do you think some setting in the macro itself is causing this?
     
  19. GungnirIncarnate

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

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

    I do not believe that would be the problem, Would you mind sending me a forum Pm containing both scripts and Ill see if I can see what is wrong.
     
  20. sick24

    sick24 Tycoon by day, best doctor by night
    Resident ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐ Premium Upgrade

    Joined:
    Dec 9, 2012
    Messages:
    4,090
    Trophy Points:
    53,660
    Gender:
    Male
    Ratings:
    +549
    Wouldn't do much good considering I haven't edited any of the scripts you presented here. I'll try once more to completely clear the Macro of this pages instructions