LoLaye
Active Member
Hello there, I found this tutorial in other forums so i decided to post it here Enjoy it
Index
I. Downloading and Installing Sources.
II. How to setup XAMMP and MySQL Database.
III. Configuring and running the server.
IV. Explanation of Database Tables.
V. Port forwarding, URL Redirection & Online Hosting.
VI. Simple F.A.Q
VII. Securing phpMyAdmin
Sources and files required
I. Download XAMPP from SourceForge.net
II. An SQL Server. http://otland.net/f18/8-54-forgotten-server-0-3-6pl1-crying-damson-59924/. You can use your desired MySQL Server not TFS if you want)[/I][/COLOR]
LETS BEGIN OUR TUTORIAL
PLEASE READ THE FAQ BEFORE POSTING ANY QUESTIONS. IT MIGHT HELP YOU....
THANKS.........
THANKS.........
Index
I. Downloading and Installing Sources.
II. How to setup XAMMP and MySQL Database.
III. Configuring and running the server.
IV. Explanation of Database Tables.
V. Port forwarding, URL Redirection & Online Hosting.
VI. Simple F.A.Q
VII. Securing phpMyAdmin
Sources and files required
I. Download XAMPP from SourceForge.net
II. An SQL Server. http://otland.net/f18/8-54-forgotten-server-0-3-6pl1-crying-damson-59924/. You can use your desired MySQL Server not TFS if you want)[/I][/COLOR]
LETS BEGIN OUR TUTORIAL
I. Downloading and Installing Sources.
1. Download Xampp.
2. Run the installer.
3. Select the desired language.
4. Press "Next".
5. Choose the "Installation Directory" (Preferable to be away from Windows Local Disk)
6. Check on "Select Apache as service" & "Select MySQL as service". <See Figure 1.0>
<Figure 1>1. Download Xampp.
2. Run the installer.
3. Select the desired language.
4. Press "Next".
5. Choose the "Installation Directory" (Preferable to be away from Windows Local Disk)
6. Check on "Select Apache as service" & "Select MySQL as service". <See Figure 1.0>
7. Press "Next" and wait till the installation of files is finished.
8. After that 2 windows of commands ( Like DOS windows) will appear. First <See Figure 1.1> and secondly a one checking ports.
Apache Service : is your database. If it is not running you can't access the database to modify it.
MySQL Service : is your MySQL server. If it is not running you will not be able to run your server giving you "Unable to load bans" error.
II. How to setup XAMPP and MySQL Database.
I Won't be explaining SQLite as it is not efficient and a lot of errors are caused during saving of server and after it...
11. Now, you need to setup XAMPP first, so, Go to your internet browser and enter this address 127.0.0.1 ( This is called Localhost).
12. Choose your desired Language.
13. Choose "Security" from the left list < See Figure 1.3>
<Figure 1.3>
8. After that 2 windows of commands ( Like DOS windows) will appear. First <See Figure 1.1> and secondly a one checking ports.
<Figure 1.1>
NOTE : WAIT TILL "Have fun with ApacheFriends XAMPP!" appears
<Figure 1.2.>
NOTE : WAIT TILL "Have fun with ApacheFriends XAMPP!" appears
9. Press "Ok" then a message will appear, confirm by clicking "Yes".
10. You must have Apache Service and MySQL Service running on your computer. <See Figure 1.2.>
10. You must have Apache Service and MySQL Service running on your computer. <See Figure 1.2.>
<Figure 1.2.>
Apache Service : is your database. If it is not running you can't access the database to modify it.
MySQL Service : is your MySQL server. If it is not running you will not be able to run your server giving you "Unable to load bans" error.
II. How to setup XAMPP and MySQL Database.
I Won't be explaining SQLite as it is not efficient and a lot of errors are caused during saving of server and after it...
11. Now, you need to setup XAMPP first, so, Go to your internet browser and enter this address 127.0.0.1 ( This is called Localhost).
12. Choose your desired Language.
13. Choose "Security" from the left list < See Figure 1.3>
<Figure 1.3>
14. You will get a page showing you the security of your XAMPP, PHP and POP3 servers.
15. Search for this link. (It is immediately under the security check table) and click on it.<See Figure 1.4>
15. Search for this link. (It is immediately under the security check table) and click on it.<See Figure 1.4>
<Figure 1.4>
16. Ok, You will get this page <See Figure 1.5> . Enter the required password and renter it again. Remember it well. It is your key to access your database and to run your server.
18. If a message appeard by your Internet Browser, Press "Yes"
19. Confirmation of success of password changing. <See Figure 1.6>
(You can Skip this section for now if you want)
35. I will be going to explain each table and its contents on its own. To access any table press on it and then press "Browse" from the above tabs <See Figure 2.1>
<Figure 2.1>
------- :Means that I don't know what the field is for.
If you know, please post what you know.
a. Accounts Table
id: It is account number of the account
password: It is the password of the account
type: The Type of the account.
premdays: Number of premium days remaining
lastday: The last day the player had logged in to the server
key: It is the recovery key. Generated if you used a website supporting such feature
email: It is the player e-mail. Generated if you used a website supporting such feature.
blocked: 0 if the account is not banned. 1 if the account is banned
warnings: It is like the frags. If the account has 8 frags as adjusted by the server. The account is banned
groupid: It is the group_id of the account.
b. Bans Table
type: -----
ip: IP of the banned account
mask: -----
player: The banned character ID.
account: The banned player account number.
time: Time of banishment
reason_id: ----- I do know a reason, but dunno what is the ID ?
action_id: -----
comment: Comment written by the banner when banishing the character
banned_by: The ID of the player who banned the other player
c. global_storage
key: As I know, keys are genrated like 1 then 2 then 3 for each vaue
value: Is the value which is written by setGlobalStorageValue(valueid, newvalue) & is called back by
getGlobalStorageValue(valueid)
d. group
id: ID of the group. It is called group_id in the accounts and players table
name: Name of the ID (eg: player, gamemaster, etc...)
flags: These values make the player available to do certain actions or not. Get them at this link. <<Thanks to SimOne>>
access: Access value from 1 to 6. It differs from server to the other. Check commands.xml to understand it more
maxdepotitems: Maximum numbers of items in the depot of the player
maxviplist: Maximum number of players in this player VIP list
e. guilds
id: ID of the guild
name: Name of the guild
ownerid: The ID of the leader character of the guild
creationdate: The date when the guild is created
motd: Message of the day for the guild. It is like a motto for the guild (Not Sure)
f. guild_invites
player_id: The ID of the invited character
guild_id: The ID of the guild which the player_id is invited too.
g. guild_ranks
id: Rank ID
guild_id: Guild ID
name: Rank Name
level: Rank Level
h. houses
id: House ID. It s retrieved from [servername]-house.xml
owner: ID of the owner character
paid: I don't know if it is the value of money or this is a boolean value (0 or 1)
warnings: Number of warnings for the player to pay the house rent
i. house_list
house_id: ID of the house
listid: ------
list: -----
j. players
id: ID of the player
name: Name of the character
group_id: Group ID of the character
account_id: ID of the account in accounts table
level: Character level
vocation: ID of the character vocation
health: Character health NOW
healthmax: Maximum value of character health
experience: Experience points of the character
lookbody: Body look ID
lookfeet: Feet Look ID
lookhead: Head Look ID
looklegs: Legs Look ID
looktype: 0 for females. 1 for males
lookaddon: Addon ID. 0 for nothing, 1 for first addon only. 2 for second addon only. 3 for both addons.
maglevel: Character Magic Level
mana: Character mana NOW
manamax: Characetr maximum mana
manaspent: Mana spent from date of character creation
soul:Soul points of the character
town_id: ID of the character residence town
posx: Character X position
posy Character Y position
poz: Character Z position
conditions: Condition of the character (eg. Poisoned, Electrified, etc..)
cap: Remaining Cap of the character
sex:0 for females. 1 for males (Not Sure)
lastlogin: Last login Date
lastip: Last IP the character has logged in from.
save: 0 if saving stats is disabled for this character. 1 if enabled
redskull: 0 if no has red skull. 1 if has red skull
redskulltime: Time of receiving the last red skull
rank_id: ------
guildnick: Nickname of the character in the guild
lastlogout: Last logout Date
blessings: 1 to 5 according to the received bleesings (Not Sure)
direction, lost_experience, loss_mana, loss_skills, premend : This values are not used by the server, They are located in vocations.xml excpet for direction and premend.
online: 0 if the player is offline. 1 if the player is online.
k. player_deaths
player_id: ID of the dead player
time: The time when the player is killed
level: Dunno of the level before death or after it ??
killed_by: Monster/Player ID or name (Not sure)
is_player: -----
l. player_depotitems
player_id: ID of the character
depot_id: Depot ID
sid: Item ID
pid: -----
itemtype: Type of the item ???
count: How many of this item. You see numbers here if the item is stackable
attributes: ------
m. player_items
player_id: ID of the character
sid: Item ID
pid: -----
itemtype: Type of the item ???
count: How many of this item. You see numbers here if the item is stackable
attributes: ------
n. player_skills
player_id: ID of the character
skillid: 0 Fist, 1 Club, 2 Sword, 3 Axe, 4 Distance, 5 Shielding, 6 Fishing.
value: The skill points (eg: 90)
count: How many times the character has tried to reach the next level. If the player has a sword skill 50 without death the count will be 50. If the player is dead 1 time and reached sword skill 49 and then reached sword skill 50 again. Then the count will be 51.
o. player_spells
player_id:ID of the character
name: Name of the learned spell.
p. player_storage
player_id:ID of the character
key: As I know, keys are genrated like 1 then 2 then 3 for each vaue
value: Is the value which is written by
setPlayerStorageValue(uid, valueid, newvalue)
q. player_viplist
player_id:ID of the character
vip_id:ID of the character in the VIP list
r. tiles
id: ID for the action of this tile
x:Tile X position
y: Tile Y position
y:Tile Z position
tile_id: ID of the tile
sid: Item ID that the tile will give you.
pid: -----
itemtype: Type of the item ???
count: How many of this item. You see numbers here if the item is stackable
attributes: ------
Next part coming!
< Figure 1.5>
17. Press "Password Changing".
18. If a message appeard by your Internet Browser, Press "Yes"
19. Confirmation of success of password changing. <See Figure 1.6>
<Figure 1.6>
Although this section is huge, It is self explanatory.20. Alright Now, We are finished from the setup of XAMPP.
21. Lets begin in the setup of the Database for our server.
22. Enter in your Address bar in the Internet Browser
http://127.0.0.1/phpmyadmin
23. You 'll get the phpMyAdmin Login page. <See Figure 1.7>
<Figure 1.7>
24. Enter UserName as root and your password that I have told how to make it in Step 16
25. You will get the lovely phpMyAdmin homepage. Don't get terrified.
26. Enter your database name here <See Figure 1.8>. We 'll call it TFS. Then press "Create"
<Figure 1.8>
<Figure 2.0>21. Lets begin in the setup of the Database for our server.
22. Enter in your Address bar in the Internet Browser
http://127.0.0.1/phpmyadmin
23. You 'll get the phpMyAdmin Login page. <See Figure 1.7>
<Figure 1.7>
25. You will get the lovely phpMyAdmin homepage. Don't get terrified.
26. Enter your database name here <See Figure 1.8>. We 'll call it TFS. Then press "Create"
<Figure 1.8>
NOTE : DON'T use special characters or numbers. They won't be accepted. Spaces will be ignored like they are not even entered.
27. You 'll find your database with no tables right now.
28. Extract your server
29. Press on that button (marked with red square)
<See Figure 1.9> at the upper left of the screen to begin importing your database file
<Figure 1.9>28. Extract your server
29. Press on that button (marked with red square)
<See Figure 1.9> at the upper left of the screen to begin importing your database file
30. Choose "Import Files" Tab <See Figure 2.0>
31. Browse to your database file which is called forgottenserver.sql OR schema.mysql as we are using TFS.
31. Press "Go". You have successfully imported your database.
You 'll find at the left list the accounts, players, items, skills, ...etc.
III. Configuring and running the server.
32. Time to configure your server itself, Go to your server directory. Go to your server folder, and open config.lua in a notepad or whaterver a text editing program
33. Now check your MySQL properties
34. Now your server is ready to be launched. Try to run the server now.
IV. Explanation of Database Tables.
31. Press "Go". You have successfully imported your database.
You 'll find at the left list the accounts, players, items, skills, ...etc.
III. Configuring and running the server.
32. Time to configure your server itself, Go to your server directory. Go to your server folder, and open config.lua in a notepad or whaterver a text editing program
33. Now check your MySQL properties
Lua:
-- MySQL
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = "XXXXXX" -- your password
mysqlDatabase = "TFS" -- your database name
mysqlPort = 3306
Lua:
-- SQL
sqlType = "mysql" -- change sqlite to mysql
passwordType = "plain"
34. Now your server is ready to be launched. Try to run the server now.
IV. Explanation of Database Tables.
(You can Skip this section for now if you want)
35. I will be going to explain each table and its contents on its own. To access any table press on it and then press "Browse" from the above tabs <See Figure 2.1>
<Figure 2.1>
------- :Means that I don't know what the field is for.
If you know, please post what you know.
a. Accounts Table
id: It is account number of the account
password: It is the password of the account
type: The Type of the account.
premdays: Number of premium days remaining
lastday: The last day the player had logged in to the server
key: It is the recovery key. Generated if you used a website supporting such feature
email: It is the player e-mail. Generated if you used a website supporting such feature.
blocked: 0 if the account is not banned. 1 if the account is banned
warnings: It is like the frags. If the account has 8 frags as adjusted by the server. The account is banned
groupid: It is the group_id of the account.
b. Bans Table
type: -----
ip: IP of the banned account
mask: -----
player: The banned character ID.
account: The banned player account number.
time: Time of banishment
reason_id: ----- I do know a reason, but dunno what is the ID ?
action_id: -----
comment: Comment written by the banner when banishing the character
banned_by: The ID of the player who banned the other player
c. global_storage
key: As I know, keys are genrated like 1 then 2 then 3 for each vaue
value: Is the value which is written by setGlobalStorageValue(valueid, newvalue) & is called back by
getGlobalStorageValue(valueid)
d. group
id: ID of the group. It is called group_id in the accounts and players table
name: Name of the ID (eg: player, gamemaster, etc...)
flags: These values make the player available to do certain actions or not. Get them at this link. <<Thanks to SimOne>>
access: Access value from 1 to 6. It differs from server to the other. Check commands.xml to understand it more
maxdepotitems: Maximum numbers of items in the depot of the player
maxviplist: Maximum number of players in this player VIP list
e. guilds
id: ID of the guild
name: Name of the guild
ownerid: The ID of the leader character of the guild
creationdate: The date when the guild is created
motd: Message of the day for the guild. It is like a motto for the guild (Not Sure)
f. guild_invites
player_id: The ID of the invited character
guild_id: The ID of the guild which the player_id is invited too.
g. guild_ranks
id: Rank ID
guild_id: Guild ID
name: Rank Name
level: Rank Level
h. houses
id: House ID. It s retrieved from [servername]-house.xml
owner: ID of the owner character
paid: I don't know if it is the value of money or this is a boolean value (0 or 1)
warnings: Number of warnings for the player to pay the house rent
i. house_list
house_id: ID of the house
listid: ------
list: -----
j. players
id: ID of the player
name: Name of the character
group_id: Group ID of the character
account_id: ID of the account in accounts table
level: Character level
vocation: ID of the character vocation
health: Character health NOW
healthmax: Maximum value of character health
experience: Experience points of the character
lookbody: Body look ID
lookfeet: Feet Look ID
lookhead: Head Look ID
looklegs: Legs Look ID
looktype: 0 for females. 1 for males
lookaddon: Addon ID. 0 for nothing, 1 for first addon only. 2 for second addon only. 3 for both addons.
maglevel: Character Magic Level
mana: Character mana NOW
manamax: Characetr maximum mana
manaspent: Mana spent from date of character creation
soul:Soul points of the character
town_id: ID of the character residence town
posx: Character X position
posy Character Y position
poz: Character Z position
conditions: Condition of the character (eg. Poisoned, Electrified, etc..)
cap: Remaining Cap of the character
sex:0 for females. 1 for males (Not Sure)
lastlogin: Last login Date
lastip: Last IP the character has logged in from.
save: 0 if saving stats is disabled for this character. 1 if enabled
redskull: 0 if no has red skull. 1 if has red skull
redskulltime: Time of receiving the last red skull
rank_id: ------
guildnick: Nickname of the character in the guild
lastlogout: Last logout Date
blessings: 1 to 5 according to the received bleesings (Not Sure)
direction, lost_experience, loss_mana, loss_skills, premend : This values are not used by the server, They are located in vocations.xml excpet for direction and premend.
online: 0 if the player is offline. 1 if the player is online.
k. player_deaths
player_id: ID of the dead player
time: The time when the player is killed
level: Dunno of the level before death or after it ??
killed_by: Monster/Player ID or name (Not sure)
is_player: -----
l. player_depotitems
player_id: ID of the character
depot_id: Depot ID
sid: Item ID
pid: -----
itemtype: Type of the item ???
count: How many of this item. You see numbers here if the item is stackable
attributes: ------
m. player_items
player_id: ID of the character
sid: Item ID
pid: -----
itemtype: Type of the item ???
count: How many of this item. You see numbers here if the item is stackable
attributes: ------
n. player_skills
player_id: ID of the character
skillid: 0 Fist, 1 Club, 2 Sword, 3 Axe, 4 Distance, 5 Shielding, 6 Fishing.
value: The skill points (eg: 90)
count: How many times the character has tried to reach the next level. If the player has a sword skill 50 without death the count will be 50. If the player is dead 1 time and reached sword skill 49 and then reached sword skill 50 again. Then the count will be 51.
o. player_spells
player_id:ID of the character
name: Name of the learned spell.
p. player_storage
player_id:ID of the character
key: As I know, keys are genrated like 1 then 2 then 3 for each vaue
value: Is the value which is written by
setPlayerStorageValue(uid, valueid, newvalue)
q. player_viplist
player_id:ID of the character
vip_id:ID of the character in the VIP list
r. tiles
id: ID for the action of this tile
x:Tile X position
y: Tile Y position
y:Tile Z position
tile_id: ID of the tile
sid: Item ID that the tile will give you.
pid: -----
itemtype: Type of the item ???
count: How many of this item. You see numbers here if the item is stackable
attributes: ------
Next part coming!
Last edited: