replaced global vars with local in aitalk, improved probabilities of getting day-related dialogs, corrected email count spelling
This commit is contained in:
@ -20,7 +20,7 @@ OnAiTalk
|
||||
}
|
||||
}
|
||||
|
||||
RandomTalk : nonoverlap_pool
|
||||
RandomTalk : sequential_pool
|
||||
{
|
||||
|
||||
"\0\s[0]Вес на правую ногу.. \w4Лезвие описывает дугу.. \w4И доворачивая правое плечо.. \w4Резкий взмах!\e"
|
||||
@ -102,22 +102,22 @@ low_trust_idle_1
|
||||
*/
|
||||
isProgramRunning
|
||||
{
|
||||
isProgramAvailable = FUNCTIONEX("findwin.dll","find",,_argv[0])
|
||||
isRunning = 0
|
||||
_isProgramAvailable = FUNCTIONEX("findwin.dll","find",,_argv[0])
|
||||
_isRunning = 0
|
||||
|
||||
if isProgramAvailable == 1
|
||||
if _isProgramAvailable == 1
|
||||
{
|
||||
// TODO: check what "getcaption" returns if there are multiple different apps with same class, eg netbeans and minecraft
|
||||
programTitle = FUNCTIONEX("findwin.dll","getcaption",_argv[0])
|
||||
programInstancesRunning = FUNCTIONEX ("findwin.dll","count",,_argv[0])
|
||||
_programTitle = FUNCTIONEX("findwin.dll","getcaption",_argv[0])
|
||||
_programInstancesRunning = FUNCTIONEX ("findwin.dll","count",,_argv[0])
|
||||
|
||||
if _argv[1] _in_ programTitle && programInstancesRunning > 0
|
||||
if _argv[1] _in_ _programTitle && _programInstancesRunning > 0
|
||||
{
|
||||
isRunning = 1
|
||||
_isRunning = 1
|
||||
}
|
||||
}
|
||||
|
||||
isRunning // 'return' keyword breaks this, using implicit return
|
||||
_isRunning // 'return' keyword breaks this, using implicit return
|
||||
}
|
||||
|
||||
OnKeyPress
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
//---------------------------Miscellaneous Functions--------------------------
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
/*
|
||||
@ -223,17 +219,15 @@ OnBIFFComplete
|
||||
}
|
||||
elseif reference0 > 0 && reference0 < 13
|
||||
{
|
||||
"\0\s[0]Ответ от сервера получен, пришло %(reference0) новых писем. Посмотрим?\n\n\![set,autoscroll,disable]\_q"
|
||||
"\0\s[0]Ответ от сервера получен, пришло %( OnCorrectEmailNumberSuffix( reference0 % 10 ) ). Посмотрим?"
|
||||
|
||||
"\0\s[0]Передача данных завершена. На сервере %(reference0) новых писем.\n\n\![set,autoscroll,disable]\_q"
|
||||
"\0\s[0]Передача данных завершена. На сервере %( OnCorrectEmailNumberSuffix( reference0 % 10 ) )."
|
||||
|
||||
"\0\s[0]Письма из Хогвартса там всё ещё нет, но есть %( OnCorrectEmailNumberSuffix( reference0 % 10 ) ) новых писем. Сейчас зачитаю..."
|
||||
|
||||
"\0\s[0]Письма из Хогвартса там всё ещё нет, но есть %(reference0) новых писем. Сейчас зачитаю...\n\n\![set,autoscroll,disable]\_q"
|
||||
--
|
||||
{
|
||||
OnPrintMailAsList(reference7)
|
||||
}
|
||||
--
|
||||
"\e"
|
||||
|
||||
"\n\n\![set,autoscroll,disable]\_q%( OnPrintMailAsList( reference7 ) )\e"
|
||||
}
|
||||
elseif reference0 > 12 && reference0 < 100
|
||||
{
|
||||
@ -245,15 +239,11 @@ OnBIFFComplete
|
||||
|
||||
"\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
|
||||
* _argv[0] - a string of entries in format "SenderName <Sender@email.eg> Message title" separated by SOH(U+0001) chars
|
||||
* returns formatted headers as list
|
||||
* : last modifier will ensure only last return candidate gets returned
|
||||
*/
|
||||
@ -272,13 +262,36 @@ OnPrintMailAsList : last
|
||||
{
|
||||
_letterTitle = "<не указано>"
|
||||
}
|
||||
_letters += "От: %(RE_GETSTR[1]) \nАдрес: %(RE_GETSTR[2]) \nТема: %(_letterTitle)\n\n"
|
||||
_letters += "От: %(RE_GETSTR[1]) \nАдрес: %(RE_GETSTR[2]) \nТема: '%(_letterTitle)'\n\n"
|
||||
}
|
||||
}
|
||||
|
||||
_letters // returning formatted string
|
||||
}
|
||||
|
||||
/**
|
||||
* _argv[0] - number of emails recieved
|
||||
* returns a string representing a correct russian ending for a word "letter" for given number
|
||||
*/
|
||||
OnCorrectEmailNumberSuffix
|
||||
{
|
||||
case _argv[0]
|
||||
{
|
||||
when 1
|
||||
{
|
||||
"одно новое письмо"
|
||||
}
|
||||
when 2-4
|
||||
{
|
||||
"%(_argv[0]) новых письма"
|
||||
}
|
||||
when 0,5,6,7,8,9
|
||||
{
|
||||
"%(_argv[0]) новых писем"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Various error messages that can happen when your ghost tries to connect to an email account. Replace the dialogue as appropriate.
|
||||
OnBIFFFailure
|
||||
{
|
||||
|
||||
@ -5,4 +5,5 @@ You're all she has left. Take a good care of her.
|
||||
|
||||
Repo: https://git.coders-teaparty.cafe/sova/lyuma/
|
||||
Author: sova
|
||||
ping Maggistrator#1995 on discord if she breaks
|
||||
ping Maggistrator#1995 on discord if she breaks
|
||||
Based on the Ghost and Triangle template by Zarla: http://www.ashido.com/ukagaka/
|
||||
Reference in New Issue
Block a user