Major code cleanup and compact message improvements
✅ Fixed all syntax errors and indentation issues ✅ Made all command outputs more compact and readable ✅ Fixed shop display with full item names ✅ Improved message formats for better IRC experience Changes: - Fixed broken try-except blocks and indentation - Compacted hit/miss/reload messages - Fixed color code issues in logging - All syntax errors resolved - bot fully functional
This commit is contained in:
Binary file not shown.
@@ -9,14 +9,41 @@
|
||||
"username": "duckhunt",
|
||||
"password": "duckhunt//789//"
|
||||
},
|
||||
"password": "",
|
||||
"password": "your_iline_password_here",
|
||||
"_comment_password": "Server password for I-line exemption (PASS command)",
|
||||
"admins": ["peorth", "computertech", "colby"],
|
||||
|
||||
"_comment_message_output": "Default output modes for different message types",
|
||||
"message_output": {
|
||||
"default_user_mode": "PUBLIC",
|
||||
"_comment_default_user_mode": "Default output mode for new users: PUBLIC, NOTICE, or PRIVMSG",
|
||||
"force_public": {
|
||||
"duck_spawn": true,
|
||||
"duck_shot": true,
|
||||
"duck_befriend": true,
|
||||
"leaderboard": true,
|
||||
"admin_commands": true
|
||||
},
|
||||
"_comment_force_public": "Message types that always go to channel regardless of user preference"
|
||||
},
|
||||
|
||||
"_comment_duck_spawning": "Duck spawning configuration",
|
||||
"duck_spawn_min": 1800,
|
||||
"duck_spawn_max": 5400,
|
||||
"duck_timeout_min": 45,
|
||||
"duck_timeout_max": 75,
|
||||
"duck_smartness": {
|
||||
"enabled": true,
|
||||
"learning_rate": 0.1,
|
||||
"max_difficulty_multiplier": 2.0,
|
||||
"_comment": "Ducks become harder to hit as more are shot in channel"
|
||||
},
|
||||
"records_tracking": {
|
||||
"enabled": true,
|
||||
"track_fastest_shots": true,
|
||||
"track_channel_records": true,
|
||||
"max_records_stored": 10
|
||||
},
|
||||
"duck_types": {
|
||||
"normal": {
|
||||
"spawn_chance": 0.6,
|
||||
@@ -91,7 +118,27 @@
|
||||
"starting_chargers": 2,
|
||||
"max_chargers_base": 2,
|
||||
"durability_enabled": true,
|
||||
"confiscation_enabled": true
|
||||
"confiscation_enabled": true,
|
||||
"auto_rearm_on_duck_shot": true,
|
||||
"_comment_auto_rearm": "Automatically restore confiscated guns when anyone shoots a duck"
|
||||
},
|
||||
|
||||
"_comment_new_players": "Starting stats for new hunters",
|
||||
"new_players": {
|
||||
"starting_xp": 0,
|
||||
"starting_accuracy": 65,
|
||||
"starting_reliability": 70,
|
||||
"starting_karma": 0,
|
||||
"starting_deflection": 0,
|
||||
"starting_defense": 0,
|
||||
"luck_chance": 5,
|
||||
"_comment_luck_chance": "Base percentage chance for lucky events",
|
||||
"random_stats": {
|
||||
"enabled": false,
|
||||
"accuracy_range": [60, 80],
|
||||
"reliability_range": [65, 85],
|
||||
"_comment_ranges": "If enabled, new players get random stats within these ranges"
|
||||
}
|
||||
},
|
||||
|
||||
"_comment_economy": "Economy and shop configuration",
|
||||
|
||||
205
duckhunt/config_local.json
Normal file
205
duckhunt/config_local.json
Normal file
@@ -0,0 +1,205 @@
|
||||
{
|
||||
"server": "irc.rizon.net",
|
||||
"port": 6697,
|
||||
"nick": "DuckHunt",
|
||||
"channels": ["#computertech"],
|
||||
"ssl": true,
|
||||
"sasl": {
|
||||
"enabled": true,
|
||||
"username": "duckhunt",
|
||||
"password": "duckhunt//789//"
|
||||
},
|
||||
"password": "",
|
||||
"admins": ["peorth", "computertech", "colby"],
|
||||
|
||||
"_comment_duck_spawning": "Duck spawning configuration",
|
||||
"duck_spawn_min": 1800,
|
||||
"duck_spawn_max": 5400,
|
||||
"duck_timeout_min": 45,
|
||||
"duck_timeout_max": 75,
|
||||
"duck_types": {
|
||||
"normal": {
|
||||
"spawn_chance": 0.6,
|
||||
"xp_reward": 10,
|
||||
"difficulty": 1.0,
|
||||
"flee_time": 15,
|
||||
"messages": ["・゜゜・。。・゜゜\\\\_o< QUACK!"]
|
||||
},
|
||||
"fast": {
|
||||
"spawn_chance": 0.25,
|
||||
"xp_reward": 15,
|
||||
"difficulty": 1.5,
|
||||
"flee_time": 8,
|
||||
"messages": ["・゜゜・。。・゜゜\\\\_o< QUACK! (Fast duck!)"]
|
||||
},
|
||||
"rare": {
|
||||
"spawn_chance": 0.1,
|
||||
"xp_reward": 30,
|
||||
"difficulty": 2.0,
|
||||
"flee_time": 12,
|
||||
"messages": ["・゜゜・。。・゜゜\\\\_o< QUACK! (Rare duck!)"]
|
||||
},
|
||||
"golden": {
|
||||
"spawn_chance": 0.05,
|
||||
"xp_reward": 75,
|
||||
"difficulty": 3.0,
|
||||
"flee_time": 10,
|
||||
"messages": ["・゜゜・。。・゜゜\\\\_✪< ★ GOLDEN DUCK ★"]
|
||||
}
|
||||
},
|
||||
"sleep_hours": [],
|
||||
"max_ducks_per_channel": 3,
|
||||
|
||||
"_comment_befriending": "Duck befriending configuration",
|
||||
"befriending": {
|
||||
"enabled": true,
|
||||
"success_chance": 0.7,
|
||||
"failure_messages": [
|
||||
"The duck looked at you suspiciously and flew away!",
|
||||
"The duck didn't trust you and escaped!",
|
||||
"The duck was too scared and ran off!"
|
||||
],
|
||||
"scared_away_chance": 0.1,
|
||||
"scared_away_messages": [
|
||||
"You scared the duck away with your approach!",
|
||||
"The duck was terrified and fled immediately!"
|
||||
],
|
||||
"xp_reward_min": 1,
|
||||
"xp_reward_max": 3
|
||||
},
|
||||
|
||||
"_comment_shooting": "Shooting mechanics configuration",
|
||||
"shooting": {
|
||||
"enabled": true,
|
||||
"base_accuracy": 85,
|
||||
"base_reliability": 90,
|
||||
"jam_chance_base": 10,
|
||||
"friendly_fire_enabled": true,
|
||||
"friendly_fire_chance": 5,
|
||||
"reflex_shot_bonus": 5,
|
||||
"miss_xp_penalty": 5,
|
||||
"wild_shot_xp_penalty": 10,
|
||||
"teamkill_xp_penalty": 20
|
||||
},
|
||||
|
||||
"_comment_weapons": "Weapon system configuration",
|
||||
"weapons": {
|
||||
"enabled": true,
|
||||
"starting_weapon": "pistol",
|
||||
"starting_ammo": 6,
|
||||
"max_ammo_base": 6,
|
||||
"starting_chargers": 2,
|
||||
"max_chargers_base": 2,
|
||||
"durability_enabled": true,
|
||||
"confiscation_enabled": true
|
||||
},
|
||||
|
||||
"_comment_economy": "Economy and shop configuration",
|
||||
"economy": {
|
||||
"enabled": true,
|
||||
"starting_coins": 100,
|
||||
"shop_enabled": true,
|
||||
"trading_enabled": true,
|
||||
"theft_enabled": true,
|
||||
"theft_success_rate": 30,
|
||||
"theft_penalty": 50,
|
||||
"banking_enabled": true,
|
||||
"interest_rate": 5,
|
||||
"loan_enabled": true,
|
||||
"inventory_system_enabled": true,
|
||||
"max_inventory_slots": 20
|
||||
},
|
||||
|
||||
"_comment_progression": "Player progression configuration",
|
||||
"progression": {
|
||||
"enabled": true,
|
||||
"max_level": 40,
|
||||
"xp_multiplier": 1.0,
|
||||
"level_benefits_enabled": true,
|
||||
"titles_enabled": true,
|
||||
"prestige_enabled": false
|
||||
},
|
||||
|
||||
"_comment_karma": "Karma system configuration",
|
||||
"karma": {
|
||||
"enabled": true,
|
||||
"hit_bonus": 2,
|
||||
"golden_hit_bonus": 5,
|
||||
"teamkill_penalty": 10,
|
||||
"wild_shot_penalty": 3,
|
||||
"miss_penalty": 1,
|
||||
"befriend_success_bonus": 2,
|
||||
"befriend_fail_penalty": 1
|
||||
},
|
||||
|
||||
"_comment_items": "Items and powerups configuration",
|
||||
"items": {
|
||||
"enabled": true,
|
||||
"lucky_items_enabled": true,
|
||||
"lucky_item_base_chance": 5,
|
||||
"detector_enabled": true,
|
||||
"silencer_enabled": true,
|
||||
"sunglasses_enabled": true,
|
||||
"explosive_ammo_enabled": true,
|
||||
"sabotage_enabled": true,
|
||||
"insurance_enabled": true,
|
||||
"decoy_enabled": true
|
||||
},
|
||||
|
||||
"_comment_social": "Social features configuration",
|
||||
"social": {
|
||||
"leaderboards_enabled": true,
|
||||
"duck_alerts_enabled": true,
|
||||
"private_messages_enabled": true,
|
||||
"statistics_sharing_enabled": true,
|
||||
"achievements_enabled": false
|
||||
},
|
||||
|
||||
"_comment_moderation": "Moderation and admin features",
|
||||
"moderation": {
|
||||
"ignore_system_enabled": true,
|
||||
"rate_limiting_enabled": true,
|
||||
"rate_limit_cooldown": 2.0,
|
||||
"admin_commands_enabled": true,
|
||||
"ban_system_enabled": true,
|
||||
"database_reset_enabled": true,
|
||||
"admin_rearm_gives_full_ammo": false,
|
||||
"admin_rearm_gives_full_chargers":false
|
||||
},
|
||||
|
||||
"_comment_advanced": "Advanced game mechanics",
|
||||
"advanced": {
|
||||
"gun_jamming_enabled": true,
|
||||
"weather_effects_enabled": false,
|
||||
"seasonal_events_enabled": false,
|
||||
"daily_challenges_enabled": false,
|
||||
"guild_system_enabled": false,
|
||||
"pvp_enabled": false
|
||||
},
|
||||
|
||||
"_comment_messages": "Message customization",
|
||||
"messages": {
|
||||
"custom_duck_messages_enabled": true,
|
||||
"color_enabled": true,
|
||||
"emoji_enabled": true,
|
||||
"verbose_messages": true,
|
||||
"success_sound_effects": true
|
||||
},
|
||||
|
||||
"_comment_database": "Database and persistence",
|
||||
"database": {
|
||||
"auto_save_enabled": true,
|
||||
"auto_save_interval": 300,
|
||||
"backup_enabled": true,
|
||||
"backup_interval": 3600,
|
||||
"compression_enabled": false
|
||||
},
|
||||
|
||||
"_comment_debug": "Debug and logging options",
|
||||
"debug": {
|
||||
"debug_mode": false,
|
||||
"verbose_logging": false,
|
||||
"command_logging": false,
|
||||
"performance_monitoring": false
|
||||
}
|
||||
}
|
||||
0
duckhunt/config_new.json
Normal file
0
duckhunt/config_new.json
Normal file
@@ -541,3 +541,13 @@
|
||||
[2025-09-12 20:59:07,442] INFO: Final database save completed - 19 players saved
|
||||
[2025-09-12 20:59:07,443] INFO: Cleanup completed successfully
|
||||
[2025-09-12 20:59:07,445] INFO: DuckHunt Bot shutdown complete
|
||||
2025-09-13 13:06:23,192 [INFO ] DuckHuntBot - setup_logger:78: Enhanced logging system initialized with file rotation
|
||||
2025-09-13 13:06:23,212 [INFO ] DuckHuntBot - load_database:401: Loaded 19 players from duckhunt.json
|
||||
2025-09-13 13:07:06,713 [INFO ] DuckHuntBot - setup_logger:79: Enhanced logging system initialized with file rotation
|
||||
2025-09-13 13:07:06,715 [INFO ] DuckHuntBot - load_database:402: Loaded 19 players from duckhunt.json
|
||||
2025-09-13 13:07:20,053 [INFO ] DuckHuntBot - setup_logger:79: Enhanced logging system initialized with file rotation
|
||||
2025-09-13 13:07:20,054 [INFO ] DuckHuntBot - load_database:402: Loaded 19 players from duckhunt.json
|
||||
2025-09-13 13:17:14,822 [INFO ] DuckHuntBot - setup_logger:79: Enhanced logging system initialized with file rotation
|
||||
2025-09-13 13:17:14,824 [INFO ] DuckHuntBot - load_database:402: Loaded 19 players from duckhunt.json
|
||||
2025-09-13 13:22:07,954 [INFO ] DuckHuntBot - setup_logger:79: Enhanced logging system initialized with file rotation
|
||||
2025-09-13 13:22:07,956 [INFO ] DuckHuntBot - load_database:402: Loaded 19 players from duckhunt.json
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2690
duckhunt/simple_duckhunt.py.backup
Normal file
2690
duckhunt/simple_duckhunt.py.backup
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user