cleared and rewrited shitload of template comments, and added email formatting function

This commit is contained in:
2026-01-26 15:45:05 +08:00
parent f5cdff7abf
commit 8b1eeebab8
6 changed files with 203 additions and 235 deletions

View File

@ -1,7 +1,6 @@
//---------------------------AI Talk--------------------------
//--OnAiTalk
// This is mostly setting up whether or not dialogue is in a chain before it displays.
OnAiTalk
{
@ -27,16 +26,17 @@ RandomTalk : nonoverlap_pool
"\0\s[0]Вес на правую ногу.. \w4Лезвие описывает дугу.. \w4И доворачивая правое плечо.. \w4Резкий взмах!\e"
"\0\s[0]Люма не может петь пока тональный сервер не отвечает. Но ничего. Даже без своей магии Люма всё ещё довольно сильная.\e"
"\0\s[0]О, картошка♪~\w6 и сиропчик,♪~\w6\nВыучить\w2 алгебру\w2 будет вам проще.♪\e"
"\0\s[0]....... \e:chain=low_trust_idle_1"
if timeslot == "earlymorning" // 5 to 8
{
"\0\s[0]Ещё так рано.. Видно ли ещё звёзды из окна, Хозяин?\e"
"\0\s[0]Ещё так рано.. Тебе тоже не спится, %(username)?\e"
}
if timeslot == "morning" // 9 to 11
{
"\0\s[0]Доброе утро, %(username). Как спалось?\e"
"\0\s[0]Вот и начало нового дня. Чем бы заняться?\e"
}
if timeslot == "lunch" // 12 to 2
@ -45,7 +45,7 @@ RandomTalk : nonoverlap_pool
}
if timeslot == "afternoon" // 3 to 5
{
// "\0\s[0]\e"
"\0\s[0]Скоро время пятичасового чая. Сделаем перерыв?\e"
}
if timeslot == "evening" // 6 to 8
{
@ -53,11 +53,13 @@ RandomTalk : nonoverlap_pool
}
if timeslot == "latenight" // 9 to 12
{
"\0\s[0]Люма не может уснуть, так что пока посидит с хозяином\e"
"\0\s[0]Люма не может уснуть.. Побудешь со мной, %(username)?\e"
}
if timeslot == "midnight" // 12 to 5
{
"\0\s[0]\w4.\w4.\w4.\w8А? Что? Нет, Люма не спала..\e"
"\0\s[0]%(username), пора спать! Завтра опять проспишь до пяти вечера!\e"
}
if isProgramRunning("SunAwtFrame","Apache NetBeans IDE")
@ -86,6 +88,13 @@ RandomTalk : nonoverlap_pool
}
low_trust_idle_1
{{CHAIN
"\0\s[0]*Зыыыыыыыыыыыырк...*\e"
"\0\s[0]*Интересно, чем он занимается...*\e:chain=end"
}}CHAIN
/*
* _argv[0] - window class name, find it out using external means
* _argv[1] - window name(or part of it) like "Eclipse" or "NetBeans"

View File

@ -18,19 +18,6 @@ OnDressupChanged
*/
//*********************Advanced User Info*******************************
//--A Note about Functions--
//A function that begins with On, such as OnFirstBoot here, can be called from anywhere in any .dic file by using \![raise] or by just sticking OnFunction somewhere. A function that does NOT start with On, however, can be a bit finicky. You can create your own functions all over the place if you want, there's just a difference between OnDoodlebop and Doodlebop, if you get me. See the walkthrough page about coding for more about creating functions.
//If you're having trouble getting a function of yours to run, like Doodlebop, try changing it to OnDoodlebop and see if that fixes it.
//***********************************************************************
//--OnFirstBoot--
//OnFirstBoot is, as you can probably guess, what happens when your user first boots up your ghost. This will only run the first time they are booted!
//*********************Advanced User Info*******************************
//Because this only runs once and under an odd set of circumstances, it can be hard to test if this function is working properly. Trying to run the entire function using \![raise,OnFirstBoot] will instead bring up your alternate dialogue, so sadly you can't check it that way. You CAN get it to run using \![raise,OnFirstBoot,0] though.
@ -467,30 +454,23 @@ OnClose
//-------------------------State Changing--------------------
//From here on, most of the dialogue will have to do with changing shells, ghosts, or states in some way. You only need to fill in the ones you think you'll see. The template default dialogue will take care of the rest.
//--OnWindowStateMinimize
OnWindowStateMinimize
{
"\0\s[0]Люма будет рядом, хозяин\w4\e"
OnWindowStateMinimize
{
// Window minimize should happen uninterrupted, as user is probably needs to do it quickly
// "\0\s[0]Люма будет рядом, хозяин\w4\e"
}
//--OnWindowStateRestore
OnWindowStateRestore
{
"\0\s[0]Хозяин, Люма вернулась\w4\e"
"\0\s[0]Здеесь..~\w4\e"
"\0\s[0]Пам-пака-пааам..~\w4\e"
}
//--OnGhostChanging
//This runs whenever you change or reload the ghost. You can change ghosts by going into the right click menu and going to Change Ghost, but this dialogue will also be called if you reload them using Utilities->Reload Ghost or the Developer's Console->Reload->Ghost. Protip: If you are going to make a ghost, you will be reloading it A LOT.
//Note: If you reload your ghost using the developer console instead of Utilities->Reload Ghost, it won't do this dialogue, so don't freak out if it doesn't show up.
/**
* Function called whenever user changes or reloads the ghost.
* reference0 - string specifying ghost you are calling, might be Lyuma herself if she's reloaded, mainly while debugging
*/
OnGhostChanging
{
if reference0 == "Lyuma"
@ -500,19 +480,16 @@ OnGhostChanging
else
{
"\0\s[0]Люма позовёт %(reference0)\w8\w8\e"
//Replace this dialogue with whatever you like. Notice the use of the %(reference0) envelope here? In OnGhostChanging, %(reference0) stores the name of the ghost being swapped to, so if you want to display what you're switching to, you can use %(reference0) as in this example. You don't have to use %(reference0) if you don't want to though.
}
}
//--OnGhostChanged
//A sister to the above, this runs after the ghost has either reloaded itself, or when you switch from another ghost to this ghost.
/**
* Function called after ghost reload or if user switches from another ghost to Lyuma
* reference0 - string parameter specifying previous ghost, might be Lyuma herself if its a ghost reload rather then actual character swap
*/
OnGhostChanged
{
"\0\s[0]\1\s[10]" //this sets up their default poses
"\0\s[0]\1\s[10]" //Set up default poses for sakura and kero
--
if reference0 == "Lyuma"
{
@ -522,10 +499,12 @@ OnGhostChanged
{
"\0\s[0]Пока, %(reference0)...\e"
//Again, %(reference0) in this function is the name of the ghost in question. As above, replace these two lines of dialogue what what'd be appropriate for your ghost.
}
}
// PILE OF UNREFACTORED CODE BELOW ---
//--OnShellChanging

View File

@ -1,39 +1,20 @@
//This sets the character set for your ghost. Most Japanese ghosts are set to Shift-JIS, but yours will be UTF-8. Don't mess with this.
charset,UTF-8
//The name of your ghost is what will be displayed when you are loading your ghost or switching to it, and also how it is referred to in certain functions. Usually this will be "Character and character" or just "Character" depending on your ghost. The type of the ghost will be ghost, obviously, leave that alone.
charset,UTF-8
name,Lyuma
type,ghost
//This defines which is the main character and which is the side character. The main character of a ghost is referred to as "sakura" by the code, and the side character as "kero". If you see these names in the functions, that's who they are referring to. Replace the names as you need.
sakura.name,Lyuma
kero.name,Triangle
//This is the information about you, the creator of your ghost! Put in your name or whatever alias you want and whatever website you'd like to link to.
//You may be wondering why there's both craftman and craftmanw. Well, craftmanw is for non-alphanumeric characters like Japanese, Chinese, Korean, Russian, Arabic, things like that. So if your name is, say, 大嶋啓之, then you'd want to put that in craftmanw. Then you'd put your name in alphanumeric characters in craftman. If you want, you can delete craftmanw if you're not going to use it. Don't delete craftman though.
craftman,sova
craftmanw,sova
craftmanurl,https://coders-teaparty.cafe/
//This is coding stuff, don't touch it.
sstp.allowunspecifiedsend,0
shiori,yaya.dll
//This next bit defines what icon your ghost will use in your taskbar.
//To make an icon file, draw yourself a 16x16 image for your ghost and save it as a png. You can use http://www.convertico.com/
// Taskbar icon, must be 16x16
icon,lyuma.ico
//If you have a special balloon for your ghost, you can set it here with balloon, which will highlight it in the Change Balloon menu so it'll be easier to find.
// Defining a balloon here, so it displays in the baloon selection menu.
balloon,z_simple

View File

@ -1,6 +1,8 @@
//---------------------------Miscellaneous Functions--------------------------
//This .dic file is concerned with a number of functions that didn't quite fit in anywhere else. If you're adding new functions, this may be the place to do it! This also has the functions related to updating your ghost, among others. Most of this will just be replacing simple placeholder dialogue with dialogue more appropriate for your ghost.
/**
* Bunch of misc functions for all kind of options
*/
//This is basically bonus features and flavor text for a few of the more uncommon functions of a ghost. You don't HAVE to fill these out if you don't want to, the template's default dialogue will handle it (assuming you're making a two person ghost... if not, you may have to go through and remove Triangle's dialogue tags so he doesn't appear when you don't want him to). So if this file is boring or intimidating or you don't care, you can ignore it! These are again edge-cases compared to how often you'll see aitalk, bootend, or menu dialogue instead.
@ -53,221 +55,231 @@ OnShellScaling
OnFileDrop2
*/
//You can guess at what each function does by its name for the most part. You can go through and find the functions that seem the most interesting, or the most likely, to appear and then just fill those out if you don't want to do all of them. Or, if you want to go full nuclear, you can just wipe this whole file and let SSP's default dialogue handle whenever these scenarios come up. It depends on what you have the energy for and how thorough you want to be.
// Don't let this be a roadblock for you! It's basically bonus material! What matters is your aitalk file more than anything. You can always come back to this and fill it out over time once your ghost is already published. Don't get stuck here! I know it's easy to do so but don't let it happen to you! If you're getting stuck here just walk out, you can leave! lol. There's always aitalk, bootend, and menu to have more fun with, and that's the dialogue your user is going to see the most often.
//This file IS long, but you'll only have to do it once! Probably. And again, you don't have to do all of it, or even most of it if you don't want to. Don't let this be a roadblock for you! It's basically bonus material! What matters is your aitalk file more than anything. You can always come back to this and fill it out over time once your ghost is already published. Don't get stuck here! I know it's easy to do so but don't let it happen to you! If you're getting stuck here just walk out, you can leave! lol. There's always aitalk, bootend, and menu to have more fun with, and that's the dialogue your user is going to see the most often.
//Make sure to read the walkthrough page (http://www.ashido.com/ukagaka/walkthrough.html) for more details about how to properly format ghost dialogue!
//I will reiterate that you should be editing these in Notepad++, and in particular, you should set the Language to C (or Java I guess) to properly highlight all the text. It will make things A LOT EASIER for you, trust me! It will also help you keep track of your brackets in case you forget some. If you click on a line with a bracket in Notepad++, it should highlight where the other bracket ends, or turn purple if there's no finishing bracket (which you should definitely fix!)
//It will also highlight my commented lines in green, so you'll know where they are. Any line beginning with // is a commented line that the code will not read. It's just for your reference!
//If you see a big block of commented text you want to uncomment, highlight the text and then hit ctrl-shift-k in Notepad++ and that should uncomment it. Mostly this is intended for advanced users.
//---- OnInstallBegin -------------------------------------------------------
//OnInstallBegin is called when a file with an included install.txt is dropped on your ghost. This primarily means things like .nar files for other ghosts or .zip files containing balloons or shells for your ghosts. Primarily ghost-related things. Replace as you want.
/**
* OnInstallBegin is called when a file with an included install.txt is dropped, either .nar containing another ghost or .zip containing baloon or shell
*/
OnInstallBegin
{
"\0\s[0]This is the beginning dialogue for installing a file. This zip or nar contains an install.txt file.\e"
"\0\s[0]Установочный файл? Интересно, что внутри..\e"
}
//---- OnInstallComplete -------------------------------------------------------
//OnInstallComplete runs once the file above has finished installing.
/**
* OnInstallComplete runs once the file above has finished installing.
* reference0 - string with archive type. Can be "shell", "ghost", "balloon", "plugin", "calendar skin", "headline", or "rss".
* reference1 - string shell/ghost name as defined in descript.txt
*/
OnInstallComplete
{
"\0" //this means your main character will be speaking first, therefore the \s[] at the beginning of each line will be defining your main character's pose.
"\0" //this means sakura will be speaking first, therefore the \s[] at the beginning of each line will be defining sakura pose.
--
if reference0 == "shell" //This is checking to see if what you installed is classified as a shell in the install.txt. Remember the line in install.txt that said type,ghost or type,shell? This is why that line is important, that's what tells the program what it's installing like so.
if reference0 == "shell"
{
if reference1 == "Hypothetical Shell that doesn't actually exist" //This is the name of your shell as you defined in descript.txt in the shell folder.
if reference1 == "Mockup Shell"
{
"\s[0]Installed Hypothetical Shell. Truncated for space.\e"
//Replace if needed.
"\s[0]Does it really exists?\e" // a mockup
}
elseif reference1 == "Another totally real shell wow" //As in other files, you can use elseif to expand a list like this to include as many shells as you have or think you'll make. See bootend.dic for more details about elseif.
else
{
"\s[0]Installed another totally real shell.\e"
//Replace if needed.
}
else //For any other shell they may install.
{
"\s[0]Installed a new shell. It's called %(reference1).\e"
//%(reference1) here would be the name of the shell they installed. Replace if needed.
"\s[0]Хмм.. все проверки пройдены, целостность архива подтверждена, шелл %(reference1) установлен, %(username).\e"
}
}
elseif reference0 == "ghost" //if the type of the file they're installing is a ghost.
elseif reference0 == "ghost"
{
"\s[0]Installed a new Ghost. It's called %(reference1).\e"
//Reference1 here would be the name of the ghost. Replace as needed.
"\s[0]Все проверки пройдены, целостность архива подтверждена, поздоровайся с %(reference1), %(username). Ты тоже не стисняйся, %(reference1), скажи 'привет'!\e"
}
elseif reference0 == "balloon" //if the type of file is a balloon
elseif reference0 == "balloon"
{
"\s[0]Installed a new balloon. It's called %(reference1).\e"
//Reference1 here would be the name of the balloon. Replace as needed.
"\s[0]Новый баббл - '%(reference1)' - успешно установлен. Опробуем его?\e"
}
elseif reference0 == "plugin" //if the type of file is a plug-in
elseif reference0 == "plugin"
{
"\s[0]Installed a plug-in. It's called %(reference1).\e"
//Reference1 here would be the name of the plug-in. Replace as needed.
"\s[0]Закончила, плагин '%(reference1)' успешно установлен. А что он делает?\e"
}
elseif reference0 == "calendar skin" //if the type of file is a calendar skin
elseif reference0 == "calendar skin"
{
"\s[0]Installed a calendar skin. It's called %(reference1)."
"\s[0]Та-даа! Новый дизайн календаря - '%(reference1)'. Если бы у Люмы была стена, она бы повесила новый календарь на стену, чтобы смотреть на него каждый день~"
}
elseif reference0 == "headline" //if the file/url you drop on them is counted as a headline. To be honest with you I don't know what determines whether a url is a headline or what.
elseif reference0 == "headline"
{
"\0\s[0]Set up a headline. It's called %(reference1).\e"
"\s[0]Все проверки пройдены, целостность файла подтверждена, хэдлайн '%(reference1)' успешно добавлен.\e"
}
elseif reference0 == "rss" //this is more clearly for when you drag an rss feed onto your ghost. you can find rss feeds on sites by looking for the little rss icon, it kind of looks like a little satellite. you can google more info on rss feeds if you're curious! They're neat!
elseif reference0 == "rss"
{
"\0\s[0]Set up an RSS feed. It's called %(reference1).\e"
"\0\s[0]Новая RSS лента '%(reference1)' успешно добавлена! Теперь Люме будет не так скучно, когда она остаётся одна. Посмотрим, что там нового?\e"
}
else //for any other file they'd install
else
{
"\s[0]Installed %(reference1)."
}
}
//---- OnInstallFailure -------------------------------------------------------
//If the file you dropped fails to install for one reason or another.
/**
* If the file user dropped fails to install for one reason or another.
* reference0 - reason for the error, e.g. "unsupported" or "extraction"
*/
OnInstallFailure
{
"\0\s[0]The installation has failed.\n\n[half]\w5" //this first bit of dialogue begins the explanation of what happened. You can replace this with an appropriate intro statement.
"\0\s[0]Ой, установка сорвалась..\n\n[half]\w5"
--
if reference0 == "unsupported" //These if statements determine how it happened to finish the piece of dialogue. This checks if the reason it failed is because it was unsupported.
if reference0 == "unsupported"
{
"This file is unsupported.\e"
//Replace with whatever dialogue for an unsupported file you may come up with.
"Кажется, SSP не поддерживает этот вид файлов..\e"
}
elseif reference0 == "extraction" //This checks if the file didn't extract properly.
elseif reference0 == "extraction"
{
"The file could not be extracted properly.\e"
//See above but for a failed extraction.
"Что-то не так с архивом - не получается его распаковать.\e"
}
}
//--OnInstallRefuse
//If the file you dropped can't be installed with this ghost.
/**
* If the file user dropped can't be installed with this ghost.
* reference0 - name of the ghost this resource is intended for, as listed in install.txt file. e.g. shell, dropped on Lyuma, that belongs to some other ghost.
*/
OnInstallRefuse
{
"\0\s[0]Can't install this. \w4It may be for %(reference0) instead.\e"
//reference0 in this function refers to the ghost this file is associated with, probably the name of the ghost listed in its install.txt file. You would see this if you dropped a shell made for a different ghost on your current ghost, for example. They can't install a shell for themselves they can't use, right? Anyway, replace this with what you wish, you can use the reference0 envelope or not if you want.
"\0\s[0]Люма не может это использовать. \w4Может, %(reference0) знает что с делать с этим файлом?\e"
}
//**** Uninstallation ******************************************
//You may have noticed in the configuration menus in menu.dic an option to turn Uninstall on or off, as well as a greyed out option to uninstall in the right click menu. These following functions relate to the uninstallation process when it's on. Replace the dialogue in each function as we go along.
//--OnVanishSelecting
//When you select the uninstall option in the menu.
/**
* Initiate uninstallation
*/
OnVanishSelecting
{
"\0\s[0]The user is deciding whether or not to uninstall us.\w8\1\s[10]If you're testing this, be careful about what you click here, huh?\e"
}
{
"\0\s[0]Эта опция сотрёт Люму из твоей системы, %(username).\e"
}
//OnVanishSelected
//When you decide to uninstall them.
/**
* Uninstallation confirmed
*/
OnVanishSelected
{
"\0\s[0]The user has decided to uninstall us. Bye.\w9\w9\e"
}
//--OnVanishCancel
//If you select Uninstall from the menu, but decide not to do it.
{
"\0\s[0]Пока-пока, спасибо за всё время вместе\w9\w9\e"
}
/**
* Uninstallation cancelled
*/
OnVanishCancel
{
"\0\s[0]The user has decided not to uninstall us after all.\e"
}
//--OnVanishButtonHold
//This should trigger if you double click the ghost's balloon in the middle of OnVanishSelected above. So it basically cancels their uninstallation. I'd be pretty careful about testing this, and I'd probably just put the line of dialogue into their script input and test it that way instead.
{
"\0\s[0]Не будешь удалять? Люма рада, что ей можно пожить ещё\e"
}
/**
* This should trigger if the user double clicks the ghost's balloon in the middle of OnVanishSelected above, effectively cancelling their uninstallation.
* Wierd scenario I don't paricluarily intend to comment.
*/
OnVanishButtonHold
{
"\1\s[10]This dialogue displays when the user double clicks on the balloon when we're saying we're going to uninstall ourselves.\e"
}
{
//"\1\s[10]This dialogue displays when the user double clicks on the balloon when we're saying we're going to uninstall ourselves.\e"
}
//---- OnVanished -----------------------------------------
//OnVanished is a weird little function. Basically, if you uninstall a ghost, it'll automatically go back to the last ghost you were using. They'll then say this line of dialogue about the ghost you just uninstalled. This is very annoying to test as you can imagine! But unlikely to come up super often, I bet. Make sure to set up both their poses immediately so they both appear when it switches back to them.
/**
* If the user uninstalls a ghost, it'll automatically go back to the last ghost you were using.
* The ghost appeared will say this line of dialogue about the ghost you just uninstalled.
* reference0 - name of the deleted ghost
*/
OnVanished
{
"\0\s[0]\1\s[10]%(reference0) has been uninstalled.\w8\0\s[0]Harsh.\e"
//reference0 here is the name of the other ghost.
}
"\0\s[0]Пока, %(reference0).\e"
}
//**** Mail Checking *******************************************************************
//The next set of functions have to do with checking your email. This function is a slippery little thing - I've had people test it following my directions and have it work, but I've never actually gotten it to report back the right amount of emails myself. Very frustrating. But perhaps you'll have more luck with it, haha.
//Girl and Triangle can't actually read your email, they can just tell you how many emails you have. I've seen ghosts that can read the HEADERS of email, but I still don't think ghosts can actually display the contents of an email. You should be using your actual email client for that. It's still kind of a neat feature though.
//*********************Advanced User Info*******************************
//These text boxes are meant for those who have an interest in expanding or using more complicated functions in their ghost. Also for my own reference in the future since I plan on using this template too, haha. If you have no interest in any of this and just want to keep things as simple as possible, feel free to skip these boxes.
//If you want to set up your ghost to check your mail so you can more easily check these messages instead of just writing the dialogue and moving on, it's a little bit tricky, but not super hard.
//Basically, you're going to need to find your POP settings for your email account. Googling your provider + POP should bring it up pretty quick. Once you have the info, you'll go to the right click menu, options, then preferences. A big menu should pop up, and you should see POP in the left side. Click that, and input all the info from the POP page you looked up for your account. Tell your ghost to check your email, and if it works, then congratulations!
//***********************************************************************
//---- OnBIFFBegin ---------------------------------------------------------------
//When you first tell the ghost to check your email. An intro statement, if you will. Replace with whatever you like.
/**
* When you first tell the ghost to check your email. An intro statement, if you will.
* reference2 - name of the server being checked
*/
OnBIFFBegin
{
"\0\s[0]This is the starting dialogue for checking email.\e"
"\1\s[10]This is another starting dialogue for checking email.\e"
"\0\s[0]Ага, предоставь это Люме.\e"
"\0\s[0]Почта? Сейчас проверю.\e"
"\0\s[0]\f[name,Hymmnos,hymmnos.ttf]\f[height,16]j.w. mea ADDR => \f[default]\n\n%(reference2)\e"
}
//---- OnBIFFComplete ---------------------------------------------------------------
//After they've succeeded in checking your mail, they'll report back with how many new emails you have. Replace the dialogue with whatever would be character appropriate.
/**
* Email number successfully retieved.
* reference0 - number of emails
* reference2 - name of the server being checked
* reference7 - the senders and titles delimited by C_BYTE1 characters
* see: https://ukagakadreamteam.github.io/ukadoc/manual/list_shiori_event.html
*/
OnBIFFComplete
{
if reference0 == 0 //If you have no new mail.
if reference0 == 0
{
"\0\s[0]There is no new mail.\e"
}
elseif reference0 == 1 //If you have one new email.
{
"\0\s[0]There is one new email.\e"
}
elseif reference0 > 1 && reference0 < 11 //If you have more than one email but less than eleven.
{
"\0\s[0]There are %(reference0) emails.\e"
//reference0 here stores the amount of new email it finds.
}
elseif reference0 > 100 //If there are over one hundred new emails.
{
"\0\s[0]There are %(reference0) emails unread.\w8\1\s[10]Woah.\e"
}
else //For any other number of emails.
{
"\0\s[0]There are %(reference0) emails.\e"
}
}
"\0\s[0]%(username), в ящике пусто. Наверное лучше проверить позже.\e"
//---- OnBIFFFailure ---------------------------------------------------------------
//Various error messages that can happen when your ghost tries to connect to an email account. Replace the dialogue as appropriate.
"\0\s[0]Ничего нового.\e"
}
elseif reference0 > 0 && reference0 < 13
{
"\0\s[0]Ответ от сервера получен, пришло %(reference0) новых писем. Посмотрим?\n\n\![set,autoscroll,disable]\_q"
"\0\s[0]Передача данных завершена. На сервере %(reference0) новых писем.\n\n\![set,autoscroll,disable]\_q"
"\0\s[0]Письма из Хогвартса там всё ещё нет, но есть %(reference0) новых писем. Сейчас зачитаю...\n\n\![set,autoscroll,disable]\_q"
--
{
OnPrintMailAsList(reference7)
}
--
"\e"
}
elseif reference0 > 12 && reference0 < 100
{
"\0\s[0]%(reference0) новых писем, довольно много. Давай не будем читать каждое.\e"
}
elseif reference0 > 99
{
"\0\s[0]%(reference0) новых писем? %(username), давно ты в последний раз проверял свой почтовый ящик?\e"
"\0\s[0]%(reference0) новых писем. Наверное, тебе всё таки стоит начать их читать.\e"
}
else
{
"\0\s[0]Пришло %(reference0) новых писем, %(username).\e"
}
}
/**
* Function that prints a string of email senders and titles as unordered list
* _argv[0] - a string of entries in format "SenderName <Sender@email.eg> Message title" separated by C_BYTE1 chars
* returns formatted headers as list
* : last modifier will ensure only last return candidate gets returned
*/
OnPrintMailAsList : last
{
_headers = SPLIT(_argv[0],"")
_letters = ""
_headerRegex = "\s*(\S+)\s*<([^>]+)>\s(.*)" // Name <email@example.com> Message title
foreach _headers; _header
{
if RE_MATCH(_header,_headerRegex) > 0
{
_letterTitle = SHIORI3FW.EscapeAllTags(RE_GETSTR[3])
if RE_GETSTR[3] == ""
{
_letterTitle = "<не указано>"
}
_letters += "От: %(RE_GETSTR[1]) \nАдрес: %(RE_GETSTR[2]) \nТема: %(_letterTitle)\n\n"
}
}
_letters // returning formatted string
}
//Various error messages that can happen when your ghost tries to connect to an email account. Replace the dialogue as appropriate.
OnBIFFFailure
{
if reference0 == "timeout" //If the connection times out.
@ -290,7 +302,7 @@ OnBIFFFailure
//reference0 here stores the error message the email server would have given the ghost, hopefully.
}
}
}
//**** Network Update *****************************************************************
@ -338,7 +350,7 @@ OnUpdateComplete
{
"\1\s[10]Update successful!\e"
}
}
}
//---- OnUpdateFailure -------------------------------------------------------------
//Error messages if the update process fails in some way.

