Jump to content

  •  

trickyloki3

Member Since 08 Jul 2014
Offline Last Active Mar 31 2016 02:53 AM
*****

#56501 Send automatic emails

Posted by trickyloki3 on 12 May 2015 - 02:56 AM

It is very easy with Python.

 

1. Create an email account

2. Select a SMTP server (Microsoft or Google)

3. Create MySQL user account with select privileges on last login column in login table.

4. Connect to MySQL server using limited privilege MySQL user account with SqlAlchemy (http://www.sqlalchemy.org)

5. Query database and calculate the datetime difference to get timedelta, which gives number of days, hours, and seconds. (https://docs.python....y/datetime.html)

6. Send email via SMTP server for all user's last login > 20 days. (https://docs.python....ry/smtplib.html)

7. Create separate user account on system. (https://pypi.python..../python-crontab)

8. Schedule script on crontab to run on some interval using new user account.

 

Can be done in less than 100 lines. (Unless you want to use the ORM to map all the tables.)

 

Deploy on some cloud instance

1. Buy a cloud instance for $5 per month or less.

2. Setup SSL certificates for MySQL server master and slave. (Self-signed root CA is ok)

3. Setup Iptables to allow cloud instance to connect on MySQL port.

4. Setup MySQL slave replication.

5. Write automation script that use slave replication server. (Which also double as backup)




#53332 ItemDB Script Translation Project

Posted by trickyloki3 on 23 March 2015 - 03:06 AM

Todo

 * Create Visual Studio project for compilation on Windows.
 * Create Autotools for compilation on Unix and Linux.
 * Write guides on how to use the stupid program.



#46185 ItemDB Script Translation Project

Posted by trickyloki3 on 10 November 2014 - 05:56 AM

Update.

 

New project repository: https://github.com/t.../eAdb.Compiler3

 

The project is almost finished.

 

Currently supports eAthena, rAthena, and Hercules databases.

 

Still need to fixed some bugs with porting.

 

Goal: Server Item Database -> Item Script -> [eAdb.Compiler] -> Item Script Description-> Client Tables

 

Dumps all databases into a sqlite3 database (~3MB)

./conv [eathena, rathena, hercules, all]

 

Dumps Hercules databases into sqlite3 database (~1MB)

[Separate compilation 'make hitem' requires compiling and linking Hercules' Libconfig (See 3rdparty/libconfig in Hercules' git repository)]

./hitem

 

Uses athena.db database to generate English translation for item database

./item [eathena, rathena, hercules]




#46165 ItemDB Script Translation Project

Posted by trickyloki3 on 09 November 2014 - 10:30 PM

Currently working on make this project accessible to everyone.

 

Since Hercules uses a modified grammar for libconfig to support <" "> multiline scripts, I can't maintain my current license if I package the modified libconfig library or code with my project.

 

My new plan of action is to write database converters for eAthena, rAthena, and Hercules and dump everything into a sqlite3 database file that comes bundle with the project.

 

This means that if you want the project to work with your custom databases, then you need to run the database converters for your emulator.

This is more difficult with Hercules because you need to build and link the modified libconfig library under 3rdparty/libconfig. (As the standard libconfig-devel does not support <" ">)

 

More soon.




#45837 ItemDB Script Translation Project

Posted by trickyloki3 on 03 November 2014 - 05:14 AM

Hey everyone, the project has reached a point where it can compile a subset of the scripting language.
 
I've attach with the this post a sample of a translation of an rAthena item_db.txt to idnum2itemdesctable.txt. (Support for Hercules coming soon or if some program exist to convert Hercules' databases to rAthena databases.)
 
Warning: (for-loop is not implemented so comment out that one item; official database may contain about ~5 errors) and (pow() handling produces awkward results) and some integer-post processing may be off by one digit.
 
For example, 
Item ID: 13110 
Item Name: Glorious Pistol
Item Script:
bonus2 bAddRace,RC_DemiHuman,55; bonus2 bAddRace,RC_Player,55; bonus2 bIgnoreDefRaceRate,RC_DemiHuman,20; bonus2 bIgnoreDefRaceRate,RC_Player,20; bonus bUnbreakableWeapon,0;if(getrefine()>5) {	 bonus2 bAddRace,RC_DemiHuman,pow(((getrefine()>14)?14:getrefine())-4,2);	 bonus2 bAddRace,RC_Player,pow(((getrefine()>14)?14:getrefine())-4,2);	 bonus2 bIgnoreDefRaceRate,RC_DemiHuman,5;	 bonus2 bIgnoreDefRaceRate,RC_Player,5; } if(getrefine()>8) {	 bonus4 bAutoSpellOnSkill,"GS_RAPIDSHOWER","GS_GLITTERING",1,1000;	 bonus2 bSkillAtk,"GS_RAPIDSHOWER",getrefine()*2;}
 
Item Translation:
Add +55% physical damage against demi-human monsters.Add +55% physical damage against mvp monsters.Pierce +20% physical defense for demi-human monsters.Pierce +20% physical defense for mvp monsters.Weapon is indestructible.Condition [Refine Rate 6 ~ 15] -> Add -121% ~ +121% physical damage against demi-human monsters. -> Add -121% ~ +121% physical damage against mvp monsters. -> Pierce +5% physical defense for demi-human monsters. -> Pierce +5% physical defense for mvp monsters.Condition [Refine Rate 9 ~ 15] -> Add 100% chance of auto-casting Rapid Shower[Lv.1] when using Flip the Coin. -> Increase +18% ~ +30% Rapid Shower damage.

Attached Files




#44874 ItemDB Script Translation Project

Posted by trickyloki3 on 11 October 2014 - 11:51 PM

[font="arial, helvetica, sans-serif;"]ItemDB Script Translation Project
Project License: MIT
Project Site: https://github.com/t.../eAdb.Compiler3[/font]

[font="arial, helvetica, sans-serif;"]Language: C[/font]

[font="arial, helvetica, sans-serif;"]Project Alt Link: http://forum.ratemys...lation-project/
Project Alt Link: http://rathena.org/b...lation-project/
 [/font]

dbro: an item database that uses eadb.compiler http://devilishro.net/ (currently in development)


[font="arial, helvetica, sans-serif;"]Hi everyone,
 
I've developed a complete program that can translate item scripts (consisting of a subset of the scripting language) into English translations.[/font]


[font="arial, helvetica, sans-serif;"]The program is developed to streamline item development and couple the item database with item client tables.[/font]

 

[font="arial, helvetica, sans-serif;"]Please let me know how to improve the project.[/font]

 

[font="arial, helvetica, sans-serif;"]Thank you![/font]

 

[font="arial, helvetica, sans-serif;"]Project Update[/font]
[font="arial, helvetica, sans-serif;"] * Support pet script and pet loyal script.[/font]
[font="arial, helvetica, sans-serif;"] * Support item combo bonus.[/font]
[font="arial, helvetica, sans-serif;"] * Support bonus minimization.[/font]
[font="arial, helvetica, sans-serif;"] * Simplified packages and boxes.[/font]
[font="arial, helvetica, sans-serif;"] * Support project integration; exit-free and memory-leak free.[/font]
[font="arial, helvetica, sans-serif;"] * Support for-loop (limited) w/ iterable set blocks.[/font]
[font="arial, helvetica, sans-serif;"] * Simplify complex expressions.[/font]
[font="arial, helvetica, sans-serif;"] * Support pre-renewal and renewal eAthena, rAthena, and Hercules databases.[/font]
[font="arial, helvetica, sans-serif;"] * Support flavour text and item attribute in final translation.[/font]
[font="arial, helvetica, sans-serif;"] * Support eAthena, rAthena, Hercules idnum2itemdesctable.txt format generation.[/font]
[font="arial, helvetica, sans-serif;"] * Support Hercules' bindonequip, buyingstore, delay, stack, and trade settings.[/font]
 * Support eAthena, rAthena, Hercules itemInfo.lua format generation.
 
Testing
 * Generated itemInfo.lua tested on client 20130807a.
 
Todo
 * Create Visual Studio project for compilation on Windows.
 * Create Autotools for compilation on Unix and Linux.
 * Write guides on how to use the stupid program.
 
[color=rgb(255,0,0);]You can get the latest item description translation over on my project page on [/color][color=rgb(255,0,0);]GitHub[/color][color=rgb(255,0,0);].[/color]
 
[color=rgb(255,0,0);]I've added both the idnum2itemdesctable.txt and itemInfo.lua formats for eAthena, rAthena, and Hercules, including pre-renewal and renewal.[/color]
 
[font="arial, helvetica, sans-serif;"]https://github.com/t.../eAdb.Compiler3[/font]