Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.



Check if you are posting in the correct category.



The Off Topic section is not meant for discussing Cookie Clicker.

HELP :: Diamond Miner GemFinder

LeviC53LeviC53 Posts: 28Member ✭✭
I am currently working on a game called Diamond Miner. I would like to have a Gem Finder that has a certain percent chance to give you random gems like rubies, sapphires, emeralds, etc. I want the Gem Finder to charge up before being usable. In other words: I want its power to go from 0% to 100% over the course of a random time. I think I've worked out how to add to the power, but I don't know how to make it stop at 100%. Here is some code to get an idea:

Resources:
*GemFinderPower
named Gem Finder Power
displayed as Your Gem Finder is at %a% power.
visible

*GemstonesFouns
named Gemstones Found
displayed as Gemstones Found
visible

*Ruby
displayed as You've Found %a %r
named Ruby| Rubies

Clickables:
*GemFinder
gives 1 Ruby 0.5% of the time requiring 100 Power
visible
named Dig For Gems

Buildings:
*Power
gives 1 GemFinderPower
abstract
starts at 1

I really hope someone can help me with this. If you need more code, tell me what you need to see. Thanks!

Comments

  • Tobo2020Tobo2020 Posts: 62Member ✭✭
    I can't help you to make Gem finder power stop going up at 100%, but I have a solution to make this work, as you described.

    1. Make a resoruce, that is abstract.
    2. Make this command to find gems button:
    Takes Totalfindablegems Nameoftheabstractresoruce
    Gives 1>Totalfindablegems Nameoftheabstractresoruce
    Gives 1 ruby requiring 1 Nameoftheabstractresoruce
    Gives 1 emerald requiring 2 Nameoftheabstractresoruce
    Gives 1 diamond requiring 3 Nameoftheabstractresoruce

    And so on.

    I'm not sure if this will 100% work fine, but for me it's the best solution.

    Hope this helped!
    "Signature is like maths: you use it when you know what you want to do."
  • LeviC53LeviC53 Posts: 28Member ✭✭

    Resources:
    *GemFinderPower
    named Gem Finder Power
    displayed as Your Gem Finder is at %a% power.
    visible

    *GemFinderMaxPower
    abstract
    starts at 100

    Buildings:
    *Power
    gives 1 GemFinderPower for 1 GemFinderMaxPower
    abstract
    starts at 1

    Thank you! This actually worked for me! The only problem is that when the power reaches 100%, it will literally stop until I reset the game. Here is all of the elements related to this problem (I think):

    Resources:
    *GemFinderPower
    named Gem Finder Power
    displayed as Your Gem Finder is at %a% power.
    visible

    *GemFinderMaxPower
    abstract
    starts at 100

    Clickables:
    *GemFinder
    gives 3>5 Topaz 3.5% of the time for 76.61 GemFinderPower
    gives 2>4 Amethyst 3% of the time for 76.61 GemFinderPower
    gives 2>4 Sapphire 3% of the time for 76.61 GemFinderPower
    gives 2>4 Ruby 3% of the time for 76.61 GemFinderPower
    gives 1>3 Emerald 2% of the time for 76.61 GemFinderPower
    on success say You've Found Gems!
    visible
    named Dig For Gems

    Buildings:
    *Power
    gives 1 GemFinderPower for 1 GemFinderMaxPower
    abstract
    starts at 1

    The main problem, I think, is with the Power building. It takes away from the GemFinderMaxPower so that once that reaches zero, you can no longer charge up the gem finder. Hope you can help me here again... xD
  • ¤RunninginReverse¤¤RunninginReverse¤ Posts: 12,605Member, Friendly ✭✭✭✭✭
    Make the GemFinder give 100 GemFinderMaxPower, like so:

    *GemFinder
    gives 3>5 Topaz 3.5% of the time for 76.61 GemFinderPower
    gives 2>4 Amethyst 3% of the time for 76.61 GemFinderPower
    gives 2>4 Sapphire 3% of the time for 76.61 GemFinderPower
    gives 2>4 Ruby 3% of the time for 76.61 GemFinderPower
    gives 1>3 Emerald 2% of the time for 76.61 GemFinderPower
    gives 100 GemFinderMaxPower
    on success say You've Found Gems!
    visible
    named Dig For Gems
    "My game will be playable on all Samsung Microwaves with firmware update 5.3.2 and up." - Audiot
    Creator of DASHNETTALE
    * Seeing this AU based on the community fills you with DETERMINATION.
  • LeviC53LeviC53 Posts: 28Member ✭✭

    Make the GemFinder give 100 GemFinderMaxPower, like so:

    *GemFinder
    gives 3>5 Topaz 3.5% of the time for 76.61 GemFinderPower
    gives 2>4 Amethyst 3% of the time for 76.61 GemFinderPower
    gives 2>4 Sapphire 3% of the time for 76.61 GemFinderPower
    gives 2>4 Ruby 3% of the time for 76.61 GemFinderPower
    gives 1>3 Emerald 2% of the time for 76.61 GemFinderPower
    gives 100 GemFinderMaxPower
    on success say You've Found Gems!
    visible
    named Dig For Gems

    But then... Whenever I click Dig For Gems, it'll always be setting the max power higher than 100. I'll try it, but if it doesn't work I have another idea. Thank you!
  • ¤RunninginReverse¤¤RunninginReverse¤ Posts: 12,605Member, Friendly ✭✭✭✭✭
    LeviC53 said:

    Make the GemFinder give 100 GemFinderMaxPower, like so:

    *GemFinder
    gives 3>5 Topaz 3.5% of the time for 76.61 GemFinderPower
    gives 2>4 Amethyst 3% of the time for 76.61 GemFinderPower
    gives 2>4 Sapphire 3% of the time for 76.61 GemFinderPower
    gives 2>4 Ruby 3% of the time for 76.61 GemFinderPower
    gives 1>3 Emerald 2% of the time for 76.61 GemFinderPower
    gives 100 GemFinderMaxPower
    on success say You've Found Gems!
    visible
    named Dig For Gems

    But then... Whenever I click Dig For Gems, it'll always be setting the max power higher than 100. I'll try it, but if it doesn't work I have another idea. Thank you!
    Well, maybe if you make it cost 100 GemFinderPower, it'll work!
    "My game will be playable on all Samsung Microwaves with firmware update 5.3.2 and up." - Audiot
    Creator of DASHNETTALE
    * Seeing this AU based on the community fills you with DETERMINATION.
  • Zammorak3285Zammorak3285 Posts: 157Member ✭✭

    Make the GemFinder give 100 GemFinderMaxPower, like so:

    *GemFinder
    gives 3>5 Topaz 3.5% of the time for 76.61 GemFinderPower
    gives 2>4 Amethyst 3% of the time for 76.61 GemFinderPower
    gives 2>4 Sapphire 3% of the time for 76.61 GemFinderPower
    gives 2>4 Ruby 3% of the time for 76.61 GemFinderPower
    gives 1>3 Emerald 2% of the time for 76.61 GemFinderPower
    gives 100 GemFinderMaxPower
    on success say You've Found Gems!
    visible
    named Dig For Gems

    This but with gives 76.61 GemFinderMaxPower rather than 100

Sign In or Register to comment.