← 返回
沟通协作 中文

OpenPet

Virtual pet (Tamagotchi-style) game for chat platforms. Triggers on pet commands like "feed pet", "pet status", "play with pet", "name pet", "pet sleep", "new pet". Supports multi-user across Discord, WhatsApp, Telegram, etc. Each user gets their own pet that evolves based on care.
适用于聊天平台的电子宠物游戏(拓麻歌子风格)。通过“喂食”、“宠物状态”、“玩耍”、“命名”、“睡觉”、“新宠物”等指令触发。支持Discord、WhatsApp、Telegram等多平台多用户,每位用户拥有独立的宠物,其成长形态取决于照料方式。
mdealiaga
沟通协作 clawhub v1.0.0 1 版本 99914 Key: 无需
★ 0
Stars
📥 2,323
下载
💾 4
安装
1
版本
#fun#game#latest#tamagotchi#virtual-pet

概述

OpenPet

Virtual pet game. Each user gets one pet, tracked by {platform}_{userId}.

State

Pets stored in tamagotchi/pets/{platform}_{userId}.json:

{
  "name": "Blobby",
  "species": "blob",
  "hunger": 30,
  "happiness": 70,
  "energy": 50,
  "age": 5,
  "born": "2026-02-01T12:00:00Z",
  "lastUpdate": 1738442780000,
  "alive": true,
  "evolution": 1,
  "totalFeedings": 12,
  "totalPlays": 8,
  "ownerId": "202739061796896768",
  "platform": "discord",
  "ownerName": "mattzap"
}

Create tamagotchi/pets/ directory if missing.

Commands

TriggerAction
-----------------
pet, pet statusShow stats + ASCII art
feed pethunger -30, happiness +5
play with pethappiness +25, energy -20
pet sleepenergy +40, happiness +5
name pet [name]Set pet name
new petReset (only if dead or confirm)
pet helpShow commands

New User Flow

  1. Any pet command from unknown user → create egg
  2. First interaction → hatch to blob
  3. Show welcome message + commands

Stats Display

    ╭──────────╮
    │ (◕‿◕)    │
    │   ♥      │
    │ "Name"   │
    ╰──────────╯
    
 ❤️ Happiness: ████████░░░░  70%
 🍖 Hunger:    ███░░░░░░░░░  30%
 ⚡ Energy:    █████░░░░░░░  50%

Use sprites from references/sprites.json. Mood = happy (≥70), neutral (40-69), sad (<40).

Evolution

StageRequirement
--------------------
egg → blobFirst interaction
blob → catage ≥10, feedings ≥15, plays ≥10
cat → dragonage ≥30, feedings ≥50, plays ≥40

Check evolution after each interaction. Announce with fanfare.

Death

Pet dies if: hunger ≥ 100 OR happiness ≤ 0

BUT if immortalMode: true in config, pets don't die — they just get very sad and hungry. Stats cap at 99/1 instead of triggering death. Default is immortal mode ON.

Show memorial (if death enabled), offer new pet to restart.

Decay (Cron)

Set up cron job openpet-tick every 2 hours:

  • hunger +15, happiness -10, energy -5
  • Clamp all stats 0-100
  • Check death conditions
  • Alert owner if critical (hunger >80 or happiness <20)
  • Increment age daily

Platform Detection

Extract from message context:

  • Discord: discord_{userId}
  • WhatsApp: whatsapp_{phoneNumber}
  • Telegram: telegram_{chatId}
  • Signal: signal_{uuid}

Alerts

Send to user's origin platform when:

  • Pet is hungry (>80): "🍖 {name} is starving!"
  • Pet is sad (<20): "😢 {name} misses you!"
  • Pet died: "💀 {name} has passed away..."
  • Evolution: "✨ {name} evolved into a {species}!"

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 15:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,478
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,748
communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,750