Not sure if you noticed @pixie_frigo but this is C++ code, not Lua.
If you did notice, and your question about getting skills etc was a genuine one, take a look at either www.tpforums.org or https://code.google.com/p/japi/. JAPI is a project I'm working on (it's kinda like TibiaAPI, but not nearly as good yet, and it will use keyboard / mouse simulation instead of memory writing), written entirely in C#, with a tiny bit of assembly coming soon (if I can work out how to run it correctly). If you're looking just to read values from Tibia it could be just the trick as it contains all the memory reading functions you'll need, and skills etc can be added quite easily
@Milice - You do realise that this won't work for anyone using ASLR, right? I don't know if XB disables ASLR, but if it doesn't then this won't work on any machine with windows 7 / 8. On top of that, the method of doing it is pretty bad, I mean, why write to memory when you could simply SendMessage a ctrl + Q or ctrl + L combo followed by enter?