BBC BASIC for Windows
« WOW Garrison Resource counter »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:41pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: WOW Garrison Resource counter  (Read 415 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
cheesy WOW Garrison Resource counter
« Thread started on: Jul 8th, 2016, 2:30pm »

NOTE: This program was modified after later comment.. It now will run cool.
Thanks for the tip. I knew better... just wanted to get the idea out.. But you never know someone might copy my bad loop with no WAIT and then bad stuff could happen..
The garrison resource counter. Now you always will know how fast your resources are growing on each toon (as long as you clear each toons garrison resources at around the same time and keep the program running.

(this program has been modified to count resources as you play the game)
I will improve this program as time passes
Code:
   
      coun%=0
      resource%=0
      OFF
      REPEAT
        t$=TIME$
        rt$=RIGHT$(t$,8)
        * REFRESH OFF
        CLS
        REM Technically we could easily make it wait for 1 second for an alarm clock
        REM and that should give enough time to do other small calculations.
        REM COOL CPU
        WAIT 100
        coun%=coun% +1
        IF coun%=600 THEN coun%=0:resource%=resource%+1
        PRINT "Garrison resources increase by 1 every 10 minutes "
        PRINT rt$
        PRINT "Current Garrison Resources :" resource%
        * REFRESH
      UNTIL FALSE
   
 
« Last Edit: Jul 12th, 2016, 04:46am by michael » User IP Logged

I like making program generators and like reinventing the wheel
Zaphod
Guest
cheesy Re: CLOCK isolating the time for alarm day managem
« Reply #1 on: Jul 8th, 2016, 11:07pm »

Can I make some suggstions:
Look at Datelib.bbc if you need to manipulate date and time
Don't write closed loops without time delays EVER! You just slow everything else down and waste CPU power.
If you want to stop flicker just write only if it changes.
Or use ON TIME interrupts to run the loop once a 100 ms or so.
« Last Edit: Jul 9th, 2016, 04:20am by Zaphod » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls