Your First Open Tibia Server

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
Your First Open Tibia Server
By Nevermore

Hello OTLand, I am here to make your Open Tibia life a little easier by giving you a great tutorial on how to start your first Open Tibia Server. This will include some common bug error fixes, and even some useful tools to help you as you venture off into the magical world of OTs. So, what are you waiting for? Let's begin shall we?

Table Of Contents:


I. Picking The Right Server // Port Forwarding
II. Setting Up A Database // Admin Account
III. Editing Server Rates and Information
IV. Adding New Scripts
V. Putting It Online (And A Present)
Common Bugs and Errors


Tools You Should Have:

http://notepad-plus-plus.org/download/v5.9.3.html
http://www.4shared.com/file/-2fB1A0O/LaatiDo.html
http://otland.net/f19/otland-ip-changer-134369/



I. Picking The Right Server and Port Forwarding


There are many servers to choose from, but witch one is right for you? Well, lets check it out. OTServ was the first actual distribution that came out to the public, and TFS is a root of OTServ, however, OTServ lost some of its developers over time, and OTLand is just getting more and more. That means that TFS is more widely known, and it's more stable, as the community is bigger, and there is a more likely chance they would report bugs than a dead community like OTFans. So, in that case, if you had to choose between the two, TFS is your best choice. You may also want to take a look what was removed in the time of the updates, for example, if you are creating a server that you need a lot of effects in, the effect action was taken out in 8.7+, so, I would not recommend using it for that. Right now, the most stable revision is the 9.1 server. I will be using the 9.1 server in my example, as it is more widely used that any other at the moment.


:Servers:
9.1: http://otland.net/f18/9-1-forgotten-server-v0-2-11pl2-mystic-spirit-134495/
8.7: http://otland.net/f18/8-7-forgotten-server-v0-2-10-mystic-spirit-117046/
8.62: http://otland.net/f18/8-62-forgotten-server-v0-2-8-mystic-spirit-111170/
8.54: http://otland.net/f18/8-54-forgotten-server-0-3-6pl1-crying-damson-59924/
7.6: http://otland.net/f465/7-6-avesta-14522/


When you are downloading your server, always try and stick to the Console until you get a hang of what your doing in the server, then you can switch to GUI, the console doesn't allow you to do a lot of things, and that's good, so you don't mess up your server when playing around with it, we don't want that to happen now do we? Remember to download the .dll files along with the server, the link of the DLLs can be found in the revision's page. Put those in the root directory of your server. (The folder with the .exe in it.)

Your folder should now look like this:






You should now be able to start your server, but wait! Players cannot login, and.. well, It can't be that easy can it? Your answer is no, you are not yet ready to login, you must first forward your ports. But don't panic! It's not as hard as you might think it is, it's actually quite easy, the only hard part is finding the router model number! (BLAH!)

Things You Will Need Before Continuing:
1. A Router
2. Your Router's Model Number
3. The Router's Company Name
4. Your Default Gateway Adress
5. The Login Password For Router Setup


Now that you have finally gotten all of those things written down, we can continue on to the most boring part of making the OT, port fowarding! Yes, you heard me right. However, there is a site that makes all of your troubles go away in this task.. This site helped me understand how to do it, so I'm sure it will help you. Port Forwarding Guides Listed by Manufacturer and Model - PortForward.com You must go to that site and find your router model number under the router's company name. From there, you should find your Default Gateway address, and a tutorial to forward ports. My road has ended here, I cannot help you with this, since every router is different, however, with the guide, and the ports to foward, you should be fine! Look below for a list of the ports that you must foward.

Ports To Foward:
7171 (TCP/UDP)
7172 (TCP/UDP)
80 (TCP/UDP)

Congratulations! You just forwarded your ports! You are now ready to go onto setting up a database and an administrator account. Good job! It wasn't that hard was it?
____________________________________________
 
Last edited:
OP
Nevermore

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
II. Setting Up A Database and an Admin Account

This part is quite easy, and I'll explain it well. After this, you should be able to login to your server. But don't get too ency. You want to do it correctly, or you'll have to start over..
Things You Will Need:
1. A Drink
2. apache friends - xampp (Install Apache and MySQL as Services)

3. A secure password


Alright.. Now that you have xampp installed and Apache and MySQL as the services, how about you go ahead and start it up.. After you have started up the services, go to this website and set up a password for your database, make it unique, so nobody can guess it: http://localhost/security/xamppsecurity.php

After doing so, reset Apache and MySQL so the effects can take place.. Beleive it or not, you're already half way through with this step, I know, short eh? (Relies a Canadian said "eh"). You can now go to the other link, once you have, you should probably login with the information I put down below: http://localhost/phpmyadmin/

Username: Root
Password: <You set it in the other step.>

After you login, you MUST drop the user PMA, or else you will get hacked 100x easier than usual, as it is giving a backdoor to the hacker. You can do so by clicking on the 'SQL' box on the top left hand corner of your phpmyadmin page, and executing this into it:

DROP USER 'pma'@'localhost';
Now you are nice and secure from those nasty hackers.. (cry) and We are ready to move on to the final steps of creating your OT! Now you should go to your server directory and open the file "Config.Lua" You can find this file by looking at the image below. Along with what it does.



Once you have opened that, go ahead and press "CTRL+F" and search for "Database" Now, look below to figure out what you are supposed to do with all of that stuff.

-- MySQL
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = "" <<< The password you set in Xampp Security.
mysqlDatabase = "" <<< Your server's name here.
mysqlPort = 3306
Also be sure to change the 'sqlite' to 'mysql'. Search for "Sqltype" and change it to MySQL

-- SQL
sqlType = "MySQL"
passwordType = "plain"
After all of that is done, go back to.. "localhost/phpmyadmin" and set up a database. You should find a place to create a database on the home page, enter the server name you put up in the config.lua above this, and click enter. After that, click on the "Import" tab and then click "Browse" search for the "forgottenserver.sql" in your server directory, click on that, then click "go". Congratulations, if you did everything correctly, you should now be able to login to your server with the IP "127.0.0.1" and account "1/1". But wait! Your not done yet, we still have to make you an admin account!

Go to your database tab in "localhost/phpmyadmin" and click on accounts, go to the account you created and set the account access to 5, then go to the character you created on the "Characters" tab, and set the character's group ID to 3, you can do this all by clicking on the checkbox of the account or character and clicking the paper with a pencil or edit button at the bottom of the page.



Congratulations! You can now start your OT, and login with the admin account, but don't go live yet, in the next steps, I'll tell you some more things about how to make your server the best!​
 
Last edited:
OP
Nevermore

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
III. Editing The Server Rates And Information

So, you've came this far, and hopefully, your server was set up correctly, and everything is all good. But, now how do we put this bad boy online? Well, I'll help you with all of that later on, but for right now, how about we change the IP, and the server rates, name, etc, so you can make it yours shall we? Look below, and you'll feel like a pro afterwards. Good luck!

Before we start, you want to ask yourself, what type of server are you going to run? A high experience teleport server, a real-map, or an RPG. All of those have different variables that you have to change in your config.lua file. But don't worry, it's not hard at all, but first, we're going to download a little tool to help us understand the files we're editing a little better. It's called Notepad++ and it's used by scripters all around to help them better understand what they are doing, let's take a look of that config.lua file with it shall we? Notepad++ v5.9.3 - Current Version

Alright, now that you have Notepad++ downloaded, and your server type picked out, let's take a look into the first part of the config.lua. Here we will depict the starting location of the map, the starting level, and more.





You can alter those variables pretty easily, and it's kind of self explanatory what to do. Instead of spending time on that, we'll head on over to some more stuff, that decides weather the ammunition, or runes are infinite, and other things, like criticle hit chance, etc.




I explained in there what each of those do, so it should be pretty easy to change. Now, we'll head on over to figuring out your experience rate. In this tutorial, I will not explain how to use stages, as you will figure out if you actually need those later on, the right ones, and how to use the stages correctly, right now, I'll be showing you just base rates.




Now that you have your server all set up, we'll start getting you an IP address so people can login to your server. First we'll be heading on to a cool website called meatsp.. No-ip.com. Once your there, you should probably make an account, unless you just don't want one. (Nab) After you do this, look below and I'll explain how to make a no-ip domain for your OT, so it's not just numbers.






After you have done those two steps, do NOT change anything else, click "Create Host" and go to: http://whatismyip.org/ : and then copy that. Afterwords, go to your config.lua file, and search for "connection" after you find that, look below, and you'll finally be able to put your server online!




After that, guess what? You can login with the IP you made in no-ip.org, and your OT is finally yours! Now you just have to find a datapack, or get a team and make your own custom server!


 
Last edited:
OP
Nevermore

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
IV. Adding New Scripts

Hello again, if your here, it means you have already set up your server, and you want to know how to implement some scripts into it, to make it cool huh? We'll I'll show you how, and I'll give some examples, but I'm only doing one example, for "Actions" since that is the most commonly used script in Open Tibia. First, we'll be heading on in your data folder, and into the "Actions" folder: i.e. "servername\data\actions\" now open "Actions.XML" with notepad++, and then go to "servername\data\actions\scripts\" and Look below.
Let's say we wanted to add a script for a teleport scroll. You can look below for the code, but first, open a new tab on notepad++ and then copy and paste the code into it.

