The CreatorCon Call for Content is officially open! Get started here.

About notifications when certain characters are added

shibasou
Kilo Sage

HI guys.

 

I'm currently having trouble with the notification script.

I want to skip a notification when a specific wording is added to a work note.

Other conditions can be set simply.

 

I don't know how to write a script and I need help.

Thank you.

2 ACCEPTED SOLUTIONS

Harish KM
Kilo Patron
Kilo Patron

Hi @shibasou you can write a advanced script in notification like below

var answer;
var text = current.comments.getJournalEntry(1);
gs.info(text);
if (text.includes("world")) {
    gs.info("true");
    answer= false;
} else {
    gs.info("false");
    answer= true;
}
Regards
Harish

View solution in original post

shibasou
Kilo Sage
if (current.work_notes.getJournalEntry(-1).toString().match(/world/)) {
    answer = true;
} else {
    answer = false;
}
 
In the end, this worked.

View solution in original post

6 REPLIES 6

Thank you!

It worked out thanks to you.

shibasou
Kilo Sage
if (current.work_notes.getJournalEntry(-1).toString().match(/world/)) {
    answer = true;
} else {
    answer = false;
}
 
In the end, this worked.