computer voice is added for save prompt
This commit is contained in:
parent
0135390132
commit
634a120a98
|
@ -7,6 +7,7 @@ import org.openqa.selenium.firefox.FirefoxOptions;
|
|||
import org.openqa.selenium.firefox.FirefoxProfile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
|
@ -48,12 +49,14 @@ public class App {
|
|||
Scanner scanner = new Scanner(System.in);
|
||||
String input = "";
|
||||
|
||||
System.out.println("Type 'save' and press Enter to save data and close browser...");
|
||||
|
||||
while (!input.equalsIgnoreCase("save")) {
|
||||
speakPrompt("Please type save and press Enter to save your work before closing the browser.");
|
||||
System.out.print("> ");
|
||||
input = scanner.nextLine();
|
||||
System.out.println("You typed: " + input);
|
||||
input = scanner.nextLine().trim();
|
||||
|
||||
if (!input.equalsIgnoreCase("save")) {
|
||||
System.out.println("❌ You must save before quitting. Try again.");
|
||||
}
|
||||
}
|
||||
|
||||
Thread.sleep(500); // Give browser a moment to finish updates
|
||||
|
@ -72,6 +75,27 @@ public class App {
|
|||
}
|
||||
}
|
||||
|
||||
private static void speakPrompt(String message) {
|
||||
System.out.println(message); // Print the prompt message to console
|
||||
try {
|
||||
ProcessBuilder pb = new ProcessBuilder("./festival-tts", message);
|
||||
pb.redirectErrorStream(true);
|
||||
Process process = pb.start();
|
||||
|
||||
try (var reader = new java.io.BufferedReader(new java.io.InputStreamReader(process.getInputStream()))) {
|
||||
while (reader.readLine() != null) {
|
||||
// Consume output silently
|
||||
}
|
||||
}
|
||||
|
||||
process.waitFor();
|
||||
|
||||
} catch (IOException | InterruptedException e) {
|
||||
System.err.println("❌ Failed to run festival-tts:");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void saveAll() {
|
||||
if (driver != null) {
|
||||
CookieManager.saveCookies(driver);
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"localStorage":{"soloLevelUpUserStats":"{\"name\":\"Arul\",\"level\":1,\"exp\":60,\"expToNextLevel\":100,\"job\":null,\"title\":null,\"hp\":100,\"maxHp\":100,\"mp\":10,\"maxMp\":10,\"fatigue\":0,\"gold\":0,\"stats\":{\"str\":10,\"agi\":10,\"per\":10,\"int\":10,\"vit\":10},\"statPoints\":2,\"equipment\":[],\"quests\":[{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"4564702d-396c-4f03-bc74-0496015c40aa\",\"active\":true,\"completed\":false,\"progress\":0,\"isCustom\":true,\"createdAt\":1754666927823},{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"24625727-2d42-4177-a0de-910020c30f48\",\"active\":true,\"completed\":false,\"progress\":0,\"isCustom\":true,\"createdAt\":1754673484851},{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"78bfd278-7ae8-4b8d-971b-1bfe5aa54e8d\",\"active\":false,\"completed\":true,\"progress\":100,\"isCustom\":true,\"createdAt\":1754673532100,\"completedAt\":1754677975079},{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"c28b9c88-ddfd-4989-ba44-b60c3368123f\",\"active\":false,\"completed\":true,\"progress\":100,\"isCustom\":true,\"createdAt\":1754673709922,\"completedAt\":1754677973400}],\"completedQuests\":[\"c28b9c88-ddfd-4989-ba44-b60c3368123f\",\"78bfd278-7ae8-4b8d-971b-1bfe5aa54e8d\"],\"inventory\":[{\"id\":\"item-health-potion\",\"name\":\"Health Potion\",\"type\":\"Consumable\",\"rarity\":\"Common\",\"description\":\"Restores 100 HP when consumed.\",\"quantity\":3},{\"id\":\"item-mana-potion\",\"name\":\"Mana Potion\",\"type\":\"Consumable\",\"rarity\":\"Common\",\"description\":\"Restores 50 MP when consumed.\",\"quantity\":2}]}"},"sessionStorage":{}}
|
||||
{"localStorage":{"soloLevelUpUserStats":"{\"name\":\"Arul\",\"level\":1,\"exp\":90,\"expToNextLevel\":100,\"job\":null,\"title\":null,\"hp\":100,\"maxHp\":100,\"mp\":10,\"maxMp\":10,\"fatigue\":0,\"gold\":0,\"stats\":{\"str\":10,\"agi\":10,\"per\":10,\"int\":10,\"vit\":10},\"statPoints\":3,\"equipment\":[],\"quests\":[{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"4564702d-396c-4f03-bc74-0496015c40aa\",\"active\":true,\"completed\":false,\"progress\":0,\"isCustom\":true,\"createdAt\":1754666927823},{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"24625727-2d42-4177-a0de-910020c30f48\",\"active\":false,\"completed\":true,\"progress\":100,\"isCustom\":true,\"createdAt\":1754673484851,\"completedAt\":1754678557235},{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"78bfd278-7ae8-4b8d-971b-1bfe5aa54e8d\",\"active\":false,\"completed\":true,\"progress\":100,\"isCustom\":true,\"createdAt\":1754673532100,\"completedAt\":1754677975079},{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"c28b9c88-ddfd-4989-ba44-b60c3368123f\",\"active\":false,\"completed\":true,\"progress\":100,\"isCustom\":true,\"createdAt\":1754673709922,\"completedAt\":1754677973400}],\"completedQuests\":[\"c28b9c88-ddfd-4989-ba44-b60c3368123f\",\"78bfd278-7ae8-4b8d-971b-1bfe5aa54e8d\",\"24625727-2d42-4177-a0de-910020c30f48\"],\"inventory\":[{\"id\":\"item-health-potion\",\"name\":\"Health Potion\",\"type\":\"Consumable\",\"rarity\":\"Common\",\"description\":\"Restores 100 HP when consumed.\",\"quantity\":3},{\"id\":\"item-mana-potion\",\"name\":\"Mana Potion\",\"type\":\"Consumable\",\"rarity\":\"Common\",\"description\":\"Restores 50 MP when consumed.\",\"quantity\":2}]}"},"sessionStorage":{}}
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user