Lua:
function countDown(number, pos, effect, msgonend, effectonend)
  local n = number
       for i = 1, number do
           addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_RED or TEXTCOLOR_GREEN)
		   addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and effect or effectonend )
              n = n -1
	   end
      n = number
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
 if isPlayerPzLocked(cid) then
    doPlayerSendCancel(cid,"You Cannot Teleport Right After A Battle!.")
 else
    countDown(10, getThingPos(cid), 5, "Teleport Successful", 2)
	doCreatureSetNoMove(cid, 1)
	addEvent(doTeleportThing,10000,cid,getTownTemplePosition(getPlayerTown(cid)),FALSE)
	addEvent(doCreatureSetNoMove,10000,cid, 0) 
	addEvent(doSendMagicEffect,10004,getTownTemplePosition(getPlayerTown(cid)), 10) 
  end
return true
end
Now that you have that, click on the "Language" tab and then "L>Lua" and save it in your "servername/data/actions/scripts" folder. After that's all done, we'll go on over to the script you opened earlier "Actions.XML" and get this code, and put it in your actions.xml

Lua:
<action itemid="6119" script="yourscriptname.lua"/>
And wallah, you made your first temple teleport script, and you learned how to add it into your server. Now save actions.xml, and reset the server, and test it out, remember the "6119" can be changed, it's item id of the item that you want to teleport you to the temple.


 
Last edited:
OP
Nevermore

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
V. Putting Your Server Online

It seems you made it to the last step. Making your server public, so other players can see it, there are many ways to do this, and the most common is putting it on an open tibia server list, such as otservlist.org, or Vapu(s).net. You can simply doing this by signing up for the website, and then adding your server. It'll show you what to do, and what information to put etc. So there really isn't much of a point of me showing you how. So in that case I'll give you a little present for being a good boy!


[video=youtube;se3F4YPO7VU]http://www.youtube.com/watch?v=se3F4YPO7VU[/video]​
 
Last edited:
OP
Nevermore

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
Common Bugs and Errors

If you have any bugs, please report them to me, and I'll fix them, and put the outcome here, so all of the players can have a flawless first server! :p


Q: How do I map in client version 9.1?
A: Import the map and put the 9.1 items.otb in the RME client folder.

Q: I cannot find the forgottenserver.sql file. What do I do?
A: You can also use "schema.mysql" in your schema folder.

Q: What version of Xampp do I use?
A: You can use any version of Xampp or Xampp Lite.


 
Last edited:

Alyhide

Banned User
Joined
Aug 21, 2010
Messages
1,945
Best answers
0
Reaction score
53
Location
Switzerland
o.o"

Very nice tutorial Nevermore, great to see someone that is actually getting into it, instead of just having a simple one. This is pretty much full detail haha
 

Prest

الله ليس أكبر
Joined
Oct 14, 2010
Messages
5,385
Best answers
0
Reaction score
261
Location
By Polar
Awesome bro, so in-depth tutorial.
 

kissofdeath

New Member
Joined
Jun 23, 2009
Messages
1
Best answers
0
Reaction score
0
Thank you so much for this tutorial its what ive been looking for! im having 2 issues when creating a gm account or converting the account to a gm account it wont make the changes i did just as you said but the character is still
the same. the other thing is just a personal question but if you have an answer i would really really appreciate it
how can i edit the 9.1 map?
 
OP
Nevermore

Nevermore

Banned User
Joined
Sep 25, 2011
Messages
415
Best answers
0
Reaction score
25
Location
United States
Thank you so much for this tutorial its what ive been looking for! im having 2 issues when creating a gm account or converting the account to a gm account it wont make the changes i did just as you said but the character is still
the same. the other thing is just a personal question but if you have an answer i would really really appreciate it
how can i edit the 9.1 map?
1. This could change depending on the server version you are using, and since it's 9.1, those are the correct tutorials, in that case, make sure your character is logged off whenever doing the sql queries.

2. Unfortunately, until Fallen's map editor comes out, there is no map editor that supports client version 9.1 =/
 

OZKL

Well-Known Member
Joined
Oct 10, 2009
Messages
2,151
Best answers
0
Reaction score
39
Location
wat
lol i make fuked beter server in 2 minet k gg
 

Prest

الله ليس أكبر
Joined
Oct 14, 2010
Messages
5,385
Best answers
0
Reaction score
261
Location
By Polar
Good for you?
This is suppoused to be for beginner, as it says on the title "YOUR FIRST OPEN TIBIA SERVER"
 

Wraskly

New Member
Joined
Jun 17, 2010
Messages
244
Best answers
0
Reaction score
7
Thank you so much for this tutorial its what ive been looking for! im having 2 issues when creating a gm account or converting the account to a gm account it wont make the changes i did just as you said but the character is still
the same. the other thing is just a personal question but if you have an answer i would really really appreciate it how can i edit the 9.1 map?
You have to import the map and put the 9.1 items.otb un the remeres folder and it should work fine.
 

kakilo

jay, jay jay
Joined
Mar 12, 2009
Messages
5
Best answers
0
Reaction score
0
Nice! I'm sure that will help anyone that's starting now!
 
Top