• 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

Only reason to use Lua is to make current OT users comfortable and not having to deal with several different languages, I would assume. But then it's not all about the Lua language itself but also about the functions etc... Thus, I believe you should imitate the current TFS objects as well, e.g. Player(guid) and player:getStorage() etc... Same with guild and rest.

Good job though :D But please! Lua not LUA!

Sadly getting a player is done using ad-hoc queries so no metatable is returned thus I cant imitate TFS

But I might take that and try to change some metatables to fit the TFS style. Thanks!
 
Finished the news articles admin page today. All done with Lua of course.

NeERNZ0.png

uetaRvl.png


J9FjNkw.png
 
You can now register background tasks

Lua:
events:add("test.lua", "1m")

test.lua

Lua:
local t = 1

function run()

print(t)

    t = t +1

    if t == 5 then
        event:stop()
    end

end

You are able to stop the event too ^^


The first argument is the function to execute, the second is the interval, "1s", "2h45m", ...

Also a file init.lua will be executed at startup, so you can register your globals or events at startup too.
 
Last edited:
So I decided to put some work into the xml metatable. This is the stages page

891f6403a88da2f2f9496cf8c878ee94.png


The stages are loaded from the XML file with a very handy function

Lua:
data = xml:unmarshalFile(serverPath .. "/data/XML/stages.xml")

Then, for example, you can call

Code:
print(data.stages.stage[0]["-minlevel"])
 
Cool initiative. But if we Znote develop it! Why create such a thing does only confusion and is not compatible, taking into account the shop and so on ... make a blog in php and there add articles because it misses the whole page layout is not the game for you to show what you can do in php
 
Cool initiative. But if we Znote develop it! Why create such a thing does only confusion and is not compatible, taking into account the shop and so on ... make a blog in php and there add articles because it misses the whole page layout is not the game for you to show what you can do in php

I dont really get what you are trying to say... Can you explain it again please?

Thanks for the feedback though =)
 
Signatures are now handled with lua too: castro/get.lua at master · Raggaer/castro · GitHub

The image is very barebones. But its very easy to change anything... The image creation consist of 3 functions

Lua:
local img = image:new(500, 150)
img:setBackground("public/images/signature-bg.png")
img:writeText("Level: " .. character.level, "#000000", 16, 20, 60)
img:writeText("Vocation: " .. xml:vocationByID(character.vocation).Name, "#000000", 16, 20, 80)
img:writeText("Town: " .. otbm:townByID(character.town_id).Name, "#000000", 16, 20, 100)
img:save("public/images/signature/" .. character.name .. ".png")
 
I think i will soon play around with this awesome aac. So i can give feedback about the lua part aswell and test the possibilites.

Great work :)
 
I think i will soon play around with this awesome aac. So i can give feedback about the lua part aswell and test the possibilites.

Great work :)

I am looking forward then. We are near release and we need feedback about the lua part so bad. =)
 
Paypal buypoints is finally done

5f049a4dc086d26d2eb0a60d67fbbad5.png


Packages are loaded from lua

Lua:
-- PayPal package list
paypalList = {}

-- Package name, package price, package given points
paypalList["Test Package"] = paypalPackage("Test Package", 12, 20)

Purchasing creates a payment using the REST api

7a1e9c2c942546d9b0d8f101e08ebbb1.png


After that you are able to review your payment

165ad353cd885e0ac4c7a6923e0c53b5.png


Purchase will then execute the payment, give points and redirect with a nice message.
 
I had no time to try this awesome aac out. But for sure i will use it on my custom project!
 
Hi. Default Highscores should be as "All vocations" instead "None". People don't want just to compare with the same vocations.

Nice project o/
 
Back
Top