View File

@ -1,18 +1,4 @@
//---------------------------Menus--------------------------
//This .dic file is primarily concerned with the double-click menus for each of your ghosts. If you don't want to have menus for your characters, you'd just have to delete the OnMouseDoubleClick functions near the end of mouse.dic and then ignore this file, as none of it will be called I believe. Menus can be cool though, since you can put stuff in them and create new functions if you know what you're doing. For example, I've added a lot of games and interactions and little linked icons to my Hunter Smoker ghost to keep track of their feelings and such. Much of that is pretty complicated though (and kind of messy, cough), so I won't go into it here, but I covered some of the concepts in the coding page of the walkthrough, and enterprising ghost makers can study the menu.dic file I set up for Hunter/Smoker and see how I put it together.
//The complexity of this file depends on how customized you want your menus. If you just want to leave them as they are, then all you'll have to do is replace dialogue appropriately. Many of the options here can be ignored if you don't care. You only have to fill in the things that interest you! The default template dialogue will handle anything you don't. If you get bored or tired, you can skip a lot of these if it comes down to it. You can always go back and fill them in later too. Your ghost will function fine either way!
//And of course, this file will always be waiting for you when you've gotten more familiar with ghosts and want to add cool features! It can be a flexible playground, but don't feel too stressed out about it. As mentioned, just fill in what comes to you and the template dialogue will cover the rest.
//Make sure to read the walkthrough (http://www.ashido.com/ukagaka/) for more details about how to properly format ghost dialogue!
//I will reiterate that you should be editing these in Notepad++, and in particular, you should set the Language to C (or Java I guess) to properly highlight all the text. It will make things A LOT EASIER for you, trust me! It will also help you keep track of your brackets in case you forget some. If you click on a line with a bracket in Notepad++, it should highlight where the other bracket ends, or turn purple if there's no finishing bracket (which you should definitely fix!)
//It will also highlight my commented lines in green, so you'll know where they are. Any line beginning with // is a commented line that the code will not read. It's just for your reference!
//If you see a big block of commented text you want to uncomment, highlight the text and then hit ctrl-shift-k in Notepad++ and that should uncomment it. Mostly this is intended for advanced users.
//--OpenSakuraMenu
//This is a bit of intro dialogue before the main character opens their menu. You can see below that there are three pieces of separate dialogue listed before it goes to MenuRun. The character will randomly choose one of those pieces of dialogue before opening the rest of their menu. You can customize this with individual greetings for the character, such as "Yes, %(username)?" or "Need something, %(username)?" or things like that. Note that none of the lines end with \e!
@ -21,21 +7,20 @@
OpenSakuraMenu
{
"\0\s[0]\b2This is the first random menu open dialogue."
"\0\s[0]\b2This is the second random menu open dialogue."
"\0\s[0]\b2This is the third random menu open dialogue."
"\0\s[0]\b2А?"
"\0\s[0]\b2Чем Люма может помочь, %(username)?"
--
MenuRun
}
//--MenuRun
//As you just saw above. This actually fills out the rest of the menu. If you're going to be adding or changing functions, this is where you'll be doing your edits.
// This actually fills out the rest of the menu. If you're going to be adding or changing functions, this is where you'll be doing your edits.
MenuRun : all
{
wd = GetWeekDay
ap = GetAP
//These four statements basically get the day of the week, whether it's AM or PM, the hour, and the time. It's putting together the information to display the time at the bottom of the balloon. Pay it no mind.
//These four statements basically get the day of the week, whether it's AM or PM, the hour, and the time. It's putting together the information to display the time at the bottom of the balloon.
--
"\n\n\_q\b2" //The \n\n means two new lines as detailed in the walkthrough, and \_q means quick session, meaning all the text from this point on will display instantly instead of a few letters at a time like normal ghost dialogue. You can ignore it.
--
@ -53,8 +38,6 @@ MenuRun : all
--
"\![*]\q[Say something,OnAiTalk]\n"
//"\![*]\q[Say something 2,OnAiTalk]\n"
//This option will force the ghost to say something from aitalk if the user clicks it. Just replace "Say something" with whatever caption you think would be appropriate.
//Advanced users, you can add multiple captions for any option you add to a menu you make just like this, as long as you separate it from the other options into its own section with two dashes above and below. Note that you can't do this if the Function above has ": all" after it, since that will put every potential option in. You'll have to set it your menu up differently to take --s into account. I commented it out here because of ": all" above, but you can see the basic idea.
--

View File

@ -1,6 +1,10 @@
charset,UTF-8
// important so SSP can detect type of the archive and pass it to all kind of callbacks
type,ghost
name,Lyuma
directory,lyuma