here is my problem:
- I need openkore to send a email when there's 30k of the item "Credit" in my storage.
I searched a lot and not found how openkore can get the amount of an item at storage, so my solution for this is: my macro quits after putting credit into the storage and it keeps 195 credits per time, because credit quest can be done 1 time per day, so if openkore write the amount of times that it stored credits in some txt file, for example it would look in my macro this way:
Code: Select all
do logtxt credit.txt 195
and then make openkore able to read this file, something like this:
Code: Select all
$totalcredits = readlogtxt credit.txt
the "logtxt" console command will also help me logging the date and time after openkore stores credits and close, I already did a bat file than can read a date and time from a txt file and it also can run openkore on the next day after doing credits
About sending email, I found the perl code to send an email, but idk how to use it:
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
# first, create your message
use Email::MIME;
my $message = Email::MIME->create(
header_str => [
From => 'you@example.com',
To => 'friend@example.com',
Subject => 'Happy birthday!',
],
attributes => {
encoding => 'quoted-printable',
charset => 'ISO-8859-1',
},
body_str => "Happy birthday to you!\n",
);
# send the message
use Email::Sender::Simple qw(sendmail);
sendmail($message);
Thanks for reading !