﻿//reference0 选项名 reference1 函数名 reference2 第一参数名
On_balloon_tooltip
{
    _blocklist = ('Onmusicplay', 'Onchazitai', 'Onzitaicha', 'Onmusicvol',/
        'OnQkeiName','OnQkeilol','Onendi','Onsaika','OnNastolia','OnShowNeiso',/
        'OnJilp','OnJilpBosrc','OnJilpGent','OnSavee','OnLoade','Onkeyword'/
        'Onmusicoka','Onlikethis')
    if reference2 && !ASEARCHEX(reference1,_blocklist)
    { "%(reference2)" }
    elseif ISFUNC("BalloonTooltip.%(reference0)")
    { EVAL("BalloonTooltip.%(reference0)") }
    else
    { "%(reference0)" }
}

//——————————对话函数、卸载显示、翻译函数——————————————
OnAiTalk
{ 
    if !RAND(10) { StartCommunicate }
    else {
        pont++
        Talk
    }
}
On_vanishbutton.visible
{ "0" }
OnTranslate
{
    if "\q[" !_in_ reference0 ; lastTalk = reference0
    if "\q[「" _in_ reference0 ; lastTalk = reference0
    if "⚘" _in_ reference0 ; lastTalk = reference0
    if san < 0 {  REPLACE("\f[color,237,28,36]"+reference0+"喵~","\e","喵~\e") }
}
//——————————写入文件——————————————
Tolog
{ FCHARSET(1) ; if FOPEN('san.log','a') { FWRITE('san.log',Fisfuiu(_argv)); } ; FCLOSE('san.log') ; }
//——————————适应对话框文本居中——————————————
lisL
{ "\_l["+(TOINT((480)/2)-TOINT(GETSTRBYTES(_argv[0],1)*2+66))+",-]"+_argv[0] }
//——————————HTTPpost处理——————————————
//"\![execute,http-post,%(url),--param=%(_argv[0]),--async=%(reference1)    reference4 = 错误代码
OnExecuteHTTPComplete
{ EXIF(ISFUNC(_sus = "Complete."+reference1 ),EVAL(_sus),reference1+" alis") }
OnExecuteHTTPFailure
{ EXIF(ISFUNC(_sus = "Failure."+reference1 ),EVAL(_sus),reference1+" fulus: "+reference4) }
//——————————辅助函数——————————————
wisjikan
{ if STRLEN(_jk=_argv[0])==1 ; TOSTR("0")+TOSTR(_jk) ; else ; _jk }
OnAnchorSelect
{ if ISEVALUABLE(reference0) ; EVAL("Select.%(reference0)") }
OnChoiceSelect
{ if ISEVALUABLE(reference0) ; EVAL("Choice.%(reference0)") }
OnUserInput
{ if ISEVALUABLE(reference0) ; EVAL("Input.%(reference0)") }
OnUserInputCancel
{ if ISFUNC(_s="Inputcel.%(reference0)") ; EVAL(_s) }
//——————————IF、OR——————————————
EXIF
{ if _argv[1] { if _argv[0] ; _argv[1] ; else ; _argv[2] } else { if _argv[0] ; _argv[0] ; else ; _argv[2] } }
OR
{ if _argc { foreach _argv ; _tmp { if _tmp { _tmp ; return }}}}
//——————————字符处理——————————————
Tofuiu
{ REPLACE(REPLACE(TOSTR(_argv),',','\,'),']','\]') }
Fisfuiu
{ REPLACE(REPLACE(TOSTR(_argv),'\,',','),'\]',']') }
//——————————打开操作——————————————
OnOpenlink
{ "\![open,browser,%(OR(_argv[0],reference0))]" }
OnOpenfile
{ "\![open,file,%(OR(Tofuiu(_argv[0]),Tofuiu(reference0)))]" }
srsasa
{
    "안녕하세요"
    "こんにちは"
    "hallo"
    "bonjour"
    "هتاف للترحيب, ‏أهلا"
    "درود"
    "привет"
    "สวัสดีครับ/คะ!"
    ":नमस्ते"
    "你好"
    "泥厚"
    "sa salia"
}
srbaibai
{
    "yasra"
    "安ら"
    "やすら"
    "Lasra"
}




//**** 右键菜单    ------------
//%(CHR(1)) =  ; %(CHR(2))=  ; %(CHR(3))= 
//———从上往下第一个选项———
On_recommendrootbutton.caption
{ srsasa }
On_sakura.recommendsites
{ "/
    作者主页 - 厄尔科斯https://sikan.moe//
    喃语查词https://sikan.moe/alesta.html/
" }
//———从上往下第二个选项————
On_portalrootbutton.caption
{ "推荐网站" }
On_sakura.portalsites
{ "/
    伪春菜https://ssp.shillest.net//
    漢字辭典https://kanji.jitenon.jp//
    文屋AYAYAhttps://emily.shillest.net/ayaya//
    Sakurascripthttp://ssp.shillest.net/ukadoc/manual/list_sakura_script.html/
    文屋（github）https://github.com/YAYA-shiori/yaya-shiori/
    汉化（github）https://github.com/ukatech/ssp-sinicization/
" }
//———从上往下第三个选项————
On_updatebutton.caption
{ "更新(可能失败)" }
//On_sakura.updatebutton
//**** 使魔端右键菜单    --------
On_kero.recommendbuttoncaption
{
"苦しい"
"痛い"
"殺すくたさい"
}
On_aistatebutton.caption
{ "＊我的状态" }
//On_kero.recommendsites
On_shellrootbutton.caption
{ "衣服" }
On_callghostrootbutton.caption
{ "通讯录" }
On_dressuprootbutton.caption
{ "饰物" }
On_closebutton.caption
{ "晚安，%(EXIF(nikname,,'bosrotai'))" }
On_quitbutton.caption
{ "晚安" }



