• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Castro AAC

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,557
Solutions
8
Reaction score
957
Location
Spain
Castro is a high performance content management system for Open Tibia servers. Supporting newest TFS schema at the moment.

g8MiOwo.png

Thanks to @LordVissie for the image

Main Features
  • Extensible and solid lua support. Create your own logic using exclesively lua. Everything you need is exposed by Castro.
  • High performance. Great response times. Using Go standard HTTP library. Each request is a new green thread.
  • Self-contained application. Castro contains its own HTTP server
  • Simple installation. This process is almost one click. Everything is gathered from your config and map files.
  • Plugin manager. Manage your extensions through Castro itself.
  • Out of the box mail sending. Easy to use mail sending functions with lua
  • Clean templates. Logic is separated from templates. No more messy homepages
  • Security. No more sqli or XSS issues. The lua bindings use prepared statements and the templating engine outputs safe content by default.
Shop Features
  • Fully customizable web shop.
  • PayPal support using REST API.
  • PayGol support.
Security Features
  • All OWASP headers are covered.
  • Fully customizable Content Security Policy.
  • Prepared statements are a must. Template engine auto-escapes all data. Nothing to worry about.
  • Auto SSL from LetsEncrypt.


Installation

At your first Castro start-up you will be asked where your server directory is located. After that Castro will execute the required SQL statements and create your config file. The installation process will also look for any non-castro account and convert it.

Castro will also parse your map for the first time (this may take longer on low-end systems with big maps) and create a map.castro file. This file contains your map towns. If you ever change your towns please delete this file so a new one takes the place.

Configuration

The main configuration file is very straight-forward to use. All keys that need to be random are generated at the installation process.


To know more about Castro please head to the github page. Contributing is always welcome
 
Last edited:
Glad to see you are back in business again @Raggaer !! Looks really good so far, really like how you can run the AAC via a .exe haha, sick :D
I am sure this AAC will be a success, he is a great programmer!

Good luck :)
 
Looks awesome and will be great for newcommers. Just wonder, will it work on Linux aswell? And love the idea of lua coding
 
As for the LUA bindings well there are currently two options
  • Add support for LUA at the cost of speed
LUA VM in Go is no the fastest so for very large scripts this can make the page load slower

  • Add support for JavaScript scripting instead of LUA
JavaScript also got an easy syntax and the Go compiler seems to be faster compared to the LUA one. So I want to know...

LUA support or JS support?

I know more people here use LUA than JS but I want some input on this. Im voting for LUA since I think a few ms of slower page load (talking on big scripts) doesnt really matter?
 
I would say lua, since our community is based on c++ and lua coding.

Even tho i know basic of Java
 
Why the whole aac same style ,
we need more changes :(

Dont base your opinions on these pictures. Im not a designer and I know theres a lot to be improved

However you are welcome to help me make a good theme =)
 
Dont base your opinions on these pictures. Im not a designer and I know theres a lot to be improved

However you are welcome to help me make a good theme =)

That's really nice aac :)
btw i don't know how to make a good theme too :D

Keep it up :) :p
 
Okey so I figured how to LUA system will work
  • You will require modules that contain functions
I made a quick example showing how will work:

We have a custom page called test.html so folder should look like this

FHin-u40G.png


test.lua

PHP:
local account_module = require("account")
if(account_module.isLogged() == false) then
    print("Account is not logged in!")
end

And thats it! the script is called BEFORE the template rendering.
So as the LUA script says when visiting /custom/pages/test if you are not logged it will print to console

gazuPboP1.png


Of course this is just a showoff I plan to add more features (even sql querys) so users dont need to touch the core of the AAC and sharing custom pages is super easy!
 
Last edited:
I dont plan to spam :p

I made several layout changes and this is how th shop looks with the changes (yes. sidebar is not done)

94IoG57iK.png


0huBeWTT-.png


qsAS_mFSe.png


I also added some new lua functions.

About the release date... Well I still need to finish houses (I need someone with a populated houses table plx0r), paygol buypoints and guild wars

 
I would suggest to have config shit stored in database and handled through admin dashboard. I will try to test it here and setup a layout I was working on, if I can make it work I will send it too you.
 
Back
Top