diff --git a/.gitignore b/.gitignore index 227c809..94ebd45 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ *.lock *target *.db +**.DS_Store +*.DS_Store +/scpt/*.jpeg +/scpt/*.png diff --git a/img/ue-2024-10-31-151413.png b/img/ue-2024-10-31-151413.png new file mode 100644 index 0000000..e8ee7f7 Binary files /dev/null and b/img/ue-2024-10-31-151413.png differ diff --git a/img/ue-2024-11-18-220316.png b/img/ue-2024-11-18-220316.png new file mode 100644 index 0000000..cc0bad0 Binary files /dev/null and b/img/ue-2024-11-18-220316.png differ diff --git a/img/ue-2024-11-18-220359.png b/img/ue-2024-11-18-220359.png new file mode 100644 index 0000000..bc6b6c7 Binary files /dev/null and b/img/ue-2024-11-18-220359.png differ diff --git a/img/ue-2024-11-18-220524.png b/img/ue-2024-11-18-220524.png new file mode 100644 index 0000000..540ae36 Binary files /dev/null and b/img/ue-2024-11-18-220524.png differ diff --git a/img/ue-2024-11-18-220605.png b/img/ue-2024-11-18-220605.png new file mode 100644 index 0000000..c800ac6 Binary files /dev/null and b/img/ue-2024-11-18-220605.png differ diff --git a/img/ue5.5-2024-12-02 093031.png b/img/ue5.5-2024-12-02 093031.png new file mode 100644 index 0000000..cf4675f Binary files /dev/null and b/img/ue5.5-2024-12-02 093031.png differ diff --git a/img/ue5.5-2024-12-02 093116.png b/img/ue5.5-2024-12-02 093116.png new file mode 100644 index 0000000..0d2c649 Binary files /dev/null and b/img/ue5.5-2024-12-02 093116.png differ diff --git a/img/ue5.5-2024-12-02 093118.png b/img/ue5.5-2024-12-02 093118.png new file mode 100644 index 0000000..09f5b36 Binary files /dev/null and b/img/ue5.5-2024-12-02 093118.png differ diff --git a/img/ue5.5-2024-12-02 093119.png b/img/ue5.5-2024-12-02 093119.png new file mode 100644 index 0000000..5584e60 Binary files /dev/null and b/img/ue5.5-2024-12-02 093119.png differ diff --git a/img/ue5.5-2024-12-02 093130.png b/img/ue5.5-2024-12-02 093130.png new file mode 100644 index 0000000..e60e3fa Binary files /dev/null and b/img/ue5.5-2024-12-02 093130.png differ diff --git a/lexicons/ai/syui/game/user.json b/lexicons/ai/syui/game/user.json new file mode 100644 index 0000000..32d57be --- /dev/null +++ b/lexicons/ai/syui/game/user.json @@ -0,0 +1,125 @@ +{ + "lexicon": 1, + "id": "ai.syui.game.user", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": "Record containing a game user.", + "input": { + "encoding": "application/json", + "record": { + "type": "object", + "required": [ + "did", + "createdAt" + ], + "properties": { + "aiten": { + "type": "integer", + "default": 0 + }, + "limit": { + "type": "bool" + }, + "login": { + "type": "bool" + }, + "did": { + "type": "string" + }, + "handle": { + "type": "string" + }, + "gender": { + "type": "string", + "enum": [ + "none", + "male", + "famale" + ] + }, + "charactor": { + "type": "object", + "enum": [ "ai", "chinese", "manny", "quinn", "phoenix", "kirin", "leviathan", "wyvern", "cerberus", "dragon", "kitsune", "pegasus" ], + "properties": { + "type": "object", + "properties": { + "season": { + "type": "integer", + "default": 0 + }, + "group": { + "type": "string", + "default": "origin" + }, + "img": { + "type": "uri", + "default": "https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:4hqjfn7m6n5hno3doamuhgef/bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy@jpeg" + }, + "lv": { + "type": "integer", + "minimum": 1, + "maximum": 7, + "default": 1 + }, + "exp": { + "type": "integer" + }, + "hp": { + "type": "integer", + "maximum": 255, + "default": 0 + }, + "attach": { + "type": "integer", + "minimum": 1, + "maximum": 255, + "default": 0 + }, + "attach_post": { + "type": "integer", + "default": 0 + }, + "critical": { + "type": "integer", + "minimum": 0, + "maximum": 255, + "default": 0 + }, + "critical_d": { + "type": "integer", + "minimum": 0, + "maximum": 255, + "default": 0 + }, + "rank": { + "type": "integer", + "minimum": 0, + "maximum": 7, + "default": 0 + }, + "mode": { + "type": "integer", + "minimum": 0, + "maximum": 3, + "default": 0 + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "Client-declared timestamp when this post was originally created." + }, + "updatedAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/scpt/character.zsh b/scpt/character.zsh new file mode 100755 index 0000000..aed8d8e --- /dev/null +++ b/scpt/character.zsh @@ -0,0 +1,169 @@ +#!/bin/zsh + +function download_character_icon(){ + +t=( + "https://sketchfab.com/3d-models/super-9a80a6d6cf6f4b08906505c7f945d3ce" +) + +t=( +"https://sketchfab.com/3d-models/cerberus-quirky-series-4379b571b5a440119d1ebaddb0711142" +"https://sketchfab.com/3d-models/chinese-dragon-quirky-series-a383d3cf5b004978ac620806558b2924" +"https://sketchfab.com/3d-models/dragon-quirky-series-9a0989aae9b84ebdade28e84a0702a71" +"https://sketchfab.com/3d-models/kirin-quirky-series-b280c8bc5b87471eac1068acc91fdce1" +"https://sketchfab.com/3d-models/kitsune-quirky-series-4fc8b2ade43f4d4bb8a8e6e227f00a62" +"https://sketchfab.com/3d-models/leviathan-quirky-series-002200e1db2c461fbcaa8d2fdac2d766" +"https://sketchfab.com/3d-models/pegasus-quirky-series-a4488ae7a2d2405c927a50f5a8b2d6bb" +"https://sketchfab.com/3d-models/phoenix-quirky-series-1f0a01247b78441ab5b9cf8e9711e78e" +"https://sketchfab.com/3d-models/wyvern-quirky-series-7baad217325a45b4877514b3f5924be9" +) + +for i in $t; do + name=`echo $i|cut -d / -f 5|cut -d - -f 1` + tt=`curl -sL $i|tr ' ' '\n' |grep .jpeg|cut -d '"' -f 2` + normal=`echo $tt|awk "NR==1"` + min=`echo $tt|awk "NR==2"` + if [ ! -f $name.jpeg ];then + curl -sL $normal -o $name.jpeg + fi + if [ ! -f ${name}-min.jpeg ];then + #curl -sL $min -o ${name}-min.jpeg + fi + array+=(`echo $tt|sed "1,2d"|cut -d ";" -f 2|cut -d '&' -f 1|tr '\n' ' '`) + echo $name + for ((i=1; i<=$#array; i++)); do + #echo "Index: $i, Value: ${array[$i]}" + #curl -sL ${array[$i]} -o ${name}-${i}.jpeg + done +done +} + +handle_yui=yui.syui.ai +did_yui=did:plc:4hqjfn7m6n5hno3doamuhgef +token_yui=`cat ~/.config/ai/token.json|jq -r .accessJwt` +host=bsky.social + +case $OSTYPE in + darwin*) + day=`gdate --iso-8601=seconds` + ;; + *) + day=`date --iso-8601=seconds` + ;; +esac + +function create_game_character() { + t=( + ai + chinese + kirin + leviathan + phoenix + wyvern + cerberus + dragon + kitsune + pegasus + ) + + for ((i=1; i<=$#t; i++)); do + created=2001-01-01T00:00:00+09:00 + col=ai.syui.game.character + req=com.atproto.repo.getRecord + url=https://$host/xrpc/$req + + id=$i + name=${t[$i]} + chara=$name + rkey=$chara + repo=$did_yui + json="{\"collection\":\"$col\", \"rkey\":\"$rkey\", \"repo\":\"$repo\"}" + if [ $((RANDOM % 2)) -eq 0 ];then + gender=male + else + gender=female + fi + + case $name in + ai) + gender=none + group=origin + season=0 + ;; + chinese|dragon|cerberus|pegasus|leviathan) + gender=male + group=fantasy + season=1 + ;; + kitsune|phoenix|kirin|wyvern) + gender=female + group=fantasy + season=1 + ;; + *) + continue ;; + esac + + jj=`curl -sL "$url?repo=$repo&collection=$col&rkey=$rkey"` + + link=`echo $jj|jq -r '.value.embed.external.thumb.ref.[]'` + size=`echo $jj|jq -r .value.embed.external.thumb.size` + mtype=`echo $jj|jq -r .value.embed.external.thumb.mimeType` + echo $name + echo $gender + echo https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:4hqjfn7m6n5hno3doamuhgef/$link + + ## upload img + #if [ -f ./${name}.jpeg ];then + # jj=`ai img-upload ./${name}.jpeg` + #elif [ -f ./${name}.png ];then + # jj=`ai img-upload ./${name}.png` + #fi + #link=`echo $jj|jq -r ".blob.ref.[]"` + #size=`echo $jj|jq -r .blob.size` + #mtype=`echo $jj|jq -r .blob.mimeType` + + req=com.atproto.repo.putRecord + url=https://$host/xrpc/$req + + nickname=$name + fullname=$name + uri=at://${did_yui}/$col/$chara + + +json="{ + \"repo\": \"$handle_yui\", + \"did\": \"$did_yui\", + \"collection\": \"$col\", + \"rkey\": \"$chara\", + \"record\": { + \"id\": $id, + \"name\": \"$name\", + \"fullname\": \"$fullname\", + \"nickname\": \"$nickname\", + \"gender\": \"$gender\", + \"season\": $season, + \"group\": \"$group\", + \"embed\": { + \"\$type\": \"app.bsky.embed.external\", + \"external\": { + \"uri\": \"$uri\", + \"thumb\": { + \"\$type\": \"blob\", + \"ref\": { + \"\$link\": \"$link\" + }, + \"mimeType\": \"$mtype\", + \"size\": $size +} } }, \"createdAt\": \"$created\", \"updatedAt\": \"$day\" } }" + + if echo $json|jq . ;then + curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token_yui" -d $json $url + fi + done + +} + +#download_character_icon +create_game_character + diff --git a/verse/img/fantasy.png b/verse/img/fantasy.png new file mode 100644 index 0000000..322b0de Binary files /dev/null and b/verse/img/fantasy.png differ diff --git a/verse/img/mode_ai.jpeg b/verse/img/mode_ai.jpeg new file mode 100644 index 0000000..eaafbf2 Binary files /dev/null and b/verse/img/mode_ai.jpeg differ diff --git a/verse/img/shinka.png b/verse/img/shinka.png new file mode 100644 index 0000000..95653f2 Binary files /dev/null and b/verse/img/shinka.png differ