SiRoCu Posted August 29, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 08/19/17 Last Seen: October 10, 2017 Share Posted August 29, 2017 How can I send some messages to my hotmail box for real-time alert on my mobile from NPC in game when user enter some code into that NPC? Is there a script functions or need to develop and rebuild C source code to do that job? Quote Link to comment Share on other sites More sharing options...
0 crazyarashi Posted August 29, 2017 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 10 hours ago Share Posted August 29, 2017 8 minutes ago, SiRoCu said: How can I send some messages to my hotmail box for real-time alert on my mobile from NPC in game when user enter some code into that NPC? Is there a script functions or need to develop and rebuild C source code to do that job? Have you check this out? :))Email Topic Quote Link to comment Share on other sites More sharing options...
0 SiRoCu Posted August 29, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 08/19/17 Last Seen: October 10, 2017 Author Share Posted August 29, 2017 1 hour ago, crazyarashi said: Have you check this out? :))Email Topic Thank to reply But my server is running on linux box. Need a try. Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted August 29, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted August 29, 2017 The quickest way would be to make the npc write a row to the sql db, use a php script to pull the data and display as an rss feed, use php script to check for new entries and send an email based on what's going on. If you have little to no Web experience I suggest using something like Zapier. However, the correct way to do this would be to add email functionality into the mapserver. Quote Link to comment Share on other sites More sharing options...
0 SiRoCu Posted August 29, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 08/19/17 Last Seen: October 10, 2017 Author Share Posted August 29, 2017 4 hours ago, Akkarin said: The quickest way would be to make the npc write a row to the sql db, use a php script to pull the data and display as an rss feed, use php script to check for new entries and send an email based on what's going on. If you have little to no Web experience I suggest using something like Zapier. However, the correct way to do this would be to add email functionality into the mapserver. Thank you to reply. Well, adding email functionality look like the best solution. Quote Link to comment Share on other sites More sharing options...
0 SiRoCu Posted August 29, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 08/19/17 Last Seen: October 10, 2017 Author Share Posted August 29, 2017 (edited) This is my function in map/script.c Work best with SMTP authentication & mail client on linux box. Useage: sendmail "messages..."; or sendmail("messages..."); ---------------- +Code ---------------- #include<string.h> #include<stdio.h> . . BUILDIN_FUNC(sendmail) { struct npc_data* nd = NULL; const char* str = script_getstr(st,2); if (script_hasdata(st, 3)) nd = npc_name2id(script_getstr(st, 3)); else nd = (struct npc_data *)map_id2bl(st->oid); if (nd != NULL && nd->chat_id) { char message[80]; safesnprintf(message, sizeof(message), "%s", str); char newstr[256]; strcpy(newstr, "echo \""); strcat(newstr, message); strcat(newstr, "\" | mail -s \"Fixed Subject\" [email protected]"); system(newstr); } return SCRIPT_CMD_SUCCESS; } . . BUILDIN_DEF(sendmail,"s?"), Edited August 29, 2017 by SiRoCu Quote Link to comment Share on other sites More sharing options...
Question
SiRoCu
How can I send some messages to my hotmail box for real-time alert on my mobile from NPC in game when user enter some code into that NPC?
Is there a script functions or need to develop and rebuild C source code to do that job?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.