Jump to content

Need help with Java


Go to solution Solved by Amuyea,

19 posts in this topic

Recommended Posts

Posted

No it doesn't give me new potions and the after enemy menu doesn't appear. 

Okay. I added the code to the program.

if (enemyHP < 1){
System.out.println("---------------------------------------------------");
System.out.println(" # " + enemy + " was defeated! # ");
System.out.println(" # ");
System.out.println(" # You have" + hp + " HP left.");

Worked for me.

 

Somehow it skipped (I don't understand what this do)

if (rand.nextInt(100) > hpDrop ){
mxHPotions++;
System.out.println(" # The " + enemy + " has dropped a health potion! #");
System.out.println(" # You have" + mxHPotions + " potion(s)! #");

System.out.println("---------------------------------------------------");
int input1 = in.nextInt();
System.out.println("What now?");
System.out.println("1. Continue this maze of death untill you die...");
System.out.println("2. Realize that you have better things to do and quit!");
switch (input1){
case 1: System.out.println("So you choose death, eh... good luck on massacre of mystical creatures."); break;
case 2: System.out.println("So you choose life, eh... good luck on actual things you have to do."); break;
default:
System.out.println("---------------------------------------------------");
System.out.println("Invalid Command");
System.out.println("---------------------------------------------------");
break;

Also

case 2:
if(mxHPotions > 0)
{
hp += mxHPotions;
mxHPotions-- ;
System.out.println("---------------------------------------------------");
System.out.println("\t> You drank the potion!" + hpHealAmount + " gained!");
System.out.println("\t> You have " + hp + " HP.");
System.out.println("\t> You have " + mxHPotions + " Heath Potions left!"); 
System.out.println("---------------------------------------------------"); 
}else{
System.out.println("\t> You ran out, idiot!");
break;
} 
break;

Didn't give 50 health point to Hp just few

Posted

Okay. I added the code to the program.

if (enemyHP < 1){
System.out.println("---------------------------------------------------");
System.out.println(" # " + enemy + " was defeated! # ");
System.out.println(" # ");
System.out.println(" # You have" + hp + " HP left.");

Worked for me.

 

Somehow it skipped (I don't understand what this do)

if (rand.nextInt(100) > hpDrop ){
mxHPotions++;
System.out.println(" # The " + enemy + " has dropped a health potion! #");
System.out.println(" # You have" + mxHPotions + " potion(s)! #");

System.out.println("---------------------------------------------------");
int input1 = in.nextInt();
System.out.println("What now?");
System.out.println("1. Continue this maze of death untill you die...");
System.out.println("2. Realize that you have better things to do and quit!");
switch (input1){
case 1: System.out.println("So you choose death, eh... good luck on massacre of mystical creatures."); break;
case 2: System.out.println("So you choose life, eh... good luck on actual things you have to do."); break;
default:
System.out.println("---------------------------------------------------");
System.out.println("Invalid Command");
System.out.println("---------------------------------------------------");
break;

Also

case 2:
if(mxHPotions > 0)
{
hp += mxHPotions;
mxHPotions-- ;
System.out.println("---------------------------------------------------");
System.out.println("\t> You drank the potion!" + hpHealAmount + " gained!");
System.out.println("\t> You have " + hp + " HP.");
System.out.println("\t> You have " + mxHPotions + " Heath Potions left!"); 
System.out.println("---------------------------------------------------"); 
}else{
System.out.println("\t> You ran out, idiot!");
break;
} 
break;

Didn't give 50 health point to Hp just few

Did you learn Java in class or on your own? :p

  • Solution
Posted

Fixed HPotions used

 

case 2:
                    if(mxHPotions > 0)
                 {
                     hp += hpHealAmount; // You put mxHPotions instead of hpHealAmount
                     mxHPotions-- ;
                     System.out.println("---------------------------------------------------");
                     System.out.println("\t> You drank the potion!" + hpHealAmount + " gained!");
                     System.out.println("\t> You have " + hp + " HP.");
                     System.out.println("\t> You have " + mxHPotions + " Heath Potions left!");
                     System.out.println("---------------------------------------------------");
                 }else{
                 System.out.println("\t> You ran out, idiot!");
                 break;
                 }     
                break;
Posted

 

Fixed HPotions used

case 2:
                    if(mxHPotions > 0)
                 {
                     hp += hpHealAmount; // You put mxHPotions instead of hpHealAmount
                     mxHPotions-- ;
                     System.out.println("---------------------------------------------------");
                     System.out.println("\t> You drank the potion!" + hpHealAmount + " gained!");
                     System.out.println("\t> You have " + hp + " HP.");
                     System.out.println("\t> You have " + mxHPotions + " Heath Potions left!");
                     System.out.println("---------------------------------------------------");
                 }else{
                 System.out.println("\t> You ran out, idiot!");
                 break;
                 }     
                break;

thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Magical Girl : Idle Pixel Hero v7.15 +2 Jailed Cheats
      Modded/Hacked App: Magical Girl : Idle Pixel Hero By SuperPlanet corp.
      Bundle ID: com.superplanet.magical
      App Store Link: https://apps.apple.com/us/app/magical-girl-idle-pixel-hero/id6450410750?uo=4

       

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Damage Multiplier
      - Loot Multiplier

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App







       

      📖 PC Installation Instructions

      STEP 1: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see our iOSGods App IPA Download Tutorial which includes a video example.
      STEP 2: Download Sideloadly and install it on your Windows or Mac.
      STEP 3: Open Sideloadly on your computer, connect your iOS device, and wait until your device name appears in Sideloadly.
      STEP 4: Once your iDevice is recognized, drag the modded .IPA file you downloaded and drop it into the Sideloadly application.
      STEP 5: Enter your Apple Account email, then press “Start.” You’ll then be asked to enter your password. Go ahead and provide the required information.
      STEP 6: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 7: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles / VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 8: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A
      • 22 replies
    • Magical Girl : Idle Pixel Hero v7.15 +2 Cheats
      Modded/Hacked App: Magical Girl : Idle Pixel Hero By SuperPlanet corp.
      Bundle ID: com.superplanet.magical
      iTunes Store Link: https://apps.apple.com/us/app/magical-girl-idle-pixel-hero/id6450410750?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Drop Multiplier
      - Jailbreak Detection Removed


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 166 replies
    • HAWK: Airplane Space games v42.7 Jailed Cheats +3
      Modded/Hacked App: HAWK: Airplane Space games By MYGAMES MENA FZ LLC
      Bundle ID: com.my.hawk.air.shooter
      App Store Link: https://apps.apple.com/us/app/hawk-airplane-space-games/id1145878423?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - One Hit Kill
      - Instant Win

       

      Jailbroken Hack: https://iosgods.com/topic/142184-hawk-airplane-space-games-cheats-v426-3/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/89813-hawk-airplane-space-games-v427-jailed-cheats-3/
      • 407 replies
    • Tap Titans 2 - Hero Legends v7.16.0 +9
      Modded/Hacked App: Tap Titans 2 - Hero Legends By Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://apps.apple.com/us/app/tap-titans-2-hero-legends/id1120294802?uo=4


      Hack Features:
      - Free Level Up
      - Free Skill Upgrades
      - Free Hired Heroes Upgrades
      - Skills Cost 0 Mana To Use
      - No Skill Cooldown
      - Skip Waves - Each Kill acts like the boss so it takes you to next stage instantly no need for waves to move on to next stage
      - Monsters Have Low HP - kill faster
      - Collect Ad Rewards Without Having to Watch Videos


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 514 replies
    • Soul Knight Cheats v7.7.0 +5
      Modded/Hacked App: Soul Knight By Zeyang Li
      Bundle ID: com.ChillyRoom.DungeonShooter
      iTunes Store Link: https://itunes.apple.com/us/app/soul-knight/id1184159988?mt=8&uo=4&at=1010lce4


      Hack Features:
      - God Mode
      - Infinite Ammo
      - Instant Skill
      - Infinite Currencies
       


      Hack Download Link: https://iosgods.com/topic/72042-arm64-soul-knight-cheats-v185-5/


      #Hack #Jailbreak #Cydia #Cheat #Apple #Android #iOSGods
      • 2,335 replies
    • FR Legends Cheats v0.4.1 +3
      Modded/Hacked App: FR LEGENDS By FENG LI
      Bundle ID: com.fengiiley.frlegends
      iTunes Store Link: https://itunes.apple.com/us/app/fr-legends/id1435740083?mt=8&uo=4&at=1010lce4


      Hack Features:
      - Custom Gold (Enter the value you want and enable the switch)
      - Custom Cash
      - Infinite Layer


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/79729-arm64-fr-legends-v027-jailed-cheats-3/


      Hack Download Link: https://iosgods.com/topic/79816-arm64-fr-legends-cheats-v029-3/
      • 638 replies
    • Battle Legion - Mass Battler Cheats v4.5.0 +4
      Modded/Hacked App: Battle Legion - Mass Battler By GODSPEED GAMING SOLUTIONS PRIVATE LIMITED
      Bundle ID: com.traplight.battleslides
      iTunes Store Link: https://apps.apple.com/us/app/battle-legion-mass-battler/id1435133042?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Multiply Attack
      - Multiply Defense
      - Instant Win
      - Enemies Don't Move
      - Enemies Don't Attack

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/129669-battle-legion-mass-battler-cheats-v424-4/
      • 587 replies
    • Hill Climb Racing 2 Cheats v1.69.3 +1
      Modded/Hacked App: Hill Climb Racing 2 By Fingersoft
      Bundle ID: com.fingersoft.hillclimbracing2
      iTunes Store Link: https://apps.apple.com/us/app/hill-climb-racing-2/id1146465836?uo=4


      Hack Features:
      - Freeze Coins
      - Freeze Gems
      - Freeze Scraps


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/108295-hill-climb-racing-2-v1611-jailed-cheats-2/


      iOS Hack Download Link: https://iosgods.com/topic/108298-hill-climb-racing-2-v1612-cheats-3/
      • 2,204 replies
    • Cafeland - World Kitchen Cheats v2.59.7 +1
      Modded/Hacked App: Cafeland - World Kitchen by Gamegos Internet Teknolojileri Ltd Sti.
      Bundle ID: com.gamegos.mobile.cafeland
      iTunes Store Link: https://apps.apple.com/us/app/cafeland-world-kitchen/id1147665432?uo=4&at=1010lce4



      Hack Features:
      - Freeze Currencies


      iOS Hack Download Link: https://iosgods.com/topic/100701-arm64-cafeland-world-kitchen-cheats-v2023-1/
      • 436 replies
    • AdVenture Capitalist Cheats v9.16.1 +1
      Modded/Hacked App: AdVenture Capitalist By Hyper Hippo Publishing Ltd.
      Bundle ID: com.kongregate.mobile.adventurecapitalist
      iTunes Store Link: https://apps.apple.com/us/app/adventure-capitalist/id927006017?uo=4


      Hack Features:
      - Freeze Currencies

       
      Free Non-Jailbroken Hack:  https://iosgods.com/topic/82751-adventure-capitalist-v940-jailed-cheats-1/


      Hack Download Link: https://iosgods.com/topic/78370-adventure-capitalist-cheats-v940-1/
      • 1,195 replies
    • Wittle Defender v1.1.6.6 [+2 Cheats]
      Modded/Hacked App: Wittle Defender By HABBY PTE. LTD.
      Bundle ID: com.game.kingrush
      App Store Link: https://apps.apple.com/us/app/wittle-defender/id6502815032?uo=4

       

      Important


      Do not Abuse. Not responsible for any bans.

      Visual damage not represent real damage

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier

        • Agree
      • 47 replies
    • Wittle Defender v1.1.6.6 [+2 Jailed Cheats]
      Modded/Hacked App: Wittle Defender By HABBY PTE. LTD.
      Bundle ID: com.game.kingrush
      App Store Link: https://apps.apple.com/us/app/wittle-defender/id6502815032?uo=4


       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier
       
      • 106 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines