diff --git a/LUA/TFS_02/creaturescript firstitems/firstitems.lua b/LUA/TFS_02/creaturescript firstitems/firstitems.lua index c0043be..a3ee102 100644 --- a/LUA/TFS_02/creaturescript firstitems/firstitems.lua +++ b/LUA/TFS_02/creaturescript firstitems/firstitems.lua @@ -1,6 +1,6 @@ function onLogin(cid) local storage = 30055 -- storage value - + local sorcItems = { 2460, -- Brass helmet 2465, -- Brass armor @@ -39,39 +39,39 @@ function onLogin(cid) 1988, -- Brown backpack 2050 -- torch } - + if getPlayerStorageValue(cid, storage) == -1 then setPlayerStorageValue(cid, storage, 1) if getPlayerVocation(cid) == 1 then -- Sorcerer for i = 1, table.getn(sorcItems), 1 do - doPlayerAddItem(cid, sorcItems[i], 1, FALSE) + doPlayerAddItem(cid, sorcItems[i], 1, false) end elseif getPlayerVocation(cid) == 2 then -- Druid for i = 1, table.getn(druidItems), 1 do - doPlayerAddItem(cid, druidItems[i], 1, FALSE) + doPlayerAddItem(cid, druidItems[i], 1, false) end elseif getPlayerVocation(cid) == 3 then -- Paladin for i = 1, table.getn(pallyItems), 1 do - doPlayerAddItem(cid, pallyItems[i], 1, FALSE) + doPlayerAddItem(cid, pallyItems[i], 1, false) end -- 8 arrows - doPlayerAddItem(cid, 2544, 8, FALSE) + doPlayerAddItem(cid, 2544, 8, false) elseif getPlayerVocation(cid) == 4 then -- Knight for i = 1, table.getn(kinaItems), 1 do - doPlayerAddItem(cid, kinaItems[i], 1, FALSE) + doPlayerAddItem(cid, kinaItems[i], 1, false) end end - + -- Common for all - doPlayerAddItem(cid, 2674, 5, FALSE) -- 5 apples - doPlayerAddItem(cid, 2120, 1, FALSE) -- 1 rope + doPlayerAddItem(cid, 2674, 5, false) -- 5 apples + doPlayerAddItem(cid, 2120, 1, false) -- 1 rope end return true end diff --git a/LUA/TFS_02/talkaction shopsystem/znoteshop.lua b/LUA/TFS_02/talkaction shopsystem/znoteshop.lua index 614bd52..af6d2b2 100644 --- a/LUA/TFS_02/talkaction shopsystem/znoteshop.lua +++ b/LUA/TFS_02/talkaction shopsystem/znoteshop.lua @@ -2,11 +2,11 @@ function onSay(cid, words, param) local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. local cooldown = 15 -- in seconds. - + if getPlayerStorageValue(cid, storage) <= os.time() then setPlayerStorageValue(cid, storage, os.time() + cooldown) local accid = getAccountNumberByPlayerName(getCreatureName(cid)) - + local type_desc = { "itemids", "pending premium (skip)", @@ -34,17 +34,17 @@ function onSay(cid, words, param) description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) - + -- ORDER TYPE 1 (Regular item shop products) if q_type == 1 then served = true - -- Get wheight + -- Get weight local playerCap = getPlayerFreeCap(cid) local itemweight = getItemWeight(q_itemid, q_count) if playerCap >= itemweight then db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") doPlayerAddItem(cid, q_itemid, q_count) - doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have recieved ".. q_count .." "..getItemName(q_itemid).."(s)!") + doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received ".. q_count .." "..getItemName(q_itemid).."(s)!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP!") end @@ -77,7 +77,7 @@ function onSay(cid, words, param) -- ORDER TYPE 6 (Mounts) -- Not supported on TFS 0.2 - + -- Add custom order types here -- Type 1 is for itemids (Already coded here) -- Type 2 is for premium (Coded on web) diff --git a/LUA/TFS_03/creaturescript firstitems/firstitems.lua b/LUA/TFS_03/creaturescript firstitems/firstitems.lua index c0043be..0c0443a 100644 --- a/LUA/TFS_03/creaturescript firstitems/firstitems.lua +++ b/LUA/TFS_03/creaturescript firstitems/firstitems.lua @@ -1,6 +1,6 @@ function onLogin(cid) local storage = 30055 -- storage value - + local sorcItems = { 2460, -- Brass helmet 2465, -- Brass armor @@ -39,39 +39,39 @@ function onLogin(cid) 1988, -- Brown backpack 2050 -- torch } - + if getPlayerStorageValue(cid, storage) == -1 then setPlayerStorageValue(cid, storage, 1) if getPlayerVocation(cid) == 1 then -- Sorcerer for i = 1, table.getn(sorcItems), 1 do - doPlayerAddItem(cid, sorcItems[i], 1, FALSE) + doPlayerAddItem(cid, sorcItems[i], 1, false) end - + elseif getPlayerVocation(cid) == 2 then -- Druid for i = 1, table.getn(druidItems), 1 do - doPlayerAddItem(cid, druidItems[i], 1, FALSE) + doPlayerAddItem(cid, druidItems[i], 1, false) end - + elseif getPlayerVocation(cid) == 3 then -- Paladin for i = 1, table.getn(pallyItems), 1 do - doPlayerAddItem(cid, pallyItems[i], 1, FALSE) + doPlayerAddItem(cid, pallyItems[i], 1, false) end -- 8 arrows - doPlayerAddItem(cid, 2544, 8, FALSE) - + doPlayerAddItem(cid, 2544, 8, false) + elseif getPlayerVocation(cid) == 4 then -- Knight for i = 1, table.getn(kinaItems), 1 do - doPlayerAddItem(cid, kinaItems[i], 1, FALSE) + doPlayerAddItem(cid, kinaItems[i], 1, false) end end - + -- Common for all - doPlayerAddItem(cid, 2674, 5, FALSE) -- 5 apples - doPlayerAddItem(cid, 2120, 1, FALSE) -- 1 rope + doPlayerAddItem(cid, 2674, 5, false) -- 5 apples + doPlayerAddItem(cid, 2120, 1, false) -- 1 rope end return true end diff --git a/LUA/TFS_03/talkaction shopsystem/Alternatives/znoteshop.lua b/LUA/TFS_03/talkaction shopsystem/Alternatives/znoteshop.lua index e622b97..e184499 100644 --- a/LUA/TFS_03/talkaction shopsystem/Alternatives/znoteshop.lua +++ b/LUA/TFS_03/talkaction shopsystem/Alternatives/znoteshop.lua @@ -2,11 +2,11 @@ function onSay(cid, words, param) local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. local cooldown = 15 -- in seconds. - + if getPlayerStorageValue(cid, storage) <= os.time() then setPlayerStorageValue(cid, storage, os.time() + cooldown) local accid = getAccountNumberByPlayerName(getCreatureName(cid)) - + local type_desc = { "itemids", "pending premium (skip)", @@ -35,7 +35,7 @@ function onSay(cid, words, param) description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) - + -- ORDER TYPE 1 (Regular item shop products) if q_type == 1 then served = true @@ -91,7 +91,7 @@ function onSay(cid, words, param) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this mount!") end end - + -- Add custom order types here -- Type 1 is for itemids (Already coded here) -- Type 2 is for premium (Coded on web) @@ -115,4 +115,4 @@ function onSay(cid, words, param) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every "..cooldown.." seconds. Remaining cooldown: ".. getPlayerStorageValue(cid, storage) - os.time()) end return false -end \ No newline at end of file +end diff --git a/LUA/TFS_03/talkaction shopsystem/znoteshop.lua b/LUA/TFS_03/talkaction shopsystem/znoteshop.lua index 4286f8e..eace78e 100644 --- a/LUA/TFS_03/talkaction shopsystem/znoteshop.lua +++ b/LUA/TFS_03/talkaction shopsystem/znoteshop.lua @@ -2,11 +2,11 @@ function onSay(cid, words, param) local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. local cooldown = 15 -- in seconds. - + if getPlayerStorageValue(cid, storage) <= os.time() then setPlayerStorageValue(cid, storage, os.time() + cooldown) local accid = getAccountNumberByPlayerName(getCreatureName(cid)) - + local type_desc = { "itemids", "pending premium (skip)", @@ -29,28 +29,28 @@ function onSay(cid, words, param) local q_type = result.getDataInt(orderQuery, "type") local q_itemid = result.getDataInt(orderQuery, "itemid") local q_count = result.getDataInt(orderQuery, "count") - + local description = "Unknown or custom type" if type_desc[q_type] ~= nil then description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) - + -- ORDER TYPE 1 (Regular item shop products) if q_type == 1 then served = true - -- Get wheight + -- Get weight local playerCap = getPlayerFreeCap(cid) local itemweight = getItemWeightById(q_itemid, q_count) if playerCap >= itemweight and getTileInfo(getCreaturePosition(cid)).protection then - --backpack check + -- backpack check local backpack = getPlayerSlotItem(cid, 3) local gotItem = false if(backpack and backpack.itemid > 0) then local received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, q_itemid,q_count) if(received ~= false) then db.executeQuery("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") - doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have recieved ".. q_count .." "..getItemNameById(q_itemid).."(s)!") + doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received ".. q_count .." "..getItemNameById(q_itemid).."(s)!") gotItem = true end end @@ -100,7 +100,7 @@ function onSay(cid, words, param) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this mount!") end end - + -- Add custom order types here -- Type 1 is for itemids (Already coded here) -- Type 2 is for premium (Coded on web) @@ -120,9 +120,9 @@ function onSay(cid, words, param) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have no orders.") end - + else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every "..cooldown.." seconds. Remaining cooldown: ".. getPlayerStorageValue(cid, storage) - os.time()) end return false -end \ No newline at end of file +end diff --git a/LUA/TFS_10/creaturescript firstitems/Installation Instructions.txt b/LUA/TFS_10/creaturescript firstitems/Installation Instructions.txt index 4b60316..b4fcac8 100644 --- a/LUA/TFS_10/creaturescript firstitems/Installation Instructions.txt +++ b/LUA/TFS_10/creaturescript firstitems/Installation Instructions.txt @@ -1,4 +1,4 @@ Step 1: Copy firstitems.lua to /data/creaturescripts/scripts/ folder -- Edit firstitems.lua with item IDs you want characters to start with on your server. -Step 2: Restart OT server, and it should work. :) \ No newline at end of file +Step 2: Restart OT server, and it should work. :) diff --git a/LUA/TFS_10/creaturescript firstitems/firstitems.lua b/LUA/TFS_10/creaturescript firstitems/firstitems.lua index feb18c3..e4f7c3b 100644 --- a/LUA/TFS_10/creaturescript firstitems/firstitems.lua +++ b/LUA/TFS_10/creaturescript firstitems/firstitems.lua @@ -1,17 +1,16 @@ -- With Rookgaard --[[ -local firstItems = {2050, 2382} +local firstItems = {2050, 2382} -- torch and club -function onLogin(cid) - local player = Player(cid) +function onLogin(player) if player:getLastLoginSaved() <= 0 then for i = 1, #firstItems do player:addItem(firstItems[i], 1) end - player:addItem(player:getSex() == 0 and 2651 or 2650, 1) - player:addItem(1987, 1) - player:addItem(2674, 1) + player:addItem(player:getSex() == 0 and 2651 or 2650, 1) -- coat + player:addItem(ITEM_BAG, 1) + player:addItem(2674, 1) -- red apple end return true end @@ -19,34 +18,33 @@ end -- Without Rookgaard local config = { - [1] = { - --equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf - items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}}, - --container rope, shovel, mana potion - container = {{2120, 1}, {2554, 1}, {7620, 1}} - }, - [2] = { - --equipment spellbook, snakebite rod, magician's robe, mage hat, studded legs, leather boots scarf - items = {{2175, 1}, {2182, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}}, - --container rope, shovel, mana potion - container = {{2120, 1}, {2554, 1}, {7620, 1}} - }, - [3] = { - --equipment dwrven shield, 5 spear, ranger's cloak, ranger legs scarf, legion helmet - items = {{2525, 1}, {2389, 5}, {2660, 1}, {8923, 1}, {2643, 1}, {2661, 1}, {2480, 1}}, - --container rope, shovel, health potion, bow, 50 arrow - container = {{2120, 1}, {2554, 1}, {7618, 1}, {2456, 1}, {2544, 50}} - }, - [4] = { - --equipment dwarven shield, steel axe, brass armor, brass helmet, brass legs scarf - items = {{2525, 1}, {8601, 1}, {2465, 1}, {2460, 1}, {2478, 1}, {2643, 1}, {2661, 1}}, - --container jagged sword, daramian mace, rope, shovel, health potion - container = {{8602, 1}, {2439, 1}, {2120, 1}, {2554, 1}, {7618, 1}} - } + [1] = { -- Sorcerer + -- equipment: spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf + items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}}, + -- container: rope, shovel, mana potion + container = {{2120, 1}, {2554, 1}, {7620, 1}} + }, + [2] = { -- Druid + -- equipment: spellbook, snakebite rod, magician's robe, mage hat, studded legs, leather boots, scarf + items = {{2175, 1}, {2182, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}}, + -- container: rope, shovel, mana potion + container = {{2120, 1}, {2554, 1}, {7620, 1}} + }, + [3] = { -- Paladin + -- equipment: dwarven shield, 5 spear, ranger's cloak, ranger legs, scarf, legion helmet + items = {{2525, 1}, {2389, 5}, {2660, 1}, {8923, 1}, {2643, 1}, {2661, 1}, {2480, 1}}, + -- container: rope, shovel, health potion, bow, 50 arrow + container = {{2120, 1}, {2554, 1}, {7618, 1}, {2456, 1}, {2544, 50}} + }, + [4] = { -- Knight + -- equipment: dwarven shield, steel axe, brass armor, brass helmet, brass legs, scarf + items = {{2525, 1}, {8601, 1}, {2465, 1}, {2460, 1}, {2478, 1}, {2643, 1}, {2661, 1}}, + -- container jagged sword, daramanian mace, rope, shovel, health potion + container = {{8602, 1}, {2439, 1}, {2120, 1}, {2554, 1}, {7618, 1}} + } } -function onLogin(cid) - local player = Player(cid) +function onLogin(player) local targetVocation = config[player:getVocation():getId()] if not targetVocation then return true diff --git a/LUA/TFS_10/creaturescript playerdeath/playerdeath.lua b/LUA/TFS_10/creaturescript playerdeath/playerdeath.lua index ce74579..b61334f 100644 --- a/LUA/TFS_10/creaturescript playerdeath/playerdeath.lua +++ b/LUA/TFS_10/creaturescript playerdeath/playerdeath.lua @@ -32,8 +32,11 @@ local function sendWarStatus(guildId, enemyGuildId, warId, playerName, killerNam end end -function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) - local player = Player(cid) +function onDeath(player, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified) + local playerId = player:getId() + if nextUseStaminaTime[playerId] then + nextUseStaminaTime[playerId] = nil + end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are dead.") if not deathListEnabled then @@ -41,27 +44,25 @@ function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjust end local byPlayer = 0 - local killerCreature = Creature(killer) - if not killerCreature then - killerName = "field item" - else - if killerCreature:isPlayer() then + local killerName + if killer then + if killer:isPlayer() then byPlayer = 1 else - local master = killerCreature:getMaster() - if master and master ~= killerCreature and master:isPlayer() then - killerCreature = master + local master = killer:getMaster() + if master and master ~= killer and master:isPlayer() then + killer = master byPlayer = 1 end end - killerName = killerCreature:isMonster() and killerCreature:getType():getNameDescription() or killerCreature:getName() + killerName = killer:getName() + else + killerName = "field item" end local byPlayerMostDamage = 0 - if mostDamage == 0 then - mostDamageName = "field item" - else - local mostDamageKiller = Creature(mostDamage) + local mostDamageKillerName + if mostDamageKiller then if mostDamageKiller:isPlayer() then byPlayerMostDamage = 1 else @@ -71,7 +72,9 @@ function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjust byPlayerMostDamage = 1 end end - mostDamageName = mostDamageKiller:isMonster() and mostDamageKiller:getType():getNameDescription() or mostDamageKiller:getName() + mostDamageName = mostDamageKiller:getName() + else + mostDamageName = "field item" end local playerGuid = player:getGuid() @@ -89,18 +92,18 @@ function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjust result.free(resultId) end - while deathRecords > maxDeathRecords do - db.query("DELETE FROM `player_deaths` WHERE `player_id` = " .. playerGuid .. " ORDER BY `time` LIMIT 1") - deathRecords = deathRecords - 1 + local limit = deathRecords - maxDeathRecords + if limit > 0 then + db.asyncQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. playerGuid .. " ORDER BY `time` LIMIT " .. limit) end if byPlayer == 1 then local targetGuild = player:getGuild() targetGuild = targetGuild and targetGuild:getId() or 0 if targetGuild ~= 0 then - local killerGuild = killerCreature:getGuild() + local killerGuild = killer:getGuild() killerGuild = killerGuild and killerGuild:getId() or 0 - if killerGuild ~= 0 and targetGuild ~= killerGuild and isInWar(cid, killerCreature) then + if killerGuild ~= 0 and targetGuild ~= killerGuild and isInWar(playerId, killer:getId()) then local warId = false resultId = db.storeQuery("SELECT `id` FROM `guild_wars` WHERE `status` = 1 AND ((`guild1` = " .. killerGuild .. " AND `guild2` = " .. targetGuild .. ") OR (`guild1` = " .. targetGuild .. " AND `guild2` = " .. killerGuild .. "))") if resultId ~= false then @@ -110,7 +113,7 @@ function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjust if warId ~= false then local playerName = player:getName() - db.query("INSERT INTO `guildwar_kills` (`killer`, `target`, `killerguild`, `targetguild`, `time`, `warid`) VALUES (" .. db.escapeString(killerName) .. ", " .. db.escapeString(playerName) .. ", " .. killerGuild .. ", " .. targetGuild .. ", " .. os.time() .. ", " .. warId .. ")") + db.asyncQuery("INSERT INTO `guildwar_kills` (`killer`, `target`, `killerguild`, `targetguild`, `time`, `warid`) VALUES (" .. db.escapeString(killerName) .. ", " .. db.escapeString(playerName) .. ", " .. killerGuild .. ", " .. targetGuild .. ", " .. os.time() .. ", " .. warId .. ")") addEvent(sendWarStatus, 1000, killerGuild, targetGuild, warId, playerName, killerName) end end diff --git a/LUA/TFS_10/creaturescript sync outfits/Installation Instructions.txt b/LUA/TFS_10/creaturescript sync outfits/Installation Instructions.txt index 7aaced4..7113085 100644 --- a/LUA/TFS_10/creaturescript sync outfits/Installation Instructions.txt +++ b/LUA/TFS_10/creaturescript sync outfits/Installation Instructions.txt @@ -1,8 +1,7 @@ 1. Add below line to XML file: data/creaturescripts/creaturescripts.xml - 2. Register event in login.lua: data/creaturescripts/scripts/login.lua player:registerEvent("znote_syncoutfits") -3. Place Lua file syncoutfit.lua in folder: data/creaturescripts/scripts/ \ No newline at end of file +3. Place Lua file syncoutfit.lua in folder: data/creaturescripts/scripts/ diff --git a/LUA/TFS_10/other.md/powergamers.lua b/LUA/TFS_10/globalevent powergamers/powergamers.lua similarity index 56% rename from LUA/TFS_10/other.md/powergamers.lua rename to LUA/TFS_10/globalevent powergamers/powergamers.lua index a069693..ac56fb8 100644 --- a/LUA/TFS_10/other.md/powergamers.lua +++ b/LUA/TFS_10/globalevent powergamers/powergamers.lua @@ -2,7 +2,7 @@ -- can be added to data/global.lua if you want to use eternal storage for another purpose than this. -- Regular TFS global storage values get reset every time server reboots. This does not. local function getEternalStorage(key, parser) - local value = result.getDataString(db.storeQuery("SELECT `value` FROM `znote_global_storage` WHERE `key` = ".. key .. ";"), "value") + local value = result.getString(db.storeQuery("SELECT `value` FROM `znote_global_storage` WHERE `key` = ".. key .. ";"), "value") if not value then if parser then return false @@ -22,6 +22,36 @@ local function setEternalStorage(key, value) return true end +-- SQL Query to execute: -- +--[[ +ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist1` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist2` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist3` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist4` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist5` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist6` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist7` BIGINT(255) NOT NULL DEFAULT '0', +ADD `onlinetimetoday` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime1` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime2` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime3` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime4` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime5` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime6` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetime7` BIGINT(20) NOT NULL DEFAULT '0', +ADD `onlinetimeall` BIGINT(20) NOT NULL DEFAULT '0'; +]]-- + +-- after that execute: -- +--[[ +UPDATE `znote_players` AS `z` INNER JOIN `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience`; +]]-- + +-- TFS 1.X (data/globalevents.xml) +-- +-- + function onThink(interval, lastExecution, thinkInterval) if tonumber(os.date("%d")) ~= getEternalStorage(23856) then setEternalStorage(23856, (tonumber(os.date("%d")))) @@ -31,31 +61,3 @@ function onThink(interval, lastExecution, thinkInterval) db.query("UPDATE `znote_players` SET `onlinetimetoday` = `onlinetimetoday` + 60, `onlinetimeall` = `onlinetimeall` + 60 WHERE `player_id` IN (SELECT `player_id` FROM `players_online` WHERE `players_online`.`player_id` = `znote_players`.`player_id`)") return true end - --- TFS 1.0 (globalevents.xml) --- --- - --- SQL (remember to remove all (--) before executing)-- ---ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0', ---ADD `onlinetimetoday` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime1` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime2` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime3` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime4` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime5` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime6` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetime7` BIGINT( 20 ) NOT NULL DEFAULT '0', ---ADD `onlinetimeall` BIGINT( 20 ) NOT NULL DEFAULT '0'; ---------------- - - --- after that execute -- --- UPDATE `znote_players` AS `z` INNER JOIN `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience` \ No newline at end of file diff --git a/LUA/TFS_10/globalevent shopsystem/globalevent XML.txt b/LUA/TFS_10/globalevent shopsystem/globalevent XML.txt deleted file mode 100644 index 5164b0e..0000000 --- a/LUA/TFS_10/globalevent shopsystem/globalevent XML.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/LUA/TFS_10/globalevent shopsystem/znoteshop.lua b/LUA/TFS_10/globalevent shopsystem/znoteshop.lua index de0b064..0e75bb4 100644 --- a/LUA/TFS_10/globalevent shopsystem/znoteshop.lua +++ b/LUA/TFS_10/globalevent shopsystem/znoteshop.lua @@ -1,154 +1,155 @@ +-- -- Znote Auto Shop v2.1 for Znote AAC on TFS 1.2+ function onThink(interval, lastExecution) - local orderQuery = db.storeQuery([[ - SELECT - MIN(`po`.`player_id`) AS `player_id`, - `shop`.`id`, - `shop`.`type`, - `shop`.`itemid`, - `shop`.`count` - FROM `players_online` AS `po` - INNER JOIN `players` AS `p` - ON `po`.`player_id` = `p`.`id` - INNER JOIN `znote_shop_orders` AS `shop` - ON `p`.`account_id` = `shop`.`account_id` - WHERE `shop`.`type` IN(1,5,6,7) - GROUP BY `shop`.`id` - ]]) - -- Detect if we got any results - if orderQuery ~= false then - local type_desc = { - "itemids", - "pending premium (skip)", - "pending gender change (skip)", - "pending character name change (skip)", - "Outfit and addons", - "Mounts", - "Instant house purchase" - } - repeat - local player_id = result.getDataInt(orderQuery, 'player_id') - local orderId = result.getDataInt(orderQuery, 'id') - local orderType = result.getDataInt(orderQuery, 'type') - local orderItemId = result.getDataInt(orderQuery, 'itemid') - local orderCount = result.getDataInt(orderQuery, 'count') - local served = false + local orderQuery = db.storeQuery([[ + SELECT + MIN(`po`.`player_id`) AS `player_id`, + `shop`.`id`, + `shop`.`type`, + `shop`.`itemid`, + `shop`.`count` + FROM `players_online` AS `po` + INNER JOIN `players` AS `p` + ON `po`.`player_id` = `p`.`id` + INNER JOIN `znote_shop_orders` AS `shop` + ON `p`.`account_id` = `shop`.`account_id` + WHERE `shop`.`type` IN(1,5,6,7) + GROUP BY `shop`.`id` + ]]) + -- Detect if we got any results + if orderQuery ~= false then + local type_desc = { + "itemids", + "pending premium (skip)", + "pending gender change (skip)", + "pending character name change (skip)", + "Outfit and addons", + "Mounts", + "Instant house purchase" + } + repeat + local player_id = result.getNumber(orderQuery, 'player_id') + local orderId = result.getNumber(orderQuery, 'id') + local orderType = result.getNumber(orderQuery, 'type') + local orderItemId = result.getNumber(orderQuery, 'itemid') + local orderCount = result.getNumber(orderQuery, 'count') + local served = false - local player = Player(player_id) - if player ~= nil then + local player = Player(player_id) + if player ~= nil then - local description = "Unknown or custom type" - if type_desc[orderType] ~= nil then - description = type_desc[orderType] - end - print("Processing type "..orderType..": ".. description) - print("Processing shop order for: [".. player:getName() .."] type "..orderType..": ".. description) - - local tile = Tile(player:getPosition()) - if tile ~= nil and tile:hasFlag(TILESTATE_PROTECTIONZONE) then - -- ORDER TYPE 1 (Regular item shop products) - if orderType == 1 then - served = true - local itemType = ItemType(orderItemId) - -- Get wheight - if player:getFreeCapacity() >= itemType:getWeight(orderCount) then - local backpack = player:getSlotItem(CONST_SLOT_BACKPACK) - -- variable = (condition) and (return if true) or (return if false) - local needslots = itemType:isStackable() and math.floor(orderCount / 100) + 1 or orderCount - if backpack ~= nil and backpack:getEmptySlots(false) >= needslots then - db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") - player:addItem(orderItemId, orderCount) - player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. "!") - print("Process complete. [".. player:getName() .."] has recieved " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") - else -- not enough slots - player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your main backpack is full. You need to free up "..needslots.." available slots to get " .. orderCount .. " " .. ItemType(orderItemId):getName() .. "!") - print("Process canceled. [".. player:getName() .."] need more space in his backpack to get " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") - end - else -- not enough cap - player:sendTextMessage(MESSAGE_STATUS_WARNING, "You need more CAP to carry this order!") - print("Process canceled. [".. player:getName() .."] need more cap to carry " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") - end - end + local description = "Unknown or custom type" + if type_desc[orderType] ~= nil then + description = type_desc[orderType] + end + print("Processing type "..orderType..": ".. description) + print("Processing shop order for: [".. player:getName() .."] type "..orderType..": ".. description) - -- ORDER TYPE 5 (Outfit and addon) - if orderType == 5 then - served = true + local tile = Tile(player:getPosition()) + if tile ~= nil and tile:hasFlag(TILESTATE_PROTECTIONZONE) then + -- ORDER TYPE 1 (Regular item shop products) + if orderType == 1 then + served = true + local itemType = ItemType(orderItemId) + -- Get weight + if player:getFreeCapacity() >= itemType:getWeight(orderCount) then + local backpack = player:getSlotItem(CONST_SLOT_BACKPACK) + -- variable = (condition) and (return if true) or (return if false) + local needslots = itemType:isStackable() and math.floor(orderCount / 100) + 1 or orderCount + if backpack ~= nil and backpack:getEmptySlots(false) >= needslots then + db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") + player:addItem(orderItemId, orderCount) + player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. "!") + print("Process complete. [".. player:getName() .."] has received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") + else -- not enough slots + player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your main backpack is full. You need to free up "..needslots.." available slots to get " .. orderCount .. " " .. ItemType(orderItemId):getName() .. "!") + print("Process canceled. [".. player:getName() .."] need more space in his backpack to get " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") + end + else -- not enough cap + player:sendTextMessage(MESSAGE_STATUS_WARNING, "You need more CAP to carry this order!") + print("Process canceled. [".. player:getName() .."] need more cap to carry " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") + end + end - local itemid = orderItemId - local outfits = {} + -- ORDER TYPE 5 (Outfit and addon) + if orderType == 5 then + served = true - if itemid > 1000 then - local first = math.floor(itemid/1000) - table.insert(outfits, first) - itemid = itemid - (first * 1000) - end - table.insert(outfits, itemid) + local itemid = orderItemId + local outfits = {} - for _, outfitId in pairs(outfits) do - -- Make sure player don't already have this outfit and addon - if not player:hasOutfit(outfitId, orderCount) then - db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") - player:addOutfit(outfitId) - player:addOutfitAddon(outfitId, orderCount) - player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") - print("Process complete. [".. player:getName() .."] has recieved outfit: ["..outfitId.."] with addon: ["..orderCount.."]") - else -- Already has outfit - player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") - print("Process canceled. [".. player:getName() .."] already have outfit: ["..outfitId.."] with addon: ["..orderCount.."].") - end - end - end + if itemid > 1000 then + local first = math.floor(itemid/1000) + table.insert(outfits, first) + itemid = itemid - (first * 1000) + end + table.insert(outfits, itemid) - -- ORDER TYPE 6 (Mounts) - if orderType == 6 then - served = true - -- Make sure player don't already have this outfit and addon - if not player:hasMount(orderItemId) then - db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") - player:addMount(orderItemId) - player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new mount!") - print("Process complete. [".. player:getName() .."] has recieved mount: ["..orderItemId.."]") - else -- Already has mount - player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this mount!") - print("Process canceled. [".. player:getName() .."] already have mount: ["..orderItemId.."].") - end - end + for _, outfitId in pairs(outfits) do + -- Make sure player don't already have this outfit and addon + if not player:hasOutfit(outfitId, orderCount) then + db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") + player:addOutfit(outfitId) + player:addOutfitAddon(outfitId, orderCount) + player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") + print("Process complete. [".. player:getName() .."] has received outfit: ["..outfitId.."] with addon: ["..orderCount.."]") + else -- Already has outfit + player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") + print("Process canceled. [".. player:getName() .."] already have outfit: ["..outfitId.."] with addon: ["..orderCount.."].") + end + end + end - -- ORDER TYPE 7 (Direct house purchase) - if orderType == 7 then - served = true - local house = House(orderItemId) - -- Logged in player is not neccesarily the player that bough the house. So we need to load player from db. - local buyerQuery = db.storeQuery("SELECT `name` FROM `players` WHERE `id` = "..orderCount.." LIMIT 1") - if buyerQuery ~= false then - local buyerName = result.getDataString(buyerQuery, "name") - result.free(buyerQuery) - if house then - db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") - house:setOwnerGuid(orderCount) - player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully bought the house "..house:getName().." on "..buyerName..", be sure to have the money for the rent in the bank.") - print("Process complete. [".. buyerName .."] has recieved house: ["..house:getName().."]") - else - print("Process canceled. Failed to load house with ID: "..orderItemId) - end - else - print("Process canceled. Failed to load player with ID: "..orderCount) - end - end + -- ORDER TYPE 6 (Mounts) + if orderType == 6 then + served = true + -- Make sure player don't already have this outfit and addon + if not player:hasMount(orderItemId) then + db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") + player:addMount(orderItemId) + player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new mount!") + print("Process complete. [".. player:getName() .."] has received mount: ["..orderItemId.."]") + else -- Already has mount + player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this mount!") + print("Process canceled. [".. player:getName() .."] already have mount: ["..orderItemId.."].") + end + end - if not served then -- If this order hasn't been processed yet (missing type handling?) - print("Znote shop: Type ["..orderType.."] not properly processed. Missing Lua code?") - end - else -- Not in protection zone - player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have a pending shop order, please enter protection zone.') - print("Skipped one shop order. Reason: Player: [".. player:getName() .."] is not inside protection zone.") - end - else -- player not logged in - print("Skipped one shop order. Reason: Player with id [".. player_id .."] is not online.") - end + -- ORDER TYPE 7 (Direct house purchase) + if orderType == 7 then + served = true + local house = House(orderItemId) + -- Logged in player is not necessarily the player that bough the house. So we need to load player from db. + local buyerQuery = db.storeQuery("SELECT `name` FROM `players` WHERE `id` = "..orderCount.." LIMIT 1") + if buyerQuery ~= false then + local buyerName = result.getString(buyerQuery, "name") + result.free(buyerQuery) + if house then + db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") + house:setOwnerGuid(orderCount) + player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully bought the house "..house:getName().." on "..buyerName..", be sure to have the money for the rent in the bank.") + print("Process complete. [".. buyerName .."] has received house: ["..house:getName().."]") + else + print("Process canceled. Failed to load house with ID: "..orderItemId) + end + else + print("Process canceled. Failed to load player with ID: "..orderCount) + end + end - until not result.next(orderQuery) - result.free(orderQuery) - end - return true -end \ No newline at end of file + if not served then -- If this order hasn't been processed yet (missing type handling?) + print("Znote shop: Type ["..orderType.."] not properly processed. Missing Lua code?") + end + else -- Not in protection zone + player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have a pending shop order, please enter protection zone.') + print("Skipped one shop order. Reason: Player: [".. player:getName() .."] is not inside protection zone.") + end + else -- player not logged in + print("Skipped one shop order. Reason: Player with id [".. player_id .."] is not online.") + end + + until not result.next(orderQuery) + result.free(orderQuery) + end + return true +end diff --git a/LUA/TFS_10/talkaction report system/adminreport.lua b/LUA/TFS_10/talkaction report system/adminreport.lua index b4777ac..e1f6863 100644 --- a/LUA/TFS_10/talkaction report system/adminreport.lua +++ b/LUA/TFS_10/talkaction report system/adminreport.lua @@ -1,7 +1,6 @@ -- -- Coded by Dark ShaoOz, modified by Znote -function onSay(cid, words, param, channel) - local player = Player(cid) +function onSay(player, words, param) local storage = 6708 -- You can change the storage if its already in use local delaytime = 30 -- Exhaust In Seconds. if param == '' then diff --git a/LUA/TFS_10/talkaction shopsystem/talkaction XML.txt b/LUA/TFS_10/talkaction shopsystem/talkaction XML.txt deleted file mode 100644 index 2fdffee..0000000 --- a/LUA/TFS_10/talkaction shopsystem/talkaction XML.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/LUA/TFS_10/talkaction shopsystem/znoteshop.lua b/LUA/TFS_10/talkaction shopsystem/znoteshop.lua index e068d7c..4894053 100644 --- a/LUA/TFS_10/talkaction shopsystem/znoteshop.lua +++ b/LUA/TFS_10/talkaction shopsystem/znoteshop.lua @@ -1,3 +1,4 @@ +-- -- Znote Shop v1.1 for Znote AAC on TFS 1.2+ function onSay(player, words, param) local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. @@ -5,7 +6,7 @@ function onSay(player, words, param) if player:getStorageValue(storage) <= os.time() then player:setStorageValue(storage, os.time() + cooldown) - + local type_desc = { "itemids", "pending premium (skip)", @@ -34,11 +35,11 @@ function onSay(player, words, param) description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) - + -- ORDER TYPE 1 (Regular item shop products) if q_type == 1 then served = true - -- Get wheight + -- Get weight if player:getFreeCapacity() >= ItemType(q_itemid):getWeight(q_count) then db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") player:addItem(q_itemid, q_count) @@ -90,22 +91,21 @@ function onSay(player, words, param) -- ORDER TYPE 7 (Direct house purchase) if orderType == 7 then - served = true - local house = House(orderItemId) - -- Logged in player is not neccesarily the player that bough the house. So we need to load player from db. - local buyerQuery = db.storeQuery("SELECT `name` FROM `players` WHERE `id` = "..orderCount.." LIMIT 1") - if buyerQuery ~= false then - local buyerName = result.getDataString(buyerQuery, "name") - result.free(buyerQuery) - if house then - db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") - house:setOwnerGuid(orderCount) - player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully bought the house "..house:getName().." on "..buyerName..", be sure to have the money for the rent in the bank.") - print("Process complete. [".. buyerName .."] has recieved house: ["..house:getName().."]") - end - end + served = true + local house = House(orderItemId) + -- Logged in player is not necessarily the player that bough the house. So we need to load player from db. + local buyerQuery = db.storeQuery("SELECT `name` FROM `players` WHERE `id` = "..orderCount.." LIMIT 1") + if buyerQuery ~= false then + local buyerName = result.getString(buyerQuery, "name") + result.free(buyerQuery) + if house then + db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. orderId .. ";") + house:setOwnerGuid(orderCount) + player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully bought the house "..house:getName().." on "..buyerName..", be sure to have the money for the rent in the bank.") + print("Process complete. [".. buyerName .."] has received house: ["..house:getName().."]") + end + end end - -- Add custom order types here -- Type 1 is for itemids (Already coded here) @@ -130,4 +130,4 @@ function onSay(player, words, param) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. player:getStorageValue(storage) - os.time()) end return false -end \ No newline at end of file +end diff --git a/config.php b/config.php index 6706478..16c25a4 100644 --- a/config.php +++ b/config.php @@ -3,17 +3,17 @@ $isWindows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'); define('ZNOTE_OS', ($isWindows) ? 'WINDOWS' : 'LINUX'); } - + // If you want to use items.php (not 100% yet, I guess) - // Tested with TFS items.xml master (1.3) + // Tested with TFS master items.xml (1.x) $config['items'] = false; - - // Available options: TFS_02, TFS_03, OTHIRE + + // Available options: TFS_02, TFS_03, OTHIRE, TFS_10 // OTHire = OTHIRE // TFS 0.2 = TFS_02 - // TFS 0.3 = TFS_03 (If ur using 0.3.6, set $config['salt'] to false)! + // TFS 0.3 = TFS_03 (If you are using 0.3.6, set $config['salt'] to false)! // TFS 0.4 = TFS_03 - // TFS 1.0 = TFS_10 (Under developement) + // TFS 1.x = TFS_10 (Current under development version) $config['ServerEngine'] = 'TFS_10'; // As far as I know, OTX is based on TFS_03, so make sure TFS version is configured TFS_03 $config['CustomVersion'] = false; @@ -22,14 +22,14 @@ $config['site_title_context'] = 'Because open communities are good communities. :3'; $config['site_url'] = "http://demo.znote.eu"; - // Path to server folder without / Example: C:\Users\Alvaro\Documents\GitHub\forgottenserver + // Path to server folder without "\" (or "/") at the end, ex: C:\Users\Username\Documents\GitHub\forgottenserver $config['server_path'] = ''; // ------------------------ \\ // MYSQL CONNECTION DETAILS \\ // ------------------------ \\ - // phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.). + // phpmyadmin username for OT server: (DONT USE "root" if you are hosting to public). $config['sqlUser'] = 'tfs13'; // phpmyadmin password for OT server: @@ -67,7 +67,7 @@ // ------------------- \\ // Enable / disable Questlog function (true / false) $config['EnableQuests'] = false; - + // array for filling questlog (Questid, max value, name, end of the quest fill 1 for the last part 0 for all others) $config['quests'] = array( array(1501,100,"Killing in the Name of",0), @@ -128,27 +128,27 @@ array(12036,6,"The Ice Islands Quest",1), ); - //Achievements based on "https://github.com/otland/forgottenserver/blob/master/data/lib/core/achievements.lua" (TFS 1.0) + // Achievements based on "https://github.com/otland/forgottenserver/blob/master/data/lib/core/achievements.lua" (TFS 1.x) $config['Ach'] = false; $config['achievements'] = array( 35000 => array( - 'First Dragon', //name - 'Rumours say that you will never forget your first Dragon', //comment - 'points' => '1', //points - 'img' => 'https://i.imgur.com/Nk2XDge.gif', //img link or folder (example)> 'images/dragon.png' + 'First Dragon', // name + 'Rumours say that you will never forget your first Dragon', // description + 'points' => '1', // points + 'img' => 'https://i.imgur.com/Nk2XDge.gif', // direct image link or path, ex: 'images/dragon.png' ), 35001 => array( 'Uniwheel', - 'You\'re probably one of the very few people with this classic and unique ride, hope it doesn\'t break anytime soon.', //comment - 'points' => '1', //points - 'img' => 'https://i.imgur.com/0GYRgGj.gif', //img link or folder (example)> 'images/dragon.png' + 'You\'re probably one of the very few people with this classic and unique ride, hope it doesn\'t break anytime soon.', // description + 'points' => '1', + 'img' => 'https://i.imgur.com/0GYRgGj.gif', // direct image link or path, ex: 'images/uniwheel.png' 'secret' => true ), 30001 => array( 'Allow Cookies?', 'With a perfectly harmless smile you fooled all of those wicecrackers into eating your exploding cookies. Consider a boy or girl scout outfit next time to make the trick even better.', - 'points' => '10', // 1-3 points (1star), 4-6 points(2 stars), 7-9 points(3 stars), 10 points => (4 stars) - 'secret' => true // show "secret" image + 'points' => '10', // 1-3 points (1 star), 4-6 points (2 stars), 7-9 points(3 stars), 10 points => (4 stars) + 'secret' => true // show "secret" badge ), 30002 => array( 'Backpack Tourist', @@ -254,18 +254,17 @@ ), ); - // TFS 1.0 powergamers and top online - //Before enabling powergamers, make sure that you have added LUA files and possible cloums to your server. - //files can be found at Lua folder. - + // TFS 1.x powergamers and top online + // Before enabling powergamers, make sure that you have added Lua files and added the SQL columns to your server db. + // files can be found at LUA folder. $config['powergamers'] = array( 'enabled' => true, // Enable or disable page - 'limit' => 20, //Number of players that it will show. + 'limit' => 20, // Number of players that it will show. ); $config['toponline'] = array( 'enabled' => true, // Enable or disable page - 'limit' => 20, //Number of players that it will show. + 'limit' => 20, // Number of players that it will show. ); // Vocation IDs, names and which vocation ID they got promoted from @@ -359,34 +358,36 @@ ), ); // Town ids and names: (In RME map editor, open map, click CTRL + T to view towns, their names and their IDs. - // townID => 'townName' etc: ['3'=>'Thais'] + // townID => 'townName' ex: [1 => 'Rookgaard'] $config['towns'] = array( - 1 => 'Venore', - 2 => 'Thais', - 3 => 'Kazordoon', - 4 => 'Carlin', + 1 => 'Rookgaard', + 2 => 'Rookgaard Tutorial Island', + 3 => 'Island Of Destiny', + 4 => 'Dawnport', 5 => "Ab'Dendriel", - 6 => 'Rookgaard', - 7 => 'Liberty Bay', - 8 => 'Port Hope', - 9 => 'Ankrahmun', - 10 => 'Darashia', + 6 => 'Carlin', + 7 => 'Kazordoon', + 8 => 'Thais', + 9 => 'Venore', + 10 => 'Ankrahmun', 11 => 'Edron', - 12 => 'Svargrond', - 13 => 'Yalahar', - 14 => 'Farmine', - 28 => 'Gray Beach', - 29 => 'Roshamuul', - 30 => 'Rookgaard Tutorial Island', - 31 => 'Isle of Solitude', - 32 => 'Island Of Destiny', - 33 => 'Rathleton' + 12 => 'Farmine', + 13 => 'Darashia', + 14 => 'Liberty Bay', + 15 => 'Port Hope', + 16 => 'Svargrond', + 17 => 'Yalahar', + 18 => 'Gray Beach', + 19 => 'Krailos', + 20 => 'Rathleton', + 21 => 'Roshamuul', + 22 => 'Issavi' ); - // - TFS 1.0 ONLY -- HOUSE AUCTION SYSTEM! + // -- HOUSE AUCTION SYSTEM! (TFS 1.x ONLY) $config['houseConfig'] = array( - 'HouseListDefaultTown' => 1, // Default town id to display when visting house list page page. - 'minimumBidSQM' => 200, // minimum bid cost on auction (per SQM) + 'HouseListDefaultTown' => 8, // Default town id to display when visting house list page page. + 'minimumBidSQM' => 200, // Minimum bid cost on auction (per SQM) 'auctionPeriod' => 24 * 60 * 60, // 24 hours auction time. 'housesPerPlayer' => 1, 'requirePremium' => false, @@ -394,7 +395,7 @@ // Instant buy with shop points 'shopPoints' => array( 'enabled' => true, - // SQM => points cost + // SQM count => points cost 'cost' => array( 1 => 10, 25 => 15, @@ -418,7 +419,7 @@ 0 => 'Pending', 1 => 'Accepted', 2 => 'Rejected', - 3 => 'Cancelled', + 3 => 'Canceled', 4 => 'Ended by kill limit', 5 => 'Ended', ); @@ -436,11 +437,12 @@ // Max characters on each account: $config['max_characters'] = 7; - // Available character vocation users can create. + // Available character vocation users can choose (specify vocation ID). $config['available_vocations'] = array(1, 2, 3, 4); // Available towns (specify town ids, etc: (1, 2, 3); to display 3 town options (town id 1, 2 and 3). - $config['available_towns'] = array(1, 2, 4, 5); + // Town IDs are the ones from $config['towns'] array + $config['available_towns'] = array(6, 7, 8, 9); $config['player'] = array( 'base' => array( @@ -450,13 +452,13 @@ 'cap' => 470, 'soul' => 100 ), - // health, mana cap etc are calculated with $config['vocations_gain'] and 'base' values of $config['player'] + // Health, mana cap etc are calculated with $config['vocations_gain'] and 'base' values of $config['player'] 'create' => array( 'level' => 8, - 'novocation' => array( // vocation id 0 (No vocation) special settings - 'level' => 1, // Level + 'novocation' => array( // Vocation id 0 (No vocation) special settings + 'level' => 1, 'forceTown' => true, - 'townId' => 30 + 'townId' => 1 ), 'skills' => array( // See $config['vocations'] for proper vocation names of these IDs // No vocation @@ -532,12 +534,11 @@ ) ); - // Minimum allowed character name letters. Etc 4 letters: "Kåre". + // Minimum allowed letters in character name. Ex: 4 letters: "Kare". $config['minL'] = 3; - // Maximum allowed character name letters. Etc 20 letters: "Bobkåreolesofiesberg" + // Maximum allowed letters in character name. Ex: 20 letters: "Bobkareolesofiesberg" $config['maxL'] = 20; - - // Maximum allowed character name words. Etc 2 words = "Bob Kåre", 3 words: "Bob Arne Kåre" as max char name words. + // Maximum allowed words in character name. Ex: 2 words = "Bob Kare", 3 words: "Bob Arne Kare" as maximum char name words. $config['maxW'] = 3; // -------------- \\ @@ -563,19 +564,21 @@ 'price_sqm' => '50', // price per house sqm ); - $config['delete_character_interval'] = '3 DAY'; // Delay after user character delete request is executed eg. 1 DAY, 2 HOUR, 3 MONTH etc. + $config['delete_character_interval'] = '3 DAY'; // Delay after user character delete request is executed, ex: 1 DAY, 2 HOUR, 3 MONTH etc. $config['validate_IP'] = false; $config['salt'] = false; // Restricted names $config['invalidNameTags'] = array( - "owner", "gamemaster", "hoster", "admin", "staff", "tibia", "account", "god", "anal", "ass", "fuck", "sex", "hitler", "pussy", "dick", "rape", "cm", "gm", "amazon", "valkyrie", "carrion worm", "rotworm", "rotworm queen", "cockroach", "kongra", "merlkin", "sibang", "crystal spider", "giant spider", "poison spider", "scorpion", "spider", "tarantula", "achad", "axeitus headbanger", "bloodpaw", "bovinus", "colerian the barbarian", "cursed gladiator", "frostfur", "orcus the cruel", "rocky", "the hairy one", "avalanche", "drasilla", "grimgor guteater", "kreebosh the exile", "slim", "spirit of earth", "spirit of fire", "spirit of water", "the dark dancer", "the hag", "darakan the executioner", "deathbringer", "fallen mooh'tah master ghar", "gnorre chyllson", "norgle glacierbeard", "svoren the mad", "the masked marauder", "the obliverator", "the pit lord", "webster", "barbarian bloodwalker", "barbarian brutetamer", "barbarian headsplitter", "barbarian skullhunter", "bear", "panda", "polar bear", "braindeath", "beholder", "elder beholder", "gazer", "chicken", "dire penguin", "flamingo", "parrot", "penguin", "seagull", "terror bird", "bazir", "infernatil", "thul", "munster", "son of verminor", "xenia", "zoralurk", "big boss trolliver", "foreman kneebiter", "mad technomancer", "man in the cave", "lord of the elements", "the count", "the plasmother", "dracola", "the abomination", "the handmaiden", "mr. punish", "the countess sorrow", "the imperor", "massacre", "apocalypse", "brutus bloodbeard", "deadeye devious", "demodras", "dharalion", "fernfang", "ferumbras", "general murius", "ghazbaran", "grorlam", "lethal lissy", "morgaroth", "necropharus", "orshabaal", "ron the ripper", "the evil eye", "the horned fox", "the old widow", "tiquandas revenge", "apprentice sheng", "dog", "hellhound", "war wolf", "winter wolf", "wolf", "chakoya toolshaper", "chakoya tribewarden", "chakoya windcaller", "blood crab", "crab", "frost giant", "frost giantess", "ice golem", "yeti", "acolyte of the cult", "adept of the cult", "enlightened of the cult", "novice of the cult", "ungreez", "dark torturer", "demon", "destroyer", "diabolic imp", "fire devil", "fury", "hand of cursed fate", "juggernaut", "nightmare", "plaguesmith", "blue djinn", "efreet", "admin", "green djinn", "marid", "frost dragon", "wyrm", "sea serpent", "dragon lord", "dragon", "hydra", "dragon hatchling", "dragon lord hatchling", "frost dragon hatchling", "dwarf geomancer", "dwarf guard", "dwarf soldier", "dwarf", "dworc fleshhunter", "dworc venomsniper", "dworc voodoomaster", "elephant", "mammoth", "elf arcanist", "elf scout", "elf", "charged energy elemental", "energy elemental", "massive energy elemental", "overcharged energy elemental", "energy overlord", "cat", "lion", "tiger", "azure frog", "coral frog", "crimson frog", "green frog", "orchid frog", "toad", "jagged earth elemental", "muddy earth elemental", "earth elemental", "massive earth elemental", "earth overlord", "gargoyle", "stone golem", "ghost", "phantasm", "phantasm", "pirate ghost", "spectre", "cyclops smith", "cyclops drone", "behemoth", "cyclops", "slick water elemental", "roaring water elemental", "ice overlord", "water elemental", "massive water elemental", "ancient scarab", "butterfly", "bug", "centipede", "exp bug", "larva", "scarab", "wasp", "lizard sentinel", "lizard snakecharmer", "lizard templar", "minotaur archer", "minotaur guard", "minotaur mage", "minotaur", "squirrel", "goblin demon", "badger", "bat", "deer", "the halloween hare", "hyaena", "pig", "rabbit", "silver rabbit", "skunk", "wisp", "dark monk", "monk", "tha exp carrier", "necromancer", "priestess", "orc berserker", "orc leader", "orc rider", "orc shaman", "orc spearman", "orc warlord", "orc warrior", "orc", "goblin leader", "goblin scavenger", "goblin", "goblin assassin", "assasin", "bandit", "black knight", "hero", "hunter", "nomad", "smuggler", "stalker", "poacher", "wild warrior", "ashmunrah", "dipthrah", "mahrdis", "morguthis", "omruc", "rahemos", "thalas", "vashresamun", "pirate buccaneer", "pirate corsair", "pirate cutthroat", "pirate marauder", "carniphila", "spit nettle", "fire overlord", "massive fire elemental", "blistering fire elemental", "blazing fire elemental", "fire elemental", "hellfire fighter", "quara constrictor scout", "quara hydromancer scout", "quara mantassin scout", "quara pincher scout", "quara predator scout", "quara constrictor", "quara hydromancer", "quara mantassin", "quara pincher", "quara predator", "cave rat", "rat", "cobra", "crocodile", "serpent spawn", "snake", "wyvern", "black sheep", "sheep", "mimic", "betrayed wraith", "bonebeast", "demon skeleton", "lost soul", "pirate skeleton", "skeleton", "skeleton warrior", "undead dragon", "defiler", "slime2", "slime", "bog raider", "ice witch", "warlock", "witch", "bones", "fluffy", "grynch clan goblin", "hacker", "minishabaal", "primitive", "tibia bug", "undead minion", "annihilon", "hellgorak", "latrivan", "madareth", "zugurosh", "ushuriel", "golgordan", "thornback tortoise", "tortoise", "eye of the seven", "deathslicer", "flamethrower", "magicthrower", "plaguethrower", "poisonthrower", "shredderthrower", "troll champion", "frost troll", "island troll", "swamp troll", "troll", "banshee", "blightwalker", "crypt shambler", "ghoul", "lich", "mummy", "vampire", "grim reaper", "frost dragon", "mercenary", "zathroth", "goshnar", "durin", "demora", "orc champion", "dracula", "alezzo", "prince almirith", "elf warlord", "magebomb", "nightmare scion" + "owner", "gamemaster", "hoster", "admin", "staff", "tibia", "account", "god", "hitler", "cm", "gm", "game master", "anal", "anus", "arse", "ass", "asses", "assfucker", "assfukka", "asshole", "arsehole", "asswhole", "assmunch", "ballsack", "wanky", "whore", "whoar", "xxx", "xx", "yaoi", "yury", "bastard", "beastial", "bestial", "bellend", "bdsm", "beastiality", "bestiality", "bitch", "bitches", "bitchin", "bitching", "bimbo", "bimbos", "blow job", "blowjob", "blowjobs", "blue waffle", "boob", "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts", "booty call", "brown shower", "brown showers", "boner", "bondage", "buceta", "bukake", "bukkake", "bullshit", "bull shit", "busty", "butthole", "carpet muncher", "cawk", "chink", "cipa", "clit", "clits", "clitoris", "cnut", "cock", "cocks", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocksuck", "cocksucked", "cocksucking", "cocksucks", "cocksucker", "cokmuncher", "coon", "cow girl", "cow girls", "cowgirl", "cowgirls", "crap", "crotch", "cum", "cummer", "cumming", "cuming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus", "cunt", "cuntlicker", "cuntlicking", "cunts", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "deepthroat", "deep throat", "dog style", "doggie style", "doggiestyle", "doggy style", "doggystyle", "donkeyribber", "doosh", "douche", "duche", "dyke", "ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation", "ejakulate", "erotic", "erotism", "fag", "faggot", "fagging", "faggit", "faggitt", "faggs", "fagot", "fagots", "fags", "fatass", "femdom", "fingering", "footjob", "foot job", "fuck", "fucks", "fucker", "fuckers", "fucked", "fuckhead", "fuckheads", "fuckin", "fucking", "fcuk", "fcuker", "fcuking", "felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange", "fook", "fooker", "fucka", "fuk", "fuks", "fuker", "fukker", "fukkin", "fukking", "futanari", "futanary", "gangbang", "gangbanged", "gang bang", "gokkun", "golden shower", "goldenshower", "gaysex", "goatse", "handjob", "hand job", "hentai", "hooker", "hoer", "homo", "horny", "incest", "jackoff", "jack off", "jerkoff", "jerk off", "jizz", "knob", "kinbaku", "labia", "masturbate", "masochist", "mofo", "mothafuck", "motherfuck", "motherfucker", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked", "mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings", "mothafucks", "mother fucker", "motherfucked", "motherfucker", "motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "milf", "muff", "negro", "nigga", "nigger", "nigg", "nipple", "nipples", "nob", "nob jokey", "nobhead", "nobjocky", "nobjokey", "numbnuts", "nutsack", "nude", "nudes", "orgy", "orgasm", "orgasms", "panty", "panties", "penis", "playboy", "pinto", "porn", "porno", "pornography", "pron", "punheta", "pussy", "pussies", "puta", "rape", "raping", "rapist", "rectum", "retard", "rimming", "sadist", "sadism", "schlong", "scrotum", "sex", "semen", "shemale", "she male", "shibari", "shibary", "shit", "shitdick", "shitfuck", "shitfull", "shithead", "shiting", "shitings", "shits", "shitted", "shitters", "shitting", "shittings", "shitty", "shota", "skank", "slut", "sluts", "smut", "smegma", "spunk", "strip club", "stripclub", "tit", "tits", "titties", "titty", "titfuck", "tittiefucker", "titties", "tittyfuck", "tittywank", "titwank", "threesome", "three some", "throating", "twat", "twathead", "twatty", "twunt", "viagra", "vagina", "vulva", "viado", "wank", "wanker", + // Comment out the line bellow if you want to allow players to use creature names: + "acolyte of the cult", "adept of the cult", "amazon", "ancient scarab", "arachnophobica", "assassin", "azure frog", "badger", "bandit", "banshee", "barbarian bloodwalker", "barbarian brutetamer", "barbarian headsplitter", "barbarian skullhunter", "bat", "bear", "behemoth", "betrayed wraith", "biting book", "black knight", "black sphinx acolyte", "blightwalker", "blood beast", "blood crab", "blood hand", "blood priest", "blue djinn", "boar", "bog frog", "bog raider", "bonebeast", "bonelord", "boogy", "brain squid", "braindeath", "breach brood", "brimstone bug", "burning book", "burning gladiator", "burster spectre", "carniphila", "carrion worm", "cave devourer", "centipede", "chakoya toolshaper", "chakoya tribewarden", "chakoya windcaller", "choking fear", "clay guardian", "clomp", "cobra", "coral frog", "corym charlatan", "corym skirmisher", "corym vanguard", "crab", "crazed beggar", "crazed summer rearguard", "crazed summer vanguard", "crazed winter rearguard", "crazed winter vanguard", "crimson frog", "crocodile", "crypt defiler", "crypt shambler", "crypt warden", "crystal spider", "crystalcrusher", "cult believer", "cult enforcer", "cult scholar", "cyclops", "cyclops drone", "cyclops smith", "dark apprentice", "dark faun", "dark magician", "dark monk", "dark torturer", "dawnfire asura", "death blob", "deathling scout", "deathling spellsinger", "deepling guard", "deepling scout", "deepling spellsinger", "deepling warrior", "deepling worker", "deepworm", "defiler", "demon outcast", "demon skeleton", "demon", "destroyer", "devourer", "diabolic imp", "diamond servant", "diremaw", "dragon hatchling", "dragon lord hatchling", "dragon lord", "dragon", "draken abomination", "draken elite", "draken spellweaver", "draken warmaster", "dread intruder", "drillworm", "dwarf geomancer", "dwarf guard", "dwarf henchman", "dwarf soldier", "dwarf", "dworc fleshhunter", "dworc venomsniper", "dworc voodoomaster", "earth elemental", "efreet", "elder bonelord", "elder wyrm", "elephant", "elf arcanist", "elf scout", "elf", "emerald damselfly", "energetic book", "energy elemental", "enfeebled silencer", "enlightened of the cult", "enraged crystal golem", "eternal guardian", "falcon knight", "falcon paladin", "faun", "fire devil", "fire elemental", "firestarter", "forest fury", "fox", "frazzlemaw", "frost dragon hatchling", "frost dragon", "frost flower asura", "fury", "gargoyle", "gazer spectre", "ghastly dragon", "ghost", "ghoul", "giant spider", "gladiator", "gloom wolf", "glooth bandit", "glooth blob", "glooth brigand", "glooth golem", "gnarlhound", "guzzlemaw", "hand of cursed fate", "haunted treeling", "hellhound", "hellflayer", "hellfire fighter", "hellspawn", "hero", "honour guard", "hunter", "hydra", "ice golem", "ice witch", "infernalist", "juggernaut", "killer caiman", "kongra", "lancer beetle", "lamassu", "lich", "lizard chosen", "lizard dragon priest", "lizard high guard", "lizard legionnaire", "lizard sentinel", "lizard snakecharmer", "lizard templar", "lizard zaogun", "lost soul", "lumbering carnivor", "mad scientist", "mammoth", "marid", "marsh stalker", "medusa", "menacing carnivor", "mercury blob", "merlkin", "metal gargoyle", "midnight asura", "minotaur amazon", "minotaur archer", "minotaur cult follower", "minotaur cult prophet", "minotaur cult zealot", "minotaur guard", "minotaur hunter", "minotaur mage", "minotaur", "monk", "mooh'tah warrior", "moohtant", "mummy", "mutated bat", "mutated human", "mutated rat", "mutated tiger", "necromancer", "nightmare scion", "nightmare", "nightstalker", "nomad", "novice of the cult ", "nymph", "omnivora", "orc berserker", "orc leader", "orc rider", "orc shaman", "orc warlord", "orc warrior", "orc", "pirate buccaneer", "pirate corsair", "pirate cutthroat", "pirate ghost", "pirate marauder", "pirate skeleton", "pixie", "plaguesmith", "priestess", "pooka", "ravenous lava lurker", "renegade knight", "retching horror", "ripper spectre", "roaring lion", "rot elemental", "rotworm", "rustheap golem", "scarab", "scorpion", "sea serpent", "serpent spawn", "sibang", "silencer", "skeleton elite warrior", "souleater", "spectre", "spiky carnivor", "stone golem", "stonerefiner", "swamp troll", "tarantula", "terramite", "thornback tortoise", "toad", "tortoise", "twisted pooka", "undead elite gladiator", "undead gladiator", "valkyrie", "vampire bride", "vampire viscount", "vampire", "vexclaw", "vicious squire", "vile grandmaster", "vulcongra", "wailing widow", "war golem", "war wolf", "warlock", "wasp", "water elemental", "weakened frazzlemaw", "werebadger", "werebear", "wereboar", "werefox", "werewolf", "worm priestess", "wolf", "wyrm", "wyvern", "yielothax", "young sea serpent", "zombie", "adult goanna", "black sphinx acolyte", "burning gladiator", "cobra assassin", "cobra scout", "cobra vizier", "crypt warden", "feral sphinx", "lamassu", "manticore", "ogre rowdy", "ogre ruffian", "ogre sage", "priestess of the wild sun", "sphinx", "sun-marked goanna", "young goanna", "cursed prospector", "evil prospector", "flimsy lost soul", "freakish lost soul", "mean lost soul", "a shielded astral glyph", "abyssador", "an astral glyph", "ascending ferumbras", "annihilon", "apocalypse", "apprentice sheng", "arachir the ancient one", "armenius", "azerus", "barbaria", "baron brute", "battlemaster zunzu", "bazir", "big boss trolliver", "bones", "boogey", "bretzecutioner", "brokul", "bruise payne", "brutus bloodbeard", "bullwark", "chizzoron the distorter", "coldheart", "countess sorrow", "deadeye devious", "deathbine", "deathstrike", "demodras", "dharalion", "diblis the fair", "dirtbeard", "diseased bill", "diseased dan", "diseased fred", "doomhowl", "dracola", "dreadwing", "ekatrix", "energized raging mage", "esmeralda", "ethershreck", "evil mastermind", "fatality", "fazzrah", "fernfang", "feroxa", "ferumbras", "flameborn", "fleshcrawler", "fleshslicer", "fluffy", "foreman kneebiter", "freegoiz", "fury of the emperor", "furyosa", "gaz'haragoth", "general murius", "ghazbaran", "glitterscale", "gnomevil", "golgordan", "grand mother foulscale", "groam", "grorlam", "gorgo", "hairman the huge", "haunter", "hellgorak", "hemming", "heoni", "hide", "hirintror", "horadron", "horestis", "incineron", "infernatil", "inky", "jaul", "kerberos", "koshei the deathless", "kraknaknork's demon", "kraknaknork", "kroazur", "latrivan", "lethal lissy", "leviathan", "lisa", "lizard abomination", "lord of the elements", "mad mage", "mad technomancer", "madareth", "man in the cave", "massacre", "mawhawk", "menace", "mephiles", "minishabaal", "monstor", "morgaroth", "morik the gladiator", "mr. punish", "munster", "mutated zalamon", "necropharus", "obujos", "orshabaal", "paiz the pauperizer", "raging mage", "ribstride", "rocko", "ron the ripper", "rottie the rotworm", "rotworm queen", "scarlett etzel", "scorn of the emperor", "shardhead", "sharptooth", "sir valorcrest", "snake god essence", "snake thing", "spider queen", "spite of the emperor", "splasher", "stonecracker", "sulphur scuttler", "tanjis", "terofar", "teleskor", "the abomination", "the axeorcist", "the blightfather", "the bloodtusk", "the bloodweb", "the book of death", "the collector", "the count", "the weakened count", "the dreadorian", "the evil eye", "the frog prince", "the handmaiden", "the horned fox", "the keeper", "the imperor", "the many", "the noxious spawn", "the old widow", "the pale count", "the plasmother", "the snapper", "the distorted astral source", "the astral source", "thul", "tiquandas revenge", "tirecz", "tyrn", "tormentor", "tremorak", "tromphonyte", "ungreez", "ushuriel", "verminor", "versperoth", "warlord ruzad", "white pale", "wrath of the emperor", "xenia", "yaga the crone", "yakchal", "zanakeph", "zavarash", "zevelon duskbringer", "zomba", "zoralurk", "zugurosh", "zushuka", "zulazza the corruptor", "glooth bomb", "bibby bloodbath", "doctor perhaps", "mooh'tah master", "the welter" ); // Use guild logo system $config['use_guild_logos'] = true; - + // Use country flags $config['country_flags'] = array( 'enabled' => true, @@ -627,14 +630,14 @@ // Used for the Downloads page. $config['client'] = 1098; // 954 = client 9.54 - // Download link to client. + // Download link to client. $config['client_download'] = 'http://tibiaclient.otslist.eu/download/tibia'. $config['client'] .'.exe'; $config['client_download_linux'] = 'http://tibiaclient.otslist.eu/download/tibia'. $config['client'] .'.tgz'; $config['port'] = 7171; // Port number to connect to your OT. - + $config['status'] = array( - 'status_check' => false, //enable or disable status checker + 'status_check' => false, // Enable or disable status checker 'status_ip' => '127.0.0.1', 'status_port' => "7171", ); @@ -643,11 +646,11 @@ $config['gameserver'] = array( 'ip' => '127.0.0.1', 'port' => 7172, - 'name' => 'OTXServer-Global' // Must be identical to config.lua (OT config file) server name. + 'name' => 'Forgotten' // Must be identical to config.lua (OT config file) server name. ); // How often do you want highscores to update? - $config['cache_lifespan'] = 5;//60 * 15; // 15 minutes. + $config['cache_lifespan'] = 5; // 60 * 15; // 15 minutes. // WARNING! Account names written here will have admin access to web page! $config['page_admin_access'] = array( @@ -662,11 +665,11 @@ $config['forum'] = array( 'enabled' => true, 'outfit_avatars' => true, // Show character outfit as forum avatar? - 'player_position' => true, // Tutor, Community manager, God etc..? + 'player_position' => true, // Show character position? ex: Tutor, Community Manager, God 'guildboard' => true, 'level' => 5, - 'cooldownPost' => 1,//60, - 'cooldownCreate' => 1,//180, + 'cooldownPost' => 1, // 60, + 'cooldownCreate' => 1, // 180, 'newPostsBumpThreads' => true, 'hidden' => '[H]', 'closed' => '[C]', @@ -682,14 +685,14 @@ ); // IMPORTANT! Write a character name(that exist) that will represent website bans! - // Or remember to create character "God Website" character exist. - // If you don't do this, bann from admin panel won't work properly. - $config['website_char'] = 'Luxitur'; + // Or remember to create character named "God Website". + // If you don't do this, ban from admin panel won't work properly. + $config['website_char'] = 'God Website'; - //----------------\\ - // ADVANCED STUFF \\ - //----------------\\ - // Api config + // ---------------- \\ + // ADVANCED STUFF \\ + // ---------------- \\ + // API config $config['api'] = array( 'debug' => false, ); @@ -715,7 +718,7 @@ 'fromName' => $config['site_title'], ); - // Don't touch this unless you know what you are doing. (modifying this(key value) also requires modifications in OT files /XML/commands.xml). + // Don't touch this unless you know what you are doing. (modifying these (key value) also requires modifications in OT files data/XML/groups.xml). $config['ingame_positions'] = array( 1 => 'Player', 2 => 'Tutor', @@ -725,18 +728,18 @@ 6 => 'God', ); - // Enable OS advanced feautures? false = no, true = yes + // Enable OS advanced features? false = no, true = yes $config['os_enabled'] = false; // What kind of computer are you hosting this website on? // Available options: LINUX or WINDOWS - $config['os'] = ZNOTE_OS; + $config['os'] = ZNOTE_OS; // Use 'ZNOTE_OS' to auto-detect // Measure how much players are lagging in-game. (Not completed). $config['ping'] = false; // BAN STUFF - Don't touch this unless you know what you are doing. - // You can order the lines the way you want, from top to bot, in which order you + // You can order the lines the way you want, from top to bottom, in which order you // wish for them to be displayed in admin panel. Just make sure key[#] represent your description. $config['ban_type'] = array( 4 => 'NOTATION_ACCOUNT', @@ -760,7 +763,7 @@ ); // Ban reasons, for changes beside default values to work with client, - // you also need to edit sources (tools.cpp line 1096) + // you also need to edit sources (https://github.com/otland/forgottenserver/blob/master/src/enums.h#L29) $config['ban_reason'] = array( 0 => 'Offensive Name', 1 => 'Invalid Name Format', @@ -800,9 +803,9 @@ 2592000 => '1 month', ); - // --------------- \\ - // SECURITY STUFF \\ - // --------------- \\ + // --------------- \\ + // SECURITY STUFF \\ + // --------------- \\ $config['use_token'] = false; // Set up captcha keys on https://www.google.com/recaptcha/ $config['use_captcha'] = false; @@ -814,13 +817,13 @@ $config['session_prefix'] = 'znote_'; /* Store visitor data - Store visitor data in the database, logging every IP visitng site, + Store visitor data in the database, logging every IP visiting site, and how many times they have visited the site. And sometimes what they do on the site. - + This helps to prevent POST SPAM (like register 1000 accounts in a few seconds) and other things which can stress and slow down the server. - + The only downside is that database can get pretty fed up with much IP data if table never gets flushed once in a while. So I highly recommend you to configure flush_ip_logs if IPs are logged. @@ -842,17 +845,18 @@ $config['ip_security'] = array( 'time_period' => 10, // In seconds 'max_activity' => 10, // page clicks/visits - 'max_post' => 6, // register, create, highscore, character search such actions + 'max_post' => 6, // register, create, highscore, character search and such actions 'max_account' => 1, // register 'max_character' => 1, // create char - 'max_forum_post' => 1, // Create threads and post in forum + 'max_forum_post' => 1, // create threads and post in forum ); ////////////// /// PAYPAL /// ////////////// + // https://www.paypal.com/ - // Write your paypal address here, and what currency you want to recieve money in. + // Write your paypal address here, and what currency you want to receive money in. $config['paypal'] = array( 'enabled' => false, 'email' => 'edit@me.com', // Example: paypal@mail.com @@ -879,11 +883,13 @@ ///////////////// /// PAGSEGURO /// ///////////////// - // Write your pagseguro address here, and what currency you want to recieve money in. + // https://pagseguro.uol.com.br/ + + // Write your pagseguro address here, and what currency you want to receive money in. $config['pagseguro'] = array( 'enabled' => false, 'sandbox' => false, - 'email' => '', // Example: pagseguro@mail.com + 'email' => 'edit@me.com', // Example: pagseguro@mail.com 'token' => '', 'currency' => 'BRL', 'product_name' => '', @@ -905,9 +911,10 @@ ////////////////// /// PAYGOL SMS /// ////////////////// + // https://www.paygol.com/ // !!! Paygol takes 60%~ of the money, and send aprox 40% to your paypal. // You can configure paygol to send each month, then they will send money - // to you 1 month after recieving 50+ eur. + // to you 1 month after receiving 50+ eur. $config['paygol'] = array( 'enabled' => false, 'serviceID' => 86648, // Service ID from paygol.com @@ -941,7 +948,7 @@ /// by leveling characters to sell. It can also discourages illegal/risky third-party account /// services. Since players can buy officially & support the server, dodgy competitors have to sell for cheaper. /// Without admin interference this is organic to each individual community economy inflation. - ///////// + ////////// $config['shop_auction'] = array( 'characterAuction' => false, // Enable/disable this system // Account ID of the account that stores players in the auction. @@ -956,14 +963,14 @@ ); /* - type 1 = items + type 1 = Items type 2 = Premium days type 3 = Change character gender type 4 = Change character name type 5 = Buy outfit (put outfit id as itemid), (put addon id as count [0 = nothing, 1 = first addon, 2 = second addon, 3 = both addons]) type 6 = Buy mount (put mount id as itemid) - type 7 = buy house (hardcoded in the house system, type used for data log) + type 7 = Buy house (hardcoded in the house system, type used for data log) type 8+ = custom coded stuff */ $config['shop_offers'] = array( @@ -971,7 +978,7 @@ 'type' => 1, 'itemid' => 2160, // item to get in-game 'count' => 5, // Stack number (5x itemid) - 'description' => "Crystal coin", // Description shown on website + 'description' => "5 x Crystal coin", // Description shown on website 'points' => 100, // How many points this offer costs ), 2 => array( @@ -1039,10 +1046,10 @@ // You can find your secret token by logging in on OTServers.eu and go to 'MY SERVER' then 'Encourage players to vote'. $config['otservers_eu_voting'] = [ 'enabled' => false, - 'simpleVoteUrl' => '', //This url is used if the player isn't logged in. + 'simpleVoteUrl' => '', // This url is used if the player isn't logged in. 'voteUrl' => 'https://api.otservers.eu/vote_link.php', 'voteCheckUrl' => 'https://api.otservers.eu/vote_check.php', - 'secretToken' => '', //Enter your secret token. Do not share with anyone! - 'landingPage' => '/voting.php?action=reward', //The user will be redirected to this page after voting - 'points' => '1' //Amount of points to give as reward + 'secretToken' => '', // Enter your secret token. Do not share with anyone! + 'landingPage' => '/voting.php?action=reward', // The user will be redirected to this page after voting + 'points' => '1' // Amount of points to give as reward ];