├── .editorconfig ├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── .htaccess ├── LICENSE ├── Lua ├── TFS_02 │ ├── creaturescript firstitems │ │ ├── Installation Instructions.txt │ │ └── firstitems.lua │ └── talkaction shopsystem │ │ ├── talkaction XML.txt │ │ └── znoteshop.lua ├── TFS_03 │ ├── creaturescript firstitems │ │ ├── Installation Instructions.txt │ │ └── firstitems.lua │ ├── creaturescript sync outfits │ │ ├── Installation Instructions.txt │ │ └── syncoutfit.lua │ └── talkaction shopsystem │ │ ├── Alternatives │ │ └── znoteshop.lua │ │ ├── talkaction XML.txt │ │ └── znoteshop.lua └── TFS_10 │ ├── creaturescript firstitems │ ├── Installation Instructions.txt │ └── firstitems.lua │ ├── creaturescript playerdeath │ ├── Installation Instructions.txt │ └── playerdeath.lua │ ├── creaturescript sync outfits │ ├── Installation Instructions.txt │ └── syncoutfit.lua │ ├── globalevent powergamers │ └── powergamers.lua │ ├── globalevent shopsystem │ └── znoteshop.lua │ ├── revscriptsys │ ├── Installation Instructions.txt │ ├── first_items.lua │ ├── first_items_rook.lua │ ├── playerdeath.lua │ ├── powergamers.lua │ ├── report_talkaction.lua │ ├── shopsystem_globalevent.lua │ ├── shopsystem_talkaction.lua │ ├── sync_outfit.lua │ └── znote_login.lua │ ├── talkaction report system │ └── adminreport.lua │ └── talkaction shopsystem │ └── znoteshop.lua ├── README.md ├── achievements.php ├── admin.php ├── admin_auction.php ├── admin_gallery.php ├── admin_helpdesk.php ├── admin_news.php ├── admin_reports.php ├── admin_shop.php ├── admin_skills.php ├── adminempty.php ├── api ├── api.php ├── index.php ├── module.php └── modules │ ├── base │ └── player │ │ ├── class │ │ └── player.php │ │ └── test.php │ ├── highscores │ └── topExperience.php │ ├── samples │ └── blank.php │ └── towns │ └── getTownNames.php ├── auctionChar.php ├── blank.php ├── buypoints.php ├── changelog.php ├── changepassword.php ├── characterprofile.php ├── config.countries.php ├── config.php ├── contact.php ├── createcharacter.php ├── credits.php ├── deaths.php ├── downloads.php ├── engine ├── XML │ ├── items.xml │ ├── spells.xml │ └── stages.xml ├── cache │ ├── deaths.cache.php │ ├── gallery.cache.php │ ├── highscores.cache.php │ ├── houses.cache.php │ ├── houses │ │ └── sqldata.cache.php │ ├── killers.cache.php │ ├── lastkillers.cache.php │ ├── news.cache.php │ ├── support.cache.php │ ├── topPlayer.cache.php │ └── victims.cache.php ├── cert │ └── cacert.pem ├── database │ ├── connect.php │ └── znote_schema.sql ├── footer.php ├── function │ ├── cache.php │ ├── general.php │ ├── itemparser │ │ └── itemlistparser.php │ ├── mail.php │ ├── rfc6238.php │ ├── token.php │ └── users.php ├── guildimg │ └── default@logo.gif ├── img │ ├── bg.png │ ├── lifebarra.png │ ├── manabar.png │ ├── o │ │ ├── b_l.png │ │ ├── b_m.png │ │ ├── b_r.png │ │ ├── m_l.png │ │ ├── m_m.png │ │ ├── m_r.png │ │ ├── t_l.png │ │ ├── t_m.png │ │ └── t_r.png │ ├── outfit.png │ ├── outfitbackgrounds.png │ └── skillsbackground.png ├── init.php └── js │ ├── jquery-1.10.2.min.js │ └── nicedit.js ├── failed.php ├── forum.php ├── forum_search.php ├── gallery.php ├── guilds.php ├── guildwar.php ├── helpdesk.php ├── highscores.php ├── house.php ├── houses.php ├── index.php ├── ipn.php ├── items.php ├── killers.php ├── layout ├── aside.php ├── css │ ├── resp.css │ └── style.css ├── fontawesome │ ├── css │ │ ├── font-awesome.css │ │ └── font-awesome.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── less │ │ ├── animated.less │ │ ├── bordered-pulled.less │ │ ├── core.less │ │ ├── fixed-width.less │ │ ├── font-awesome.less │ │ ├── icons.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── mixins.less │ │ ├── path.less │ │ ├── rotated-flipped.less │ │ ├── screen-reader.less │ │ ├── stacked.less │ │ └── variables.less │ └── scss │ │ ├── _animated.scss │ │ ├── _bordered-pulled.scss │ │ ├── _core.scss │ │ ├── _fixed-width.scss │ │ ├── _icons.scss │ │ ├── _larger.scss │ │ ├── _list.scss │ │ ├── _mixins.scss │ │ ├── _path.scss │ │ ├── _rotated-flipped.scss │ │ ├── _screen-reader.scss │ │ ├── _stacked.scss │ │ ├── _variables.scss │ │ └── font-awesome.scss ├── img │ ├── atomio_front.jpg │ ├── atomio_profile.jpg │ ├── bg.png │ ├── guild_default.jpg │ ├── header.png │ ├── mainbg.jpg │ ├── modern.png │ ├── prev1.png │ ├── prev2.png │ ├── preview.png │ └── sm_icons.png ├── index.php ├── js │ ├── countdown.js │ └── jquery.js ├── layout_config.php ├── menu.php ├── overall │ ├── footer.php │ └── header.php ├── sub.php ├── sub │ ├── index.php │ ├── loginhelp.php │ ├── recover.php │ └── search.php └── widgets │ ├── admin.php │ ├── charactersearch.php │ ├── highscore.php │ ├── houses.php │ ├── login.php │ ├── myaccount.php │ ├── serverinfo.php │ ├── topplayers.php │ └── vote.php ├── login.php ├── logout.php ├── mailtest.php ├── market.php ├── monster_loot.php ├── myaccount.php ├── onlinelist.php ├── pagseguro_ipn.php ├── pagseguro_retorno.php ├── paygol_ipn.php ├── powergamers.php ├── protected.php ├── queststatus.php ├── recovery.php ├── register.php ├── serverinfo.php ├── settings.php ├── shop.php ├── special ├── .htaccess ├── convertoldshoppoints.php ├── database2znoteaac.php ├── milestone.txt └── repairSkills.php ├── spells.php ├── sub.php ├── success.php ├── support.php ├── topguilds.php ├── toponline.php ├── twofa.php ├── twtrNews.php └── voting.php /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = tab 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.{php,css,html,xml,lua,js}] 11 | indent_style = tab 12 | indent_size = 4 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Declare files that will always have LF line endings on checkout. 5 | *.php text eol=lf 6 | *.lua text eol=lf 7 | *.html text eol=lf 8 | *.css text eol=lf 9 | *.js text eol=lf 10 | *.xml text eol=lf 11 | 12 | *.sql text eol=crlf 13 | 14 | # Denote all files that are truly binary and should not be modified. 15 | *.png binary 16 | *.jpg binary 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: Znote 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.cache.php 2 | engine/cache/* 3 | .idea -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | Options +FollowSymLinks 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteCond %{REQUEST_FILENAME} !-d 5 | RewriteRule ^(.*)$ /characterprofile.php?name=$1 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Stefan André Brannfjell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Lua/TFS_02/creaturescript firstitems/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | Step 1: Copy firstitems.lua to /data/creaturescripts/scripts/ folder 2 | -- Edit firstitems.lua with item IDs you want characters to start with on your server. 3 | 4 | Step 2: Restart OT server, and it should work. :) -------------------------------------------------------------------------------- /Lua/TFS_02/creaturescript firstitems/firstitems.lua: -------------------------------------------------------------------------------- 1 | function onLogin(cid) 2 | local storage = 30055 -- storage value 3 | 4 | local sorcItems = { 5 | 2460, -- Brass helmet 6 | 2465, -- Brass armor 7 | 2190, -- Wand of vortex 8 | 2511, -- Brass shield 9 | 2478, -- Brass legs 10 | 2643, -- Leather boots 11 | 1988, -- Brown backpack 12 | 2050 -- torch 13 | } 14 | local druidItems = { 15 | 2460, -- Brass helmet 16 | 2465, -- Brass armor 17 | 2511, -- Brass shield 18 | 2182, -- Snakebite rod 19 | 2478, -- Brass legs 20 | 2643, -- Leather boots 21 | 1988, -- Brown backpack 22 | 2050 -- torch 23 | } 24 | local pallyItems = { 25 | 2460, -- Brass helmet 26 | 2465, -- Brass armor 27 | 2456, -- Bow 28 | 2478, -- Brass legs 29 | 2643, -- Leather boots 30 | 1988, -- Brown backpack 31 | } 32 | local kinaItems = { 33 | 2460, -- Brass helmet 34 | 2465, -- Brass armor 35 | 2511, -- Brass shield 36 | 2412, -- Katana 37 | 2478, -- Brass legs 38 | 2643, -- Leather boots 39 | 1988, -- Brown backpack 40 | 2050 -- torch 41 | } 42 | 43 | if getPlayerStorageValue(cid, storage) == -1 then 44 | setPlayerStorageValue(cid, storage, 1) 45 | if getPlayerVocation(cid) == 1 then 46 | -- Sorcerer 47 | for i = 1, table.getn(sorcItems), 1 do 48 | doPlayerAddItem(cid, sorcItems[i], 1, false) 49 | end 50 | 51 | elseif getPlayerVocation(cid) == 2 then 52 | -- Druid 53 | for i = 1, table.getn(druidItems), 1 do 54 | doPlayerAddItem(cid, druidItems[i], 1, false) 55 | end 56 | 57 | elseif getPlayerVocation(cid) == 3 then 58 | -- Paladin 59 | for i = 1, table.getn(pallyItems), 1 do 60 | doPlayerAddItem(cid, pallyItems[i], 1, false) 61 | end 62 | -- 8 arrows 63 | doPlayerAddItem(cid, 2544, 8, false) 64 | 65 | elseif getPlayerVocation(cid) == 4 then 66 | -- Knight 67 | for i = 1, table.getn(kinaItems), 1 do 68 | doPlayerAddItem(cid, kinaItems[i], 1, false) 69 | end 70 | end 71 | 72 | -- Common for all 73 | doPlayerAddItem(cid, 2674, 5, false) -- 5 apples 74 | doPlayerAddItem(cid, 2120, 1, false) -- 1 rope 75 | end 76 | return true 77 | end 78 | -------------------------------------------------------------------------------- /Lua/TFS_02/talkaction shopsystem/talkaction XML.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Lua/TFS_02/talkaction shopsystem/znoteshop.lua: -------------------------------------------------------------------------------- 1 | -- Znote Shop v1.1 for Znote AAC on TFS 0.2.13+ Mystic Spirit. 2 | function onSay(cid, words, param) 3 | local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. 4 | local cooldown = 15 -- in seconds. 5 | 6 | if getPlayerStorageValue(cid, storage) <= os.time() then 7 | setPlayerStorageValue(cid, storage, os.time() + cooldown) 8 | local accid = getAccountNumberByPlayerName(getCreatureName(cid)) 9 | 10 | local type_desc = { 11 | "itemids", 12 | "pending premium (skip)", 13 | "pending gender change (skip)", 14 | "pending character name change (skip)", 15 | "Outfit and addons", 16 | "Mounts", 17 | "Instant house purchase" 18 | } 19 | print("Player: " .. getCreatureName(cid) .. " triggered !shop talkaction.") 20 | -- Create the query 21 | local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. accid .. ";") 22 | local served = false 23 | 24 | -- Detect if we got any results 25 | if orderQuery ~= false then 26 | -- Fetch order values 27 | local q_id = result.getDataInt(orderQuery, "id") 28 | local q_type = result.getDataInt(orderQuery, "type") 29 | local q_itemid = result.getDataInt(orderQuery, "itemid") 30 | local q_count = result.getDataInt(orderQuery, "count") 31 | 32 | local description = "Unknown or custom type" 33 | if type_desc[q_type] ~= nil then 34 | description = type_desc[q_type] 35 | end 36 | print("Processing type "..q_type..": ".. description) 37 | 38 | -- ORDER TYPE 1 (Regular item shop products) 39 | if q_type == 1 then 40 | served = true 41 | -- Get weight 42 | local playerCap = getPlayerFreeCap(cid) 43 | local itemweight = getItemWeight(q_itemid, q_count) 44 | if playerCap >= itemweight then 45 | db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") 46 | doPlayerAddItem(cid, q_itemid, q_count) 47 | doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received ".. q_count .." "..getItemName(q_itemid).."(s)!") 48 | else 49 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP!") 50 | end 51 | end 52 | -- ORDER TYPE 5 (Outfit and addon) 53 | if q_type == 5 then 54 | served = true 55 | 56 | local itemid = q_itemid 57 | local outfits = {} 58 | 59 | if itemid > 1000 then 60 | local first = math.floor(itemid/1000) 61 | table.insert(outfits, first) 62 | itemid = itemid - (first * 1000) 63 | end 64 | table.insert(outfits, itemid) 65 | 66 | for _, outfitId in pairs(outfits) do 67 | -- Make sure player don't already have this outfit and addon 68 | if not canPlayerWearOutfit(cid, outfitId, q_count) then 69 | db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") 70 | doPlayerAddOutfit(cid,outfitId,q_count) 71 | doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") 72 | else 73 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") 74 | end 75 | end 76 | end 77 | 78 | -- ORDER TYPE 6 (Mounts) 79 | -- Not supported on TFS 0.2 80 | 81 | -- Add custom order types here 82 | -- Type 1 is for itemids (Already coded here) 83 | -- Type 2 is for premium (Coded on web) 84 | -- Type 3 is for gender change (Coded on web) 85 | -- Type 4 is for character name change (Coded on web) 86 | -- Type 5 is for character outfit and addon (Already coded here) 87 | -- Type 6 is for mounts (Not for TFS 0.2) 88 | -- Type 7 is for Instant house purchase (Not for TFS 0.2) 89 | -- So use type 8+ for custom stuff, like etc packages. 90 | -- if q_type == 8 then 91 | -- end 92 | result.free(orderQuery) 93 | if not served then 94 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have no orders to process in-game.") 95 | end 96 | else 97 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have no orders.") 98 | end 99 | else 100 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every "..cooldown.." seconds. Remaining cooldown: ".. getPlayerStorageValue(cid, storage) - os.time()) 101 | end 102 | return false 103 | end 104 | -------------------------------------------------------------------------------- /Lua/TFS_03/creaturescript firstitems/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | Step 1: Copy firstitems.lua to /data/creaturescripts/scripts/ folder 2 | -- Edit firstitems.lua with item IDs you want characters to start with on your server. 3 | 4 | Step 2: Edit the /data/creaturescripts/creaturescripts.XML file 5 | - ADD: 6 | 7 | Step 3: Edit the /data/creaturescripts/scripts/login.lua file 8 | - ADD: registerCreatureEvent(cid, "firstItems") 9 | 10 | Step 4: Restart OT server, and it should work. :) -------------------------------------------------------------------------------- /Lua/TFS_03/creaturescript firstitems/firstitems.lua: -------------------------------------------------------------------------------- 1 | function onLogin(cid) 2 | local storage = 30055 -- storage value 3 | 4 | local sorcItems = { 5 | 2460, -- Brass helmet 6 | 2465, -- Brass armor 7 | 2190, -- Wand of vortex 8 | 2511, -- Brass shield 9 | 2478, -- Brass legs 10 | 2643, -- Leather boots 11 | 1988, -- Brown backpack 12 | 2050 -- torch 13 | } 14 | local druidItems = { 15 | 2460, -- Brass helmet 16 | 2465, -- Brass armor 17 | 2511, -- Brass shield 18 | 2182, -- Snakebite rod 19 | 2478, -- Brass legs 20 | 2643, -- Leather boots 21 | 1988, -- Brown backpack 22 | 2050 -- torch 23 | } 24 | local pallyItems = { 25 | 2460, -- Brass helmet 26 | 2465, -- Brass armor 27 | 2456, -- Bow 28 | 2478, -- Brass legs 29 | 2643, -- Leather boots 30 | 1988, -- Brown backpack 31 | } 32 | local kinaItems = { 33 | 2460, -- Brass helmet 34 | 2465, -- Brass armor 35 | 2511, -- Brass shield 36 | 2412, -- Katana 37 | 2478, -- Brass legs 38 | 2643, -- Leather boots 39 | 1988, -- Brown backpack 40 | 2050 -- torch 41 | } 42 | 43 | if getPlayerStorageValue(cid, storage) == -1 then 44 | setPlayerStorageValue(cid, storage, 1) 45 | if getPlayerVocation(cid) == 1 then 46 | -- Sorcerer 47 | for i = 1, table.getn(sorcItems), 1 do 48 | doPlayerAddItem(cid, sorcItems[i], 1, false) 49 | end 50 | 51 | elseif getPlayerVocation(cid) == 2 then 52 | -- Druid 53 | for i = 1, table.getn(druidItems), 1 do 54 | doPlayerAddItem(cid, druidItems[i], 1, false) 55 | end 56 | 57 | elseif getPlayerVocation(cid) == 3 then 58 | -- Paladin 59 | for i = 1, table.getn(pallyItems), 1 do 60 | doPlayerAddItem(cid, pallyItems[i], 1, false) 61 | end 62 | -- 8 arrows 63 | doPlayerAddItem(cid, 2544, 8, false) 64 | 65 | elseif getPlayerVocation(cid) == 4 then 66 | -- Knight 67 | for i = 1, table.getn(kinaItems), 1 do 68 | doPlayerAddItem(cid, kinaItems[i], 1, false) 69 | end 70 | end 71 | 72 | -- Common for all 73 | doPlayerAddItem(cid, 2674, 5, false) -- 5 apples 74 | doPlayerAddItem(cid, 2120, 1, false) -- 1 rope 75 | end 76 | return true 77 | end 78 | -------------------------------------------------------------------------------- /Lua/TFS_03/creaturescript sync outfits/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | 1. Add below line to XML file: data/creaturescripts/creaturescripts.xml 2 | 3 | 4 | 2. Register event in login.lua: data/creaturescripts/scripts/login.lua 5 | registerCreatureEvent(cid, "znote_syncoutfits") 6 | 7 | 3. Place Lua file syncoutfit.lua in folder: data/creaturescripts/scripts/ -------------------------------------------------------------------------------- /Lua/TFS_03/creaturescript sync outfits/syncoutfit.lua: -------------------------------------------------------------------------------- 1 | -- Sync outfits that player own with Znote AAC 2 | -- So its possible to see which full sets player 3 | -- has in characterprofile.php 4 | 5 | znote_outfit_list = { 6 | { -- Female (girl) outfits 7 | 136,137,138,139,140,141,142,147,148, 8 | 149,150,155,156,157,158,252,269,270, 9 | 279,288,324,329,336,366,431,433,464, 10 | 466,471,513,514,542,575,578,618,620, 11 | 632,635,636,664,666,683,694,696,698, 12 | 724,732,745,749,759,845,852,874,885, 13 | 900 14 | }, 15 | { -- Male (boy) outfits 16 | 128,129,130,131,132,133,134,143,144, 17 | 145,146,151,152,153,154,251,268,273, 18 | 278,289,325,328,335,367,430,432,463, 19 | 465,472,512,516,541,574,577,610,619, 20 | 633,634,637,665,667,684,695,697,699, 21 | 725,733,746,750,760,846,853,873,884, 22 | 899 23 | } 24 | } 25 | 26 | function onLogin(cid) 27 | -- storage_value + 1000 storages (highest outfit id) must not be used in other script. 28 | -- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value 29 | local storage_value = 10000 30 | -- Loop through outfits 31 | for _, outfit in pairs(znote_outfit_list[getPlayerSex(cid)+1]) do 32 | if canPlayerWearOutfit(cid,outfit,3) then 33 | if getPlayerStorageValue(cid,storage_value + outfit) ~= 3 then 34 | setPlayerStorageValue(cid,storage_value + outfit, 3) 35 | end 36 | end 37 | end 38 | return true 39 | end 40 | -------------------------------------------------------------------------------- /Lua/TFS_03/talkaction shopsystem/Alternatives/znoteshop.lua: -------------------------------------------------------------------------------- 1 | -- Znote Shop v1.1 for Znote AAC on TFS 0.3.6+ Crying Damson. [Alternative] 2 | function onSay(cid, words, param) 3 | local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. 4 | local cooldown = 15 -- in seconds. 5 | 6 | if getPlayerStorageValue(cid, storage) <= os.time() then 7 | setPlayerStorageValue(cid, storage, os.time() + cooldown) 8 | local accid = getAccountNumberByPlayerName(getCreatureName(cid)) 9 | 10 | local type_desc = { 11 | "itemids", 12 | "pending premium (skip)", 13 | "pending gender change (skip)", 14 | "pending character name change (skip)", 15 | "Outfit and addons", 16 | "Mounts", 17 | "Instant house purchase" 18 | } 19 | print("Player: " .. getCreatureName(cid) .. " triggered !shop talkaction.") 20 | -- Create the query 21 | local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. accid .. ";") 22 | local served = false 23 | 24 | -- Detect if we got any results 25 | if orderQuery ~= false then 26 | repeat 27 | -- Fetch order values 28 | local q_id = result.getDataInt(orderQuery, "id") 29 | local q_type = result.getDataInt(orderQuery, "type") 30 | local q_itemid = result.getDataInt(orderQuery, "itemid") 31 | local q_count = result.getDataInt(orderQuery, "count") 32 | 33 | local description = "Unknown or custom type" 34 | if type_desc[q_type] ~= nil then 35 | description = type_desc[q_type] 36 | end 37 | print("Processing type "..q_type..": ".. description) 38 | 39 | -- ORDER TYPE 1 (Regular item shop products) 40 | if q_type == 1 then 41 | served = true 42 | -- Get wheight 43 | local playerCap = getPlayerFreeCap(cid) 44 | local itemweight = getItemWeightById(q_itemid, q_count) 45 | if playerCap >= itemweight then 46 | local delete = db.storeQuery("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") 47 | result.free(delete) 48 | doPlayerAddItem(cid, q_itemid, q_count) 49 | doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have recieved ".. q_count .." "..getItemNameById(q_itemid).."(s)!") 50 | else 51 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP!") 52 | end 53 | end 54 | -- ORDER TYPE 5 (Outfit and addon) 55 | if q_type == 5 then 56 | served = true 57 | 58 | local itemid = q_itemid 59 | local outfits = {} 60 | 61 | if itemid > 1000 then 62 | local first = math.floor(itemid/1000) 63 | table.insert(outfits, first) 64 | itemid = itemid - (first * 1000) 65 | end 66 | table.insert(outfits, itemid) 67 | 68 | for _, outfitId in pairs(outfits) do 69 | -- Make sure player don't already have this outfit and addon 70 | if not canPlayerWearOutfit(cid, outfitId, q_count) then 71 | local delete = db.storeQuery("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") 72 | result.free(delete) 73 | doPlayerAddOutfit(cid,outfitId,q_count) 74 | doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") 75 | else 76 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") 77 | end 78 | end 79 | end 80 | 81 | -- ORDER TYPE 6 (Mounts) 82 | if q_type == 6 then 83 | served = true 84 | -- Make sure player don't already have this outfit and addon 85 | if not getPlayerMount(cid, q_itemid) then -- Failed to find a proper hasMount 0.3 function? 86 | local delete = db.storeQuery("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") 87 | result.free(delete) 88 | doPlayerAddMount(cid, q_itemid) 89 | doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received a new mount!") 90 | else 91 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this mount!") 92 | end 93 | end 94 | 95 | -- Add custom order types here 96 | -- Type 1 is for itemids (Already coded here) 97 | -- Type 2 is for premium (Coded on web) 98 | -- Type 3 is for gender change (Coded on web) 99 | -- Type 4 is for character name change (Coded on web) 100 | -- Type 5 is for character outfit and addon (Already coded here) 101 | -- Type 6 is for mounts (Already coded here) 102 | -- Type 7 is for Instant house purchase (Not for TFS 0.3) 103 | -- So use type 8+ for custom stuff, like etc packages. 104 | -- if q_type == 8 then 105 | -- end 106 | until not result.next(orderQuery) 107 | result.free(orderQuery) 108 | if not served then 109 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have no orders to process in-game.") 110 | end 111 | else 112 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have no orders.") 113 | end 114 | else 115 | doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every "..cooldown.." seconds. Remaining cooldown: ".. getPlayerStorageValue(cid, storage) - os.time()) 116 | end 117 | return false 118 | end 119 | -------------------------------------------------------------------------------- /Lua/TFS_03/talkaction shopsystem/talkaction XML.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Lua/TFS_10/creaturescript firstitems/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | Step 1: Copy firstitems.lua to /data/creaturescripts/scripts/ folder 2 | -- Edit firstitems.lua with item IDs you want characters to start with on your server. 3 | 4 | Step 2: Restart OT server, and it should work. :) 5 | -------------------------------------------------------------------------------- /Lua/TFS_10/creaturescript firstitems/firstitems.lua: -------------------------------------------------------------------------------- 1 | -- With Rookgaard 2 | 3 | --[[ 4 | local firstItems = {2050, 2382} -- torch and club 5 | 6 | function onLogin(player) 7 | if player:getLastLoginSaved() <= 0 then 8 | for i = 1, #firstItems do 9 | player:addItem(firstItems[i], 1) 10 | end 11 | player:addItem(player:getSex() == 0 and 2651 or 2650, 1) -- coat 12 | player:addItem(ITEM_BAG, 1) 13 | player:addItem(2674, 1) -- red apple 14 | end 15 | return true 16 | end 17 | ]]-- 18 | 19 | -- Without Rookgaard 20 | local config = { 21 | [1] = { -- Sorcerer 22 | items = { 23 | {2175, 1}, -- spellbook 24 | {2190, 1}, -- wand of vortex 25 | {8819, 1}, -- magician's robe 26 | {8820, 1}, -- mage hat 27 | {2468, 1}, -- studded legs 28 | {2643, 1}, -- leather boots 29 | {2661, 1} -- scarf 30 | }, 31 | container = { 32 | {2120, 1}, -- rope 33 | {2554, 1}, -- shovel 34 | {7620, 1} -- mana potion 35 | } 36 | }, 37 | [2] = { -- Druid 38 | items = { 39 | {2175, 1}, -- spellbook 40 | {2182, 1}, -- snakebite rod 41 | {8819, 1}, -- magician's robe 42 | {8820, 1}, -- mage hat 43 | {2468, 1}, -- studded legs 44 | {2643, 1}, -- leather boots 45 | {2661, 1} -- scarf 46 | }, 47 | container = { 48 | {2120, 1}, -- rope 49 | {2554, 1}, -- shovel 50 | {7620, 1} -- mana potion 51 | } 52 | }, 53 | [3] = { -- Paladin 54 | items = { 55 | {2525, 1}, -- dwarven shield 56 | {2389, 5}, -- 5 spears 57 | {2660, 1}, -- ranger's cloak 58 | {8923, 1}, -- ranger legs 59 | {2643, 1}, -- leather boots 60 | {2661, 1}, -- scarf 61 | {2480, 1} -- legion helmet 62 | }, 63 | container = { 64 | {2120, 1}, -- rope 65 | {2554, 1}, -- shovel 66 | {7618, 1}, -- health potion 67 | {2456, 1}, -- bow 68 | {2544, 50} -- 50 arrows 69 | } 70 | }, 71 | [4] = { -- Knight 72 | items = { 73 | {2525, 1}, -- dwarven shield 74 | {8601, 1}, -- steel axe 75 | {2465, 1}, -- brass armor 76 | {2460, 1}, -- brass helmet 77 | {2478, 1}, -- brass legs 78 | {2643, 1}, -- leather boots 79 | {2661, 1} -- scarf 80 | }, 81 | container = { 82 | {8602, 1}, -- jagged sword 83 | {2439, 1}, -- daramanian mace 84 | {2120, 1}, -- rope 85 | {2554, 1}, -- shovel 86 | {7618, 1} -- health potion 87 | } 88 | } 89 | } 90 | 91 | function onLogin(player) 92 | local targetVocation = config[player:getVocation():getId()] 93 | if not targetVocation then 94 | return true 95 | end 96 | 97 | if player:getLastLoginSaved() ~= 0 then 98 | return true 99 | end 100 | 101 | for i = 1, #targetVocation.items do 102 | player:addItem(targetVocation.items[i][1], targetVocation.items[i][2]) 103 | end 104 | 105 | local backpack = player:addItem(1988) 106 | if not backpack then 107 | return true 108 | end 109 | 110 | for i = 1, #targetVocation.container do 111 | backpack:addItem(targetVocation.container[i][1], targetVocation.container[i][2]) 112 | end 113 | return true 114 | end 115 | -------------------------------------------------------------------------------- /Lua/TFS_10/creaturescript playerdeath/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | Step 1: Replace the one that comes with tfs with this one 2 | 3 | Step 2: Restart OT server, and it should work. :) 4 | -------------------------------------------------------------------------------- /Lua/TFS_10/creaturescript sync outfits/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | 1. Add below line to XML file: data/creaturescripts/creaturescripts.xml 2 | 3 | 4 | 2. Place Lua file syncoutfit.lua in folder: data/creaturescripts/scripts/ 5 | -------------------------------------------------------------------------------- /Lua/TFS_10/creaturescript sync outfits/syncoutfit.lua: -------------------------------------------------------------------------------- 1 | -- Sync outfits that player own with Znote AAC 2 | -- So its possible to see which full sets player 3 | -- has in characterprofile.php 4 | 5 | znote_outfit_list = { 6 | { -- Female outfits 7 | 136, 137, 138, 139, 140, 141, 142, 147, 148, 8 | 149, 150, 155, 156, 157, 158, 252, 269, 270, 9 | 279, 288, 324, 329, 336, 366, 431, 433, 464, 10 | 466, 471, 513, 514, 542, 575, 578, 618, 620, 11 | 632, 635, 636, 664, 666, 683, 694, 696, 698, 12 | 724, 732, 745, 749, 759, 845, 852, 874, 885, 13 | 900, 973, 975, 1020, 1024, 1043, 1050, 1057, 14 | 1070, 1095, 1103, 1128, 1147, 1162, 1174, 15 | 1187, 1203, 1205, 1207, 1211, 1246, 1244, 16 | 1252, 1271, 1280, 1283, 1289, 1293, 1332 17 | }, 18 | { -- Male outfits 19 | 128, 129, 130, 131, 132, 133, 134, 143, 144, 20 | 145, 146, 151, 152, 153, 154, 251, 268, 273, 21 | 278, 289, 325, 328, 335, 367, 430, 432, 463, 22 | 465, 472, 512, 516, 541, 574, 577, 610, 619, 23 | 633, 634, 637, 665, 667, 684, 695, 697, 699, 24 | 725, 733, 746, 750, 760, 846, 853, 873, 884, 25 | 899, 908, 931, 955, 957, 962, 964, 966, 968, 26 | 970, 972, 974, 1021, 1023, 1042, 1051, 1056, 27 | 1069, 1094, 1102, 1127, 1146, 1161, 1173, 28 | 1186, 1202, 1204, 1206, 1210, 1245, 1243, 29 | 1251, 1270, 1279, 1282, 1288, 1292, 1331 30 | } 31 | } 32 | 33 | function onLogin(player) 34 | -- storage_value + 1000 storages (highest outfit id) must not be used in other script. 35 | -- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value 36 | local storage_value = 10000 37 | -- Loop through outfits 38 | for _, outfit in pairs(znote_outfit_list[player:getSex() + 1]) do 39 | if player:hasOutfit(outfit,3) then 40 | if player:getStorageValue(storage_value + outfit) ~= 3 then 41 | player:setStorageValue(storage_value + outfit, 3) 42 | end 43 | end 44 | end 45 | return true 46 | end 47 | -------------------------------------------------------------------------------- /Lua/TFS_10/globalevent powergamers/powergamers.lua: -------------------------------------------------------------------------------- 1 | -- getEternalStorage and setEternalStorage 2 | -- can be added to data/global.lua if you want to use eternal storage for another purpose than this. 3 | -- Regular TFS global storage values get reset every time server reboots. This does not. 4 | local function getEternalStorage(key, parser) 5 | local value = result.getString(db.storeQuery("SELECT `value` FROM `znote_global_storage` WHERE `key` = ".. key .. ";"), "value") 6 | if not value then 7 | if parser then 8 | return false 9 | else 10 | return -1 11 | end 12 | end 13 | result.free(value) 14 | return tonumber(value) or value 15 | end 16 | 17 | local function setEternalStorage(key, value) 18 | if getEternalStorage(key, true) then 19 | db.query("UPDATE `znote_global_storage` SET `value` = '".. value .. "' WHERE `key` = ".. key .. ";") 20 | else 21 | db.query("INSERT INTO `znote_global_storage` (`key`, `value`) VALUES (".. key ..", ".. value ..");") 22 | end 23 | return true 24 | end 25 | 26 | -- SQL Query to execute: -- 27 | --[[ 28 | ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT NOT NULL DEFAULT '0', 29 | ADD `exphist1` BIGINT NOT NULL DEFAULT '0', 30 | ADD `exphist2` BIGINT NOT NULL DEFAULT '0', 31 | ADD `exphist3` BIGINT NOT NULL DEFAULT '0', 32 | ADD `exphist4` BIGINT NOT NULL DEFAULT '0', 33 | ADD `exphist5` BIGINT NOT NULL DEFAULT '0', 34 | ADD `exphist6` BIGINT NOT NULL DEFAULT '0', 35 | ADD `exphist7` BIGINT NOT NULL DEFAULT '0', 36 | ADD `onlinetimetoday` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 37 | ADD `onlinetime1` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 38 | ADD `onlinetime2` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 39 | ADD `onlinetime3` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 40 | ADD `onlinetime4` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 41 | ADD `onlinetime5` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 42 | ADD `onlinetime6` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 43 | ADD `onlinetime7` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 44 | ADD `onlinetimeall` INT UNSIGNED NOT NULL DEFAULT '0'; 45 | ]]-- 46 | 47 | -- after that execute: -- 48 | --[[ 49 | UPDATE `znote_players` AS `z` INNER JOIN `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience`; 50 | ]]-- 51 | 52 | -- TFS 1.X (data/globalevents.xml) 53 | -- 54 | -- 55 | 56 | function onThink(interval, lastExecution, thinkInterval) 57 | if tonumber(os.date("%d")) ~= getEternalStorage(23856) then 58 | setEternalStorage(23856, (tonumber(os.date("%d")))) 59 | db.query("UPDATE `znote_players` SET `onlinetime7`=`onlinetime6`, `onlinetime6`=`onlinetime5`, `onlinetime5`=`onlinetime4`, `onlinetime4`=`onlinetime3`, `onlinetime3`=`onlinetime2`, `onlinetime2`=`onlinetime1`, `onlinetime1`=`onlinetimetoday`, `onlinetimetoday`=0;") 60 | db.query("UPDATE `znote_players` `z` INNER JOIN `players` `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist7`=`z`.`exphist6`, `z`.`exphist6`=`z`.`exphist5`, `z`.`exphist5`=`z`.`exphist4`, `z`.`exphist4`=`z`.`exphist3`, `z`.`exphist3`=`z`.`exphist2`, `z`.`exphist2`=`z`.`exphist1`, `z`.`exphist1`=`p`.`experience`-`z`.`exphist_lastexp`, `z`.`exphist_lastexp`=`p`.`experience`;") 61 | end 62 | 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`)") 63 | return true 64 | end 65 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/Installation Instructions.txt: -------------------------------------------------------------------------------- 1 | Step 1: Put script on data/script folder (edit content if necessary) 2 | 3 | Step 2: Restart OT server, and it should work. :) 4 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/first_items.lua: -------------------------------------------------------------------------------- 1 | local creatureevent = CreatureEvent("FirstItems") 2 | 3 | local config = { 4 | [1] = { -- Sorcerer 5 | items = { 6 | {2175, 1}, -- spellbook 7 | {2190, 1}, -- wand of vortex 8 | {8819, 1}, -- magician's robe 9 | {8820, 1}, -- mage hat 10 | {2468, 1}, -- studded legs 11 | {2643, 1}, -- leather boots 12 | {2661, 1} -- scarf 13 | }, 14 | container = { 15 | {2120, 1}, -- rope 16 | {2554, 1}, -- shovel 17 | {7620, 1} -- mana potion 18 | } 19 | }, 20 | [2] = { -- Druid 21 | items = { 22 | {2175, 1}, -- spellbook 23 | {2182, 1}, -- snakebite rod 24 | {8819, 1}, -- magician's robe 25 | {8820, 1}, -- mage hat 26 | {2468, 1}, -- studded legs 27 | {2643, 1}, -- leather boots 28 | {2661, 1} -- scarf 29 | }, 30 | container = { 31 | {2120, 1}, -- rope 32 | {2554, 1}, -- shovel 33 | {7620, 1} -- mana potion 34 | } 35 | }, 36 | [3] = { -- Paladin 37 | items = { 38 | {2525, 1}, -- dwarven shield 39 | {2389, 5}, -- 5 spears 40 | {2660, 1}, -- ranger's cloak 41 | {8923, 1}, -- ranger legs 42 | {2643, 1}, -- leather boots 43 | {2661, 1}, -- scarf 44 | {2480, 1} -- legion helmet 45 | }, 46 | container = { 47 | {2120, 1}, -- rope 48 | {2554, 1}, -- shovel 49 | {7618, 1}, -- health potion 50 | {2456, 1}, -- bow 51 | {2544, 50} -- 50 arrows 52 | } 53 | }, 54 | [4] = { -- Knight 55 | items = { 56 | {2525, 1}, -- dwarven shield 57 | {8601, 1}, -- steel axe 58 | {2465, 1}, -- brass armor 59 | {2460, 1}, -- brass helmet 60 | {2478, 1}, -- brass legs 61 | {2643, 1}, -- leather boots 62 | {2661, 1} -- scarf 63 | }, 64 | container = { 65 | {8602, 1}, -- jagged sword 66 | {2439, 1}, -- daramanian mace 67 | {2120, 1}, -- rope 68 | {2554, 1}, -- shovel 69 | {7618, 1} -- health potion 70 | } 71 | } 72 | } 73 | 74 | function creatureevent.onLogin(player) 75 | local targetVocation = config[player:getVocation():getId()] 76 | if not targetVocation then 77 | return true 78 | end 79 | 80 | if player:getLastLoginSaved() ~= 0 then 81 | return true 82 | end 83 | 84 | for i = 1, #targetVocation.items do 85 | player:addItem(targetVocation.items[i][1], targetVocation.items[i][2]) 86 | end 87 | 88 | local backpack = player:addItem(1988) -- backpack 89 | if not backpack then 90 | return true 91 | end 92 | 93 | for i = 1, #targetVocation.container do 94 | backpack:addItem(targetVocation.container[i][1], targetVocation.container[i][2]) 95 | end 96 | return true 97 | end 98 | 99 | creatureevent:register() 100 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/first_items_rook.lua: -------------------------------------------------------------------------------- 1 | local creatureevent = CreatureEvent("FirstItemsRook") 2 | 3 | local firstItems = {2050, 2382} -- torch and club 4 | 5 | function creatureevent.onLogin(player) 6 | if player:getLastLoginSaved() <= 0 then 7 | for i = 1, #firstItems do 8 | player:addItem(firstItems[i], 1) 9 | end 10 | player:addItem(player:getSex() == 0 and 2651 or 2650, 1) -- coat 11 | player:addItem(ITEM_BAG, 1) 12 | player:addItem(2674, 1) -- red apple 13 | end 14 | return true 15 | end 16 | 17 | creatureevent:register() 18 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/powergamers.lua: -------------------------------------------------------------------------------- 1 | -- getEternalStorage and setEternalStorage 2 | -- can be added to data/global.lua if you want to use eternal storage for another purpose than this. 3 | -- Regular TFS global storage values get reset every time server reboots. This does not. 4 | local function getEternalStorage(key, parser) 5 | local value = result.getString(db.storeQuery("SELECT `value` FROM `znote_global_storage` WHERE `key` = ".. key .. ";"), "value") 6 | if not value then 7 | if parser then 8 | return false 9 | else 10 | return -1 11 | end 12 | end 13 | result.free(value) 14 | return tonumber(value) or value 15 | end 16 | 17 | local function setEternalStorage(key, value) 18 | if getEternalStorage(key, true) then 19 | db.query("UPDATE `znote_global_storage` SET `value` = '".. value .. "' WHERE `key` = ".. key .. ";") 20 | else 21 | db.query("INSERT INTO `znote_global_storage` (`key`, `value`) VALUES (".. key ..", ".. value ..");") 22 | end 23 | return true 24 | end 25 | 26 | -- SQL Query to execute: -- 27 | --[[ 28 | ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT NOT NULL DEFAULT '0', 29 | ADD `exphist1` BIGINT NOT NULL DEFAULT '0', 30 | ADD `exphist2` BIGINT NOT NULL DEFAULT '0', 31 | ADD `exphist3` BIGINT NOT NULL DEFAULT '0', 32 | ADD `exphist4` BIGINT NOT NULL DEFAULT '0', 33 | ADD `exphist5` BIGINT NOT NULL DEFAULT '0', 34 | ADD `exphist6` BIGINT NOT NULL DEFAULT '0', 35 | ADD `exphist7` BIGINT NOT NULL DEFAULT '0', 36 | ADD `onlinetimetoday` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 37 | ADD `onlinetime1` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 38 | ADD `onlinetime2` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 39 | ADD `onlinetime3` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 40 | ADD `onlinetime4` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 41 | ADD `onlinetime5` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 42 | ADD `onlinetime6` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 43 | ADD `onlinetime7` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 44 | ADD `onlinetimeall` INT UNSIGNED NOT NULL DEFAULT '0'; 45 | ]]-- 46 | 47 | -- after that execute: -- 48 | --[[ 49 | UPDATE `znote_players` AS `z` INNER JOIN `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience`; 50 | ]]-- 51 | 52 | local globalevent = GlobalEvent("PowerGamers") 53 | 54 | function globalevent.onThink(...) 55 | if tonumber(os.date("%d")) ~= getEternalStorage(23856) then 56 | setEternalStorage(23856, (tonumber(os.date("%d")))) 57 | db.query("UPDATE `znote_players` SET `onlinetime7`=`onlinetime6`, `onlinetime6`=`onlinetime5`, `onlinetime5`=`onlinetime4`, `onlinetime4`=`onlinetime3`, `onlinetime3`=`onlinetime2`, `onlinetime2`=`onlinetime1`, `onlinetime1`=`onlinetimetoday`, `onlinetimetoday`=0;") 58 | db.query("UPDATE `znote_players` `z` INNER JOIN `players` `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist7`=`z`.`exphist6`, `z`.`exphist6`=`z`.`exphist5`, `z`.`exphist5`=`z`.`exphist4`, `z`.`exphist4`=`z`.`exphist3`, `z`.`exphist3`=`z`.`exphist2`, `z`.`exphist2`=`z`.`exphist1`, `z`.`exphist1`=`p`.`experience`-`z`.`exphist_lastexp`, `z`.`exphist_lastexp`=`p`.`experience`;") 59 | end 60 | 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`)") 61 | return true 62 | end 63 | 64 | globalevent:interval(60000) 65 | globalevent:register() 66 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/report_talkaction.lua: -------------------------------------------------------------------------------- 1 | local talkaction = TalkAction("!report") 2 | 3 | function talkaction.onSay(player) 4 | local storage = 6708 -- You can change the storage if its already in use 5 | local delaytime = 30 -- Exhaust In Seconds. 6 | if param == '' then 7 | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Command param required.") 8 | return true 9 | end 10 | if player:getStorageValue(storage) <= os.time() then 11 | player:sendTextMessage(MESSAGE_INFO_DESCR, "Your report has been received successfully!") 12 | db.query("INSERT INTO `znote_player_reports` (`id` ,`name` ,`posx` ,`posy` ,`posz` ,`report_description` ,`date`)VALUES (NULL , " .. db.escapeString(player:getName()) .. ", '" .. player:getPosition().x .. "', '" .. player:getPosition().y .. "', '" .. player:getPosition().z .. "', " .. db.escapeString(param) .. ", '" .. os.time() .. "')") 13 | player:setStorageValue(storage, os.time() + delaytime) 14 | else 15 | player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have to wait " .. player:getStorageValue(storage) - os.time() .. " seconds to report again.") 16 | end 17 | return true 18 | end 19 | 20 | talkaction:separator(" ") 21 | talkaction:register() 22 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/sync_outfit.lua: -------------------------------------------------------------------------------- 1 | local creatureevent = CreatureEvent("SincOutfit") 2 | 3 | -- Sync outfits that player own with Znote AAC 4 | -- So its possible to see which full sets player 5 | -- has in characterprofile.php 6 | 7 | znote_outfit_list = { 8 | { -- Female outfits 9 | 136, 137, 138, 139, 140, 141, 142, 147, 148, 10 | 149, 150, 155, 156, 157, 158, 252, 269, 270, 11 | 279, 288, 324, 329, 336, 366, 431, 433, 464, 12 | 466, 471, 513, 514, 542, 575, 578, 618, 620, 13 | 632, 635, 636, 664, 666, 683, 694, 696, 698, 14 | 724, 732, 745, 749, 759, 845, 852, 874, 885, 15 | 900, 973, 975, 1020, 1024, 1043, 1050, 1057, 16 | 1070, 1095, 1103, 1128, 1147, 1162, 1174, 17 | 1187, 1203, 1205, 1207, 1211, 1246, 1244, 18 | 1252, 1271, 1280, 1283, 1289, 1293, 1332 19 | }, 20 | { -- Male outfits 21 | 128, 129, 130, 131, 132, 133, 134, 143, 144, 22 | 145, 146, 151, 152, 153, 154, 251, 268, 273, 23 | 278, 289, 325, 328, 335, 367, 430, 432, 463, 24 | 465, 472, 512, 516, 541, 574, 577, 610, 619, 25 | 633, 634, 637, 665, 667, 684, 695, 697, 699, 26 | 725, 733, 746, 750, 760, 846, 853, 873, 884, 27 | 899, 908, 931, 955, 957, 962, 964, 966, 968, 28 | 970, 972, 974, 1021, 1023, 1042, 1051, 1056, 29 | 1069, 1094, 1102, 1127, 1146, 1161, 1173, 30 | 1186, 1202, 1204, 1206, 1210, 1245, 1243, 31 | 1251, 1270, 1279, 1282, 1288, 1292, 1331 32 | } 33 | } 34 | 35 | function creatureevent.onLogin(player) 36 | -- storage_value + 1000 storages (highest outfit id) must not be used in other script. 37 | -- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value 38 | local storage_value = 10000 39 | -- Loop through outfits 40 | for _, outfit in pairs(znote_outfit_list[player:getSex() + 1]) do 41 | if player:hasOutfit(outfit,3) then 42 | if player:getStorageValue(storage_value + outfit) ~= 3 then 43 | player:setStorageValue(storage_value + outfit, 3) 44 | end 45 | end 46 | end 47 | return true 48 | end 49 | 50 | creatureevent:register() 51 | -------------------------------------------------------------------------------- /Lua/TFS_10/revscriptsys/znote_login.lua: -------------------------------------------------------------------------------- 1 | -- Znote LoginWebService (version 1) for protocol 11, 12+ 2 | -- Move file to this location: data/scripts/znote_login.lua 3 | -- And restart OT server, it should auto load script. 4 | -- Requires updated version of Znote AAC. (18. June 2020) 5 | -- This script will help Znote AAC connect players to this game server. 6 | 7 | local znote_loginWebService = GlobalEvent("znote_loginWebService") 8 | function znote_loginWebService.onStartup() 9 | print(" ") 10 | print("=============================") 11 | print("= Znote AAC loginWebService =") 12 | print("=============================") 13 | local configLua = { 14 | ["SERVER_NAME"] = configManager.getString(configKeys.SERVER_NAME), 15 | ["IP"] = configManager.getString(configKeys.IP), 16 | ["GAME_PORT"] = configManager.getNumber(configKeys.GAME_PORT) 17 | } 18 | local configSQL = { 19 | ["SERVER_NAME"] = false, 20 | ["IP"] = false, 21 | ["GAME_PORT"] = false 22 | } 23 | local webStorage = db.storeQuery([[ 24 | SELECT 25 | `key`, 26 | `value` 27 | FROM `znote_global_storage` 28 | WHERE `key` IN('SERVER_NAME', 'IP', 'GAME_PORT') 29 | ]]) 30 | if webStorage ~= false then 31 | repeat 32 | local key = result.getString(webStorage, 'key') 33 | local value = result.getString(webStorage, 'value') 34 | configSQL[key] = value 35 | until not result.next(webStorage) 36 | result.free(webStorage) 37 | end 38 | local inserts = {} 39 | if configSQL.SERVER_NAME == false then 40 | table.insert(inserts, "('SERVER_NAME',".. db.escapeString(configLua.SERVER_NAME) ..")") 41 | elseif configSQL.SERVER_NAME ~= configLua.SERVER_NAME then 42 | db.query("UPDATE `znote_global_storage` SET `value`=".. db.escapeString(configLua.SERVER_NAME) .." WHERE `key`='SERVER_NAME';") 43 | print("= Updated [SERVER_NAME] FROM [" .. configSQL.SERVER_NAME .. "] to [" .. configLua.SERVER_NAME .. "]") 44 | end 45 | if configSQL.IP == false then 46 | table.insert(inserts, "('IP',".. db.escapeString(configLua.IP) ..")") 47 | elseif configSQL.IP ~= configLua.IP then 48 | db.query("UPDATE `znote_global_storage` SET `value`=".. db.escapeString(configLua.IP) .." WHERE `key`='IP';") 49 | print("= Updated [IP] FROM [" .. configSQL.IP .. "] to [" .. configLua.IP .. "]") 50 | end 51 | if configSQL.GAME_PORT == false then 52 | table.insert(inserts, "('GAME_PORT',".. db.escapeString(configLua.GAME_PORT) ..")") 53 | elseif configSQL.GAME_PORT ~= tostring(configLua.GAME_PORT) then 54 | db.query("UPDATE `znote_global_storage` SET `value`=".. db.escapeString(configLua.GAME_PORT) .." WHERE `key`='GAME_PORT';") 55 | print("= Updated [GAME_PORT] FROM [" .. configSQL.GAME_PORT .. "] to [" .. configLua.GAME_PORT .. "]") 56 | end 57 | if #inserts > 0 then 58 | db.query("INSERT INTO `znote_global_storage` (`key`,`value`) VALUES "..table.concat(inserts,',')..";") 59 | print("= Fixed " .. #inserts .. " missing configurations.") 60 | end 61 | print("=============================") 62 | print("= SERVER_NAME: " .. configLua.SERVER_NAME) 63 | print("= IP: " .. configLua.IP) 64 | print("= GAME_PORT: " .. configLua.GAME_PORT) 65 | print("=============================") 66 | print(" ") 67 | end 68 | znote_loginWebService:register() 69 | -------------------------------------------------------------------------------- /Lua/TFS_10/talkaction report system/adminreport.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- Coded by Dark ShaoOz, modified by Znote 3 | function onSay(player, words, param) 4 | local storage = 6708 -- You can change the storage if its already in use 5 | local delaytime = 30 -- Exhaust In Seconds. 6 | if param == '' then 7 | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Command param required.") 8 | return true 9 | end 10 | if player:getStorageValue(storage) <= os.time() then 11 | player:sendTextMessage(MESSAGE_INFO_DESCR, "Your report has been received successfully!") 12 | db.query("INSERT INTO `znote_player_reports` (`id` ,`name` ,`posx` ,`posy` ,`posz` ,`report_description` ,`date`)VALUES (NULL , " .. db.escapeString(player:getName()) .. ", '" .. player:getPosition().x .. "', '" .. player:getPosition().y .. "', '" .. player:getPosition().z .. "', " .. db.escapeString(param) .. ", '" .. os.time() .. "')") 13 | player:setStorageValue(storage, os.time() + delaytime) 14 | else 15 | player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have to wait " .. player:getStorageValue(storage) - os.time() .. " seconds to report again.") 16 | end 17 | return true 18 | end 19 | -------------------------------------------------------------------------------- /achievements.php: -------------------------------------------------------------------------------- 1 | 4 |

Achievements on

5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | $achName) { 23 | // Set defaults 24 | if (!isset($achName['secret'])) $achName['secret'] = false; 25 | if (!isset($achName['img'])) $achName['img'] = 'https://i.imgur.com/ZqWp1TE.png'; 26 | 27 | if (($achName['points'] >= 1) and ($achName['points'] <= 3) and (!$achName['img'])) { 28 | echo ''; 29 | 30 | } elseif (($achName['points'] >= 4) and ($achName['points'] <= 6) and (!$achName['img'])) { 31 | echo ''; 32 | 33 | } elseif (($achName['points'] >= 7) and ($achName['points'] <= 9) and (!$achName['img'])) { 34 | echo ''; 35 | 36 | } elseif (($achName['points'] >= 10) and (!$achName['img'])) { 37 | echo ''; 38 | 39 | } else { 40 | echo ''; 41 | } 42 | echo ''; 43 | echo ''; 44 | if ($achName['secret'] == true) { 45 | echo ''; 46 | echo ''; 47 | } else { 48 | echo ''; 49 | } 50 | echo ''; 51 | } 52 | ?> 53 |
GradeNameDescriptionSecretPoints


' .$achName[0]. '' .$achName[1]. ''. $achName['points'] .''. $achName['points'] .'
54 |
55 | 56 | 63 | -------------------------------------------------------------------------------- /admin_gallery.php: -------------------------------------------------------------------------------- 1 | setContent($data); 58 | $cache->save(); 59 | } 60 | 61 | ?>

Images in need of moderation:

66 | 67 | 68 | 69 | 70 | 71 | 74 | 75 | 76 | 83 | 84 |

72 | <?php echo $image['title']; ?> 73 |
77 | ", $descr); 80 | ?> 81 |

82 |
85 | All good, no new images to moderate.'; 87 | 88 | ?>

Public Images:

93 | 94 | 95 | 96 | 97 | 98 | 101 | 102 | 103 | 110 | 111 |

99 | <?php echo $image['title']; ?> 100 |
104 | ", $descr); 107 | ?> 108 |

109 |
112 | There are currently no public images.'; 114 | 115 | ?>

Deleted Images:

120 | 121 | 122 | 127 | 128 | 129 | 132 | 133 | 134 | 141 | 142 |

123 | 124 | 125 | 126 |

130 | <?php echo $image['title']; ?> 131 |
135 | ", $descr); 138 | ?> 139 |

140 |
143 | There are currently no deleted images.'; 145 | // end 146 | include 'layout/overall/footer.php'; ?> 147 | -------------------------------------------------------------------------------- /admin_helpdesk.php: -------------------------------------------------------------------------------- 1 | 0) ? (int)$_GET['view'] : false; 7 | if ($view !== false){ 8 | if (!empty($_POST['reply_text'])) { 9 | sanitize($_POST['reply_text']); 10 | 11 | // Save ticket reply on database 12 | $query = array( 13 | 'tid' => $view, 14 | 'username'=> getValue($_POST['username']), 15 | 'message' => getValue($_POST['reply_text']), 16 | 'created' => time(), 17 | ); 18 | $fields = '`'. implode('`, `', array_keys($query)) .'`'; 19 | $data = '\''. implode('\', \'', $query) .'\''; 20 | 21 | mysql_insert("INSERT INTO `znote_tickets_replies` ($fields) VALUES ($data)"); 22 | mysql_update("UPDATE `znote_tickets` SET `status`='Staff-Reply' WHERE `id`='$view' LIMIT 1;"); 23 | 24 | } else if (!empty($_POST['admin_ticket_close'])) { 25 | $ticketId = (int) $_POST['admin_ticket_id']; 26 | mysql_update("UPDATE `znote_tickets` SET `status` = 'CLOSED' WHERE `id` ='$ticketId' LIMIT 1;"); 27 | 28 | } else if (!empty($_POST['admin_ticket_open'])) { 29 | $ticketId = (int) $_POST['admin_ticket_id']; 30 | mysql_update("UPDATE `znote_tickets` SET `status` = 'Open' WHERE `id` ='$ticketId' LIMIT 1;"); 31 | 32 | } else if (!empty($_POST['admin_ticket_delete'])) { 33 | $ticketId = (int) $_POST['admin_ticket_id']; 34 | mysql_delete("DELETE FROM `znote_tickets` WHERE `id`='$ticketId' LIMIT 1;"); 35 | header("Location: admin_helpdesk.php"); 36 | } 37 | 38 | $ticketData = mysql_select_single("SELECT * FROM znote_tickets WHERE id='$view' LIMIT 1;"); 39 | ?> 40 |

View Ticket #

41 | 42 | 43 | 52 | 53 | 54 | 57 | 58 |
44 | 47 | - Created by: 48 | 51 |
55 |

56 |
59 | 64 | 65 | 66 | 75 | 76 | 77 | 80 | 81 |
67 | 70 | - Posted by: 71 | 74 |
78 |

79 |
82 | 86 | 87 | 88 | 89 | 90 | 100 | 106 | 107 |
91 |
92 | 93 | 94 | 95 | 96 | 97 | 98 |
99 |
101 |
102 | 103 | 104 |
105 |
108 | 109 | 110 |
111 |
112 |
113 |
114 | 115 |
116 | 117 | 120 |

Latest Tickets

121 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | '; 135 | echo ''; 136 | echo ''; 137 | echo ''; 138 | echo ''; 139 | echo ''; 140 | } 141 | ?> 142 |
ID:Subject:Creation:Status:
'. $ticket['id'] .''. $ticket['subject'] .''. getClock($ticket['creation'], true) .''. $ticket['status'] .'
143 | -------------------------------------------------------------------------------- /admin_shop.php: -------------------------------------------------------------------------------- 1 | 'Item', 2 => 'Premium Days', 3 => 'Gender Change', 4 => 'Name Change', 5 => 'Outfits', 6 =>'Mounts'); 9 | $items = getItemList(); 10 | ?> 11 |

Shop Logs

12 | 13 |

Pending Orders

14 |

These are pending orders, like items bought, but not received or used yet.

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
IdAccountTypeItemCountDate
37 | 38 | 'Item', 2 => 'Premium Days', 3 => 'Gender Change', 4 => 'Name Change', 5 => 'Outfit', 6 =>'Mount', 7 =>'Custom'); 41 | ?> 42 |

Order History

43 |

This list contains all transactions bought in the shop.

44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
IdAccountTypeItemCountpointsDate
68 | 71 | -------------------------------------------------------------------------------- /adminempty.php: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /api/api.php: -------------------------------------------------------------------------------- 1 | array( 19 | 'znote' => $version, 20 | 'ot' => $config['ServerEngine'] 21 | ), 22 | ); 23 | 24 | if (isset($moduleVersion)) $response['version']['module'] = $moduleVersion; 25 | 26 | function UseClass($name = false, $module = false, $path = false) { 27 | if ($name !== false) { 28 | if (!is_array($name)) { 29 | if (!$module) $module = $name; 30 | if (!$path) require_once "modules/base/{$module}/class/{$name}.php"; 31 | else require_once "{$path}/{$name}.php"; 32 | } else { 33 | foreach ($name as $class) { 34 | if (!$module) $module = $class; 35 | if (!$path) require_once "modules/base/{$module}/class/{$class}.php"; 36 | else require_once "{$path}/{$class}.php"; 37 | } 38 | } 39 | } else die('Error in function UseClass: class parameter is false.'); 40 | } 41 | 42 | function SendResponse($response) { 43 | global $config; 44 | if ($config['api']['debug'] || isset($_GET['debug'])) data_dump($response, false, "Response (debug mode)"); 45 | else echo json_encode($response); 46 | } 47 | ?> -------------------------------------------------------------------------------- /api/index.php: -------------------------------------------------------------------------------- 1 | 'test.php' 10 | ); 11 | 12 | $iterator = new DirectoryIterator($directory); 13 | foreach($iterator as $entity) { 14 | if($entity->isDot()) 15 | continue; 16 | $iterator = new DirectoryIterator($entity->getPathname()); 17 | foreach($iterator as $entity) { 18 | if($entity->isFile()) { 19 | $file_extension = pathinfo($entity->getFilename(), PATHINFO_EXTENSION); 20 | if ($file_extension == 'php') { 21 | $path = explode('/', $entity->getPathname()); 22 | if (count($path) === 1) $path = explode('\\', $entity->getPathname()); 23 | $plugins[$path[1]] = $path[2]; 24 | } 25 | } 26 | } 27 | } 28 | 29 | $response['modules'] = $plugins; 30 | $response['data']['title'] = $config['site_title']; 31 | $response['data']['slogan'] = $config['site_title_context']; 32 | $response['data']['time'] = getClock(time(), false, true); 33 | $response['data']['time_formatted'] = getClock(time(), true, true); 34 | 35 | // Account count 36 | $accounts = mysql_select_single("SELECT COUNT('id') AS `count` FROM `accounts`;"); 37 | $response['data']['accounts'] = ($accounts !== false) ? (int)$accounts['count'] : 0; 38 | // Player count 39 | $players = mysql_select_single("SELECT COUNT('id') AS `count` FROM `players`;"); 40 | $response['data']['players'] = ($players !== false) ? (int)$players['count'] : 0; 41 | // online player count 42 | if ($config['ServerEngine'] != 'TFS_10') { 43 | $online = mysql_select_single("SELECT COUNT('id') AS `count`, COUNT(DISTINCT `lastip`) AS `unique` FROM `players` WHERE `online`='1';"); 44 | } else { 45 | $online = mysql_select_single("SELECT COUNT(`o`.`player_id`) AS `count`, COUNT(DISTINCT `p`.`lastip`) AS `unique` FROM `players_online` AS `o` INNER JOIN `players` AS `p` ON `o`.`player_id` = `p`.`id`;"); 46 | } 47 | $response['data']['online'] = ($online !== false) ? (int)$online['count'] : 0; 48 | $response['data']['online_unique_ip'] = ($online !== false) ? (int)$online['unique'] : 0; 49 | $response['data']['client'] = $config['client']; 50 | $response['data']['port'] = $config['port']; 51 | $response['data']['guildwar'] = $config['guildwar_enabled']; 52 | $response['data']['forum'] = $config['forum']['enabled']; 53 | 54 | SendResponse($response); 55 | ?> -------------------------------------------------------------------------------- /api/module.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/modules/base/player/test.php: -------------------------------------------------------------------------------- 1 | fetch('name'); 9 | $response['test'] = $player->fetch('level'); 10 | 11 | 12 | SendResponse($response); 13 | ?> -------------------------------------------------------------------------------- /api/modules/highscores/topExperience.php: -------------------------------------------------------------------------------- 1 | 0) ? (int)getValue($_GET['rows']) : 10; 8 | 9 | // Show which configuration is used 10 | $response['config']['rows'] = $rows; 11 | 12 | // Fetch top 10 players 13 | $players = mysql_select_multi("SELECT `p`.`name`, `p`.`level`, `p`.`experience`, `p`.`vocation`, `p`.`lastlogin`, `z`.`created` FROM `players` AS `p` INNER JOIN `znote_players` AS `z` ON `p`.`id` = `z`.`player_id` WHERE `p`.`group_id`<'2' ORDER BY `p`.`experience` DESC LIMIT $rows;"); 14 | for ($i = 0; $i < count($players); $i++) { 15 | $players[$i]['vocation_name'] = $config['vocations'][$players[$i]['vocation']]; 16 | } 17 | $response['data']['players'] = $players; 18 | 19 | 20 | SendResponse($response); 21 | ?> -------------------------------------------------------------------------------- /api/modules/samples/blank.php: -------------------------------------------------------------------------------- 1 | hasExpired()) { 20 | $players = mysql_select_multi("SELECT `name`, `level`, `experience` FROM `players` ORDER BY `experience` DESC LIMIT 5;"); 21 | 22 | $cache->setContent($players); 23 | $cache->save(); 24 | } else { 25 | $players = $cache->load(); 26 | } 27 | 28 | -Functions found in general.php 29 | :When fetching GET or POST from parameters, ALWAYS use getValue($value) 30 | :Etc if you want to fetch character name from url, do it like this: 31 | $playername = getValue($_GET['name']); 32 | if ($playername !== false) { 33 | // $playername either contains player name, or false if failed to fetch name from GET. 34 | } 35 | :getValue is often used in 3 ways: Fetch GET and POST values, or sanitize/secure any value you wish. 36 | :Check ZnoteAAC\engine\function\general.php for full list of available functions. 37 | */ 38 | 39 | // Save the results of previous logic to the response 40 | $response['data']['title'] = "The fabulous blank page!"; 41 | 42 | // Send the response through JSON API 43 | SendResponse($response); 44 | ?> 45 | -------------------------------------------------------------------------------- /api/modules/towns/getTownNames.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /blank.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Blank

4 |

This is a blank sample page.

5 | 6 | -------------------------------------------------------------------------------- /buypoints.php: -------------------------------------------------------------------------------- 1 | 12 | 13 |

Buy Points

14 |

Buy points using Paypal:

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | $points) { 26 | echo ''; 27 | echo ''; 28 | echo ''; 29 | if ($paypal['showBonus']) echo ''; 30 | ?> 31 | 51 | '; 53 | } 54 | ?> 55 |
Price:Points:Bonus:Action:
'. $price .'('. $paypal['currency'] .')'. $points .''. calculate_discount(($paypal['points_per_currency'] * $price), $points) .' bonus 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
50 |
56 | 57 | 58 | 61 |

Buy points using Pagseguro:

62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
74 |
75 | 76 | 77 | 80 | 81 |

Buy points using Paygol:

82 | 83 |

84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 |
94 | Buy Points system disabled.

Sorry, this functionality is disabled.

'; 97 | include 'layout/overall/footer.php'; ?> 98 | -------------------------------------------------------------------------------- /changelog.php: -------------------------------------------------------------------------------- 1 | Changelog message deleted!"; 20 | $updateCache = true; 21 | } 22 | } else { 23 | if ($status) { 24 | // POST update 25 | if ($changelogId > 0) { 26 | mysql_update("UPDATE `znote_changelog` SET `text`='$changelogText' WHERE `id`='$changelogId' LIMIT 1;"); 27 | echo "

Changelog message updated!

"; 28 | $updateCache = true; 29 | } else { 30 | // POST create 31 | $time = time(); 32 | mysql_insert("INSERT INTO `znote_changelog` (`text`, `time`, `report_id`, `status`) VALUES ('$changelogText', '$time', '0', '35');"); 33 | echo "

Changelog message created!

"; 34 | $updateCache = true; 35 | } 36 | } 37 | } 38 | if ($action === 2) { 39 | $old = mysql_select_single("SELECT `text` FROM `znote_changelog` WHERE `id`='$changelogId' LIMIT 1;"); 40 | } 41 | // HTML to create or update 42 | ?> 43 |

Add or update changelog

44 |
45 | 46 |
47 | 48 |
49 | 53 | 54 |

Changelog

55 | useMemory(false); 58 | if ($updateCache === true) { 59 | $changelogs = mysql_select_multi("SELECT `id`, `text`, `time`, `report_id`, `status` FROM `znote_changelog` ORDER BY `id` DESC;"); 60 | 61 | $cache->setContent($changelogs); 62 | $cache->save(); 63 | } else { 64 | $changelogs = $cache->load(); 65 | } 66 | if (isset($changelogs) && !empty($changelogs) && $changelogs !== false) { 67 | ?> 68 | 69 | 70 | 71 | Delete"; 75 | } 76 | ?> 77 | 78 | 81 | 82 | 83 | 87 | 94 | 101 | 104 | 105 | 108 |
ChangelogsUpdate

88 |
89 | 90 | 91 | 92 |
93 |
95 |
96 | 97 | 98 | 99 |
100 |
109 | 112 |

Currently no change logs submitted.

113 | 116 | -------------------------------------------------------------------------------- /changepassword.php: -------------------------------------------------------------------------------- 1 | $value) { 13 | if (empty($value) && in_array($key, $required_fields) === true) { 14 | $errors[] = 'You need to fill in all fields.'; 15 | break 1; 16 | } 17 | } 18 | 19 | $pass_data = user_data($session_user_id, 'password'); 20 | //$pass_data['password']; 21 | // $_POST[''] 22 | 23 | // .3 compatibility 24 | if ($config['ServerEngine'] == 'TFS_03' && $config['salt'] === true) { 25 | $salt = user_data($session_user_id, 'salt'); 26 | } 27 | if (sha1($_POST['current_password']) === $pass_data['password'] || $config['ServerEngine'] == 'TFS_03' && $config['salt'] === true && sha1($salt['salt'].$_POST['current_password']) === $pass_data['password']) { 28 | if (trim($_POST['new_password']) !== trim($_POST['new_password_again'])) { 29 | $errors[] = 'Your new passwords do not match.'; 30 | } else if (strlen($_POST['new_password']) < 6) { 31 | $errors[] = 'Your new passwords must be at least 6 characters.'; 32 | } else if (strlen($_POST['new_password']) > 100) { 33 | $errors[] = 'Your new passwords must be less than 100 characters.'; 34 | } 35 | } else { 36 | $errors[] = 'Your current password is incorrect.'; 37 | } 38 | } 39 | 40 | include 'layout/overall/header.php'; ?> 41 | 42 |

Change Password:

43 | 44 | You will need to login again with the new password.'; 47 | session_destroy(); 48 | header("refresh:2;url=index.php"); 49 | exit(); 50 | } else { 51 | if (empty($_POST) === false && empty($errors) === true) { 52 | //Posted the form without errors 53 | if ($config['ServerEngine'] == 'TFS_02' || $config['ServerEngine'] == 'TFS_10' || $config['ServerEngine'] == 'OTHIRE') { 54 | user_change_password($session_user_id, $_POST['new_password']); 55 | } else if ($config['ServerEngine'] == 'TFS_03') { 56 | user_change_password03($session_user_id, $_POST['new_password']); 57 | } 58 | header('Location: changepassword.php?success'); 59 | } else if (empty($errors) === false){ 60 | echo ''; 61 | echo output_errors($errors); 62 | echo ''; 63 | } 64 | ?> 65 | 66 |
67 |
    68 |
  • 69 | Current password:
    70 | 71 |
  • 72 |
  • 73 | New password:
    74 | 75 |
  • 76 |
  • 77 | New password again:
    78 | 79 |
  • 80 | 84 |
  • 85 | 86 |
  • 87 |
88 |
89 | 92 | -------------------------------------------------------------------------------- /contact.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Contact

4 |

TODO: Edit the contact details here.

5 | 6 | -------------------------------------------------------------------------------- /credits.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Znote AAC

4 |

This website is powered by the Znote AAC engine.

5 |

An OT website (Automatic Account Creator) created by Znote from the OT forum community otland.net.

6 |

Znote AAC is an open source project where everyone can help with development.

7 | 8 |

Developers:

9 | 12 |

See the full list of developers HERE.

13 | 25 |
26 | 27 |
28 |
Avatar of: <?php echo $developer['login']; ?>
29 |

30 |
Updates:

31 |
32 | 33 |
34 | 58 | 61 | 62 |

Thanks to: (in no particular order)

63 |

64 | Chris - PHP OOP file samples, testing, bugfixing. 65 |
Kiwi Dan - Researching TFS 0.2 for me, participation in developement. 66 |
Amoaz - Pentesting and security tips. 67 |
Evan, Gremlee - Researching TFS 0.3, constructive feedback, suggestion and participation. 68 |
ATT3 - Reporting and fixing bugs, TFS 1.0 research. 69 |
Mark - Old repository, TFS distributions which this AAC was primarily built for. 70 |
Tedbro, Exura, PrinterLUA - Reporting bugs. 71 |
Nottinghster - OTHIRE distribution compatibility. 72 |

73 | 86 | 87 | -------------------------------------------------------------------------------- /deaths.php: -------------------------------------------------------------------------------- 1 | hasExpired()) { 4 | 5 | if ($config['ServerEngine'] == 'TFS_02' || $config['ServerEngine'] == 'TFS_10') { 6 | $deaths = fetchLatestDeaths(); 7 | } else if ($config['ServerEngine'] == 'TFS_03' || $config['ServerEngine'] == 'OTHIRE') { 8 | $deaths = fetchLatestDeaths_03(30); 9 | } 10 | $cache->setContent($deaths); 11 | $cache->save(); 12 | } else { 13 | $deaths = $cache->load(); 14 | } 15 | if ($deaths) { 16 | ?> 17 |

Latest Deaths

18 | 19 | 20 | 21 | 22 | 23 | 24 | '; 26 | echo ""; 27 | echo ""; 28 | if ($death['is_player'] == 1) echo ""; 29 | else if ($death['is_player'] == 0) { 30 | if ($config['ServerEngine'] == 'TFS_03') echo ""; 31 | else echo ""; 32 | } 33 | else echo ""; 34 | echo ''; 35 | } ?> 36 |
VictimTimeKiller
At level ". $death['level'] .": ". $death['victim'] ."". getClock($death['time'], true) ."Player: ". $death['killed_by'] ."Monster: ". ucfirst(str_replace("a ", "", $death['killed_by'])) ."Monster: ". ucfirst($death['killed_by']) ."". $death['killed_by'] ."
37 | 40 | -------------------------------------------------------------------------------- /downloads.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Downloads

4 |

In order to play, you need an compatible IP changer and a Tibia client.

5 | 6 |

Download IP changer HERE.

7 |

Download Tibia client for windows HERE.

8 |

Download Tibia client for linux HERE.

9 | 10 |

How to connect and play:

11 |
    12 |
  1. 13 | Download and install the tibia client if you havent already. 14 |
  2. 15 |
  3. 16 | Download and run the IP changer. 17 |
  4. 18 |
  5. 19 | In the IP changer, change Client Path to the tibia.exe file where you installed the client. 20 |
  6. 21 |
  7. 22 | In the IP changer, write this in the IP field: 23 |
  8. 24 |
  9. 25 | Now you can successfully login on the tibia client and play clicking on Apply.
    26 | If you do not have an account to login with, you need to register an account HERE. 27 |
  10. 28 |
29 | 30 | 32 | -------------------------------------------------------------------------------- /engine/XML/stages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /engine/cache/deaths.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/deaths.cache.php -------------------------------------------------------------------------------- /engine/cache/gallery.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/gallery.cache.php -------------------------------------------------------------------------------- /engine/cache/highscores.cache.php: -------------------------------------------------------------------------------- 1 | {"1":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"2":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"3":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"4":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"5":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"6":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"7":[{"id":"1","name":"Znote","vocation":"1","experience":"368300","value":"30"}],"8":[{"id":"1","name":"Znote","vocation":"1","value":"50"}],"9":[{"id":"1","name":"Znote","vocation":"1","value":"10"}]} -------------------------------------------------------------------------------- /engine/cache/houses.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/houses.cache.php -------------------------------------------------------------------------------- /engine/cache/houses/sqldata.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/houses/sqldata.cache.php -------------------------------------------------------------------------------- /engine/cache/killers.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/killers.cache.php -------------------------------------------------------------------------------- /engine/cache/lastkillers.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/lastkillers.cache.php -------------------------------------------------------------------------------- /engine/cache/news.cache.php: -------------------------------------------------------------------------------- 1 | [{"id":"1","title":"Test","text":"Hello there!","date":"1477257256","name":"Znote"}] -------------------------------------------------------------------------------- /engine/cache/support.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/support.cache.php -------------------------------------------------------------------------------- /engine/cache/topPlayer.cache.php: -------------------------------------------------------------------------------- 1 | [{"name":"Znote","level":"29","experience":"337980"}] -------------------------------------------------------------------------------- /engine/cache/victims.cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/cache/victims.cache.php -------------------------------------------------------------------------------- /engine/database/connect.php: -------------------------------------------------------------------------------- 1 | Install: 19 |
    20 |
  1. 21 |

    22 | Make sure you have imported TFS database. (OTdir/schema.sql OR OTdir/schemas/mysql.sql OR OTdir/forgottenserver.sql) 23 |

    24 |
  2. 25 |
  3. Import the Znote AAC schema to a TFS database in phpmyadmin.
  4. 26 |
  5. 27 |

    28 | Edit config.php with correct mysql connection details. 29 |

    30 |
  6. 31 |
32 | "; 33 | 34 | $connect = new mysqli($config['sqlHost'], $config['sqlUser'], $config['sqlPassword'], $config['sqlDatabase']); 35 | 36 | if ($connect->connect_errno) { 37 | die("Failed to connect to MySQL: (" . $connect->connect_errno . ") " . $connect->connect_error . $install); 38 | } 39 | 40 | function mysql_znote_escape_string($escapestr) { 41 | global $connect; 42 | return mysqli_real_escape_string($connect, $escapestr); 43 | } 44 | 45 | // Select single row from database 46 | function mysql_select_single($query) { 47 | global $connect; 48 | global $aacQueries; 49 | $aacQueries++; 50 | 51 | global $accQueriesData; 52 | $accQueriesData[] = "[" . elapsedTime() . "] " . $query; 53 | $result = mysqli_query($connect,$query) or die(var_dump($query)."
(query - SQL error)
Type: select_single (select single row from database)

".mysqli_error($connect)); 54 | $row = mysqli_fetch_assoc($result); 55 | return !empty($row) ? $row : false; 56 | } 57 | 58 | // Selecting multiple rows from database. 59 | function mysql_select_multi($query){ 60 | global $connect; 61 | global $aacQueries; 62 | $aacQueries++; 63 | global $accQueriesData; 64 | $accQueriesData[] = "[" . elapsedTime() . "] " . $query; 65 | $array = array(); 66 | $results = mysqli_query($connect,$query) or die(var_dump($query)."
(query - SQL error)
Type: select_multi (select multiple rows from database)

".mysqli_error($connect)); 67 | while($row = mysqli_fetch_assoc($results)) { 68 | $array[] = $row; 69 | } 70 | return !empty($array) ? $array : false; 71 | } 72 | 73 | ////// 74 | // Query database without expecting returned results 75 | 76 | // - mysql update 77 | function mysql_update($query){ voidQuery($query); } 78 | // mysql insert 79 | function mysql_insert($query){ voidQuery($query); } 80 | // mysql delete 81 | function mysql_delete($query){ voidQuery($query); } 82 | // Send a void query 83 | function voidQuery($query) { 84 | global $connect; 85 | global $aacQueries; 86 | $aacQueries++; 87 | global $accQueriesData; 88 | $accQueriesData[] = "[" . elapsedTime() . "] " . $query; 89 | mysqli_query($connect,$query) or die(var_dump($query)."
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

".mysqli_error($connect)); 90 | } 91 | ?> 92 | -------------------------------------------------------------------------------- /engine/footer.php: -------------------------------------------------------------------------------- 1 |
2 | © Znote AAC. 3 | 8 |
9 | -------------------------------------------------------------------------------- /engine/function/cache.php: -------------------------------------------------------------------------------- 1 | setExpiration($cfg['lifespan']); 23 | if (function_exists('apcu_fetch')) { 24 | $this->_canMemory = true; 25 | $this->_memory = $cfg['memory']; 26 | } 27 | $this->_file = $file . self::EXT; 28 | 29 | if (!$this->_memory && $cfg['memory']) die(" 30 |

Configuration error! 31 |
Cannot save cache to memory, but it is configured to do so. 32 |
You need to enable PHP extension APCu to enable memory cache. 33 |
Install it or set \$config['cache']['memory'] to false! 34 |
Ubuntu install: sudo apt install php-apcu

35 | "); 36 | } 37 | 38 | 39 | /** 40 | * Sets the cache expiration limit (IMPORTANT NOTE: seconds, NOT ms!). 41 | * 42 | * @param integer $span 43 | * @access public 44 | * @return void 45 | **/ 46 | public function setExpiration($span) { 47 | $this->_lifespan = $span; 48 | } 49 | 50 | 51 | /** 52 | * Enable or disable memory RAM storage. 53 | * 54 | * @param bool $bool 55 | * @access public 56 | * @return bool $status 57 | **/ 58 | public function useMemory($bool) { 59 | if ($bool and $this->_canMemory) { 60 | $this->_memory = true; 61 | return true; 62 | } 63 | $this->_memory = false; 64 | return false; 65 | } 66 | 67 | 68 | /** 69 | * Set the content you'd like to cache. 70 | * 71 | * @param mixed $content 72 | * @access public 73 | * @return void 74 | **/ 75 | public function setContent($content) { 76 | $this->_content = (!$this->_memory && strtolower(gettype($content)) == 'array') ? json_encode($content) : $content; 77 | } 78 | 79 | 80 | /** 81 | * Validates whether it is time to refresh the cache data or not. 82 | * 83 | * @access public 84 | * @return boolean 85 | **/ 86 | public function hasExpired() { 87 | if ($this->_memory) { 88 | return !apcu_exists($this->_file); 89 | } 90 | if (is_file($this->_file) && time() < filemtime($this->_file) + $this->_lifespan) { 91 | return false; 92 | } 93 | return true; 94 | } 95 | 96 | /** 97 | * Returns remaining time before scoreboard will update itself. 98 | * 99 | * @access public 100 | * @return integer 101 | **/ 102 | public function remainingTime() { 103 | $remaining = 0; 104 | if ($this->_memory) { 105 | if (apcu_exists($this->_file)) { 106 | $meta = apcu_cache_info(); 107 | foreach ($meta['cache_list'] AS $item) { 108 | if ($item['info'] == $this->_file) { 109 | $remaining = ($item['creation_time'] + $item['ttl']) - time(); 110 | return ($remaining > 0) ? $remaining : 0; 111 | } 112 | } 113 | } 114 | return $remaining; 115 | } 116 | if (!$this->hasExpired()) { 117 | $remaining = (filemtime($this->_file) + $this->_lifespan) - time(); 118 | } 119 | return $remaining; 120 | } 121 | 122 | 123 | /** 124 | * Saves the content into its appropriate cache file. 125 | * 126 | * @access public 127 | * @return void 128 | **/ 129 | public function save() { 130 | if ($this->_memory) { 131 | return apcu_store($this->_file, $this->_content, $this->_lifespan); 132 | } 133 | $handle = fopen($this->_file, 'w'); 134 | fwrite($handle, $this->_content); 135 | fclose($handle); 136 | } 137 | 138 | 139 | /** 140 | * Loads the content from a specified cache file. 141 | * 142 | * @access public 143 | * @return mixed 144 | **/ 145 | public function load() { 146 | if ($this->_memory) { 147 | return apcu_fetch($this->_file); 148 | } 149 | if (!is_file($this->_file)) { 150 | return false; 151 | } 152 | 153 | ob_start(); 154 | include_once($this->_file); 155 | $content = ob_get_clean(); 156 | 157 | if (!isset($content) && strlen($content) == 0) { 158 | return false; 159 | } 160 | 161 | if ($content = json_decode($content, true)) { 162 | return (array) $content; 163 | } else { 164 | return $content; 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /engine/function/itemparser/itemlistparser.php: -------------------------------------------------------------------------------- 1 | 'name' 3 | $items = getItemList(); 4 | echo $items[2160]; // Returns 'Crystal Coin' 5 | */ 6 | 7 | function getItemList() { 8 | return parseItems(); 9 | } 10 | 11 | function getItemById($id) { 12 | $items = parseItems(); 13 | if(isset($items[$id])) { 14 | return $items[$id]; 15 | } 16 | return false; 17 | } 18 | 19 | function parseItems() { 20 | $file = Config('server_path') . '/data/items/items.xml'; 21 | if (file_exists($file)) { 22 | $itemList = array(); 23 | $items = simplexml_load_file($file); 24 | // Create our parsed item list 25 | foreach ($items->children() as $item) { 26 | if ($item['id'] && $item['name'] != NULL) { 27 | $itemList[(int)$item['id']] = (string)$item['name']; 28 | } 29 | } 30 | return $itemList; 31 | } 32 | return $file; 33 | } 34 | ?> 35 | -------------------------------------------------------------------------------- /engine/function/mail.php: -------------------------------------------------------------------------------- 1 | _config = $config; 16 | } 17 | 18 | /** 19 | * Sets the cache expiration limit (IMPORTANT NOTE: seconds, NOT ms!). 20 | * 21 | * @param string $to, string $title, string $text, string $accname 22 | * @access public 23 | * @return boolean 24 | **/ 25 | public function sendMail($to, $title, $text, $accname = '') { 26 | //SMTP needs accurate times, and the PHP time zone MUST be set 27 | //This should be done in your php.ini, but this is how to do it if you don't have access to that 28 | //date_default_timezone_set('Etc/UTC'); 29 | 30 | require_once __DIR__.'/../../PHPMailer/src/Exception.php'; 31 | require_once __DIR__.'/../../PHPMailer/src/PHPMailer.php'; 32 | require_once __DIR__.'/../../PHPMailer/src/SMTP.php'; 33 | 34 | //Create a new PHPMailer instance 35 | $mail = new PHPMailer(); 36 | 37 | //Tell PHPMailer to use SMTP 38 | $mail->isSMTP(); 39 | 40 | //Enable SMTP debugging 41 | // 0 = off (for production use) 42 | // 1 = client messages 43 | // 2 = client and server messages 44 | $mail->SMTPDebug = ($this->_config['debug']) ? 2 : 0; 45 | 46 | //Ask for HTML-friendly debug output 47 | $mail->Debugoutput = 'html'; 48 | 49 | //Set the hostname of the mail server 50 | $mail->Host = $this->_config['host']; 51 | 52 | //Set the SMTP port number - likely to be 25, 465 or 587 53 | $mail->Port = $this->_config['port']; 54 | 55 | //Whether to use SMTP authentication 56 | $mail->SMTPAuth = true; 57 | $mail->SMTPSecure = $this->_config['securityType']; 58 | 59 | //Username to use for SMTP authentication 60 | $mail->Username = $this->_config['username']; 61 | 62 | //Password to use for SMTP authentication 63 | $mail->Password = $this->_config['password']; 64 | 65 | //Set who the message is to be sent from 66 | $mail->setFrom($this->_config['email'], $this->_config['fromName']); 67 | 68 | //Set who the message is to be sent to 69 | $mail->addAddress($to, $accname); 70 | 71 | //Set the subject line 72 | $mail->Subject = $title; 73 | 74 | // Body 75 | $mail->Body = $text; 76 | 77 | // Convert HTML -> plain for legacy mail recievers 78 | // Create new lines instead of
html tags. 79 | $text = str_replace("
", "\n", $text); 80 | $text = str_replace("", "\n", $text); 81 | $text = str_replace("
", "\n", $text); 82 | // Then get rid of the rest of the html tags. 83 | $text = strip_tags($text); 84 | 85 | //Replace the plain text body with one created manually 86 | $mail->AltBody = $text; 87 | 88 | 89 | //send the message, check for errors 90 | $status = false; 91 | if (!$mail->send()) { 92 | echo "Mailer Error: " . $mail->ErrorInfo; 93 | exit(); 94 | } else { 95 | $status = true; 96 | } 97 | return $status; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /engine/function/token.php: -------------------------------------------------------------------------------- 1 | '; 18 | } 19 | 20 | 21 | /** 22 | * Returns the active token, if there is one. 23 | * 24 | * @access public 25 | * @static true 26 | * @return mixed 27 | **/ 28 | public static function get() { 29 | return isset($_SESSION['token']) ? $_SESSION['token'] : false; 30 | } 31 | 32 | 33 | /** 34 | * Validates whether the active token is valid or not. 35 | * 36 | * @param string $post 37 | * @access public 38 | * @static true 39 | * @return boolean 40 | **/ 41 | public static function isValid($post) { 42 | if (config('use_token')) { 43 | // Token doesn't exist yet, return false. 44 | if (!self::get()) { 45 | return false; 46 | } 47 | 48 | // Token was invalid, return false. 49 | if ($post == $_SESSION['old_token'] || $post == $_SESSION['token']) { 50 | //self::_reset(); 51 | return true; 52 | } else { 53 | return false; 54 | } 55 | } else { 56 | return true; 57 | } 58 | } 59 | 60 | 61 | /** 62 | * Destroys the active token. 63 | * 64 | * @access protected 65 | * @static true 66 | * @return void 67 | **/ 68 | protected static function _reset() { 69 | unset($_SESSION['token']); 70 | } 71 | 72 | 73 | /** 74 | * Displays information on both the post token and the session token. 75 | * 76 | * @param string $post 77 | * @access public 78 | * @static true 79 | * @return void 80 | **/ 81 | public static function debug($post) { 82 | echo '
', var_dump(array(
83 | 				'post' => $post,
84 | 				'old_token' => $_SESSION['old_token'],
85 | 				'token' => self::get()
86 | 			)), '
'; 87 | } 88 | } 89 | ?> 90 | -------------------------------------------------------------------------------- /engine/guildimg/default@logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/guildimg/default@logo.gif -------------------------------------------------------------------------------- /engine/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/bg.png -------------------------------------------------------------------------------- /engine/img/lifebarra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/lifebarra.png -------------------------------------------------------------------------------- /engine/img/manabar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/manabar.png -------------------------------------------------------------------------------- /engine/img/o/b_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/b_l.png -------------------------------------------------------------------------------- /engine/img/o/b_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/b_m.png -------------------------------------------------------------------------------- /engine/img/o/b_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/b_r.png -------------------------------------------------------------------------------- /engine/img/o/m_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/m_l.png -------------------------------------------------------------------------------- /engine/img/o/m_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/m_m.png -------------------------------------------------------------------------------- /engine/img/o/m_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/m_r.png -------------------------------------------------------------------------------- /engine/img/o/t_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/t_l.png -------------------------------------------------------------------------------- /engine/img/o/t_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/t_m.png -------------------------------------------------------------------------------- /engine/img/o/t_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/o/t_r.png -------------------------------------------------------------------------------- /engine/img/outfit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/outfit.png -------------------------------------------------------------------------------- /engine/img/outfitbackgrounds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/outfitbackgrounds.png -------------------------------------------------------------------------------- /engine/img/skillsbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/engine/img/skillsbackground.png -------------------------------------------------------------------------------- /failed.php: -------------------------------------------------------------------------------- 1 | 2 |

Failed!

3 |

Something went wrong. :(

4 | -------------------------------------------------------------------------------- /gallery.php: -------------------------------------------------------------------------------- 1 | 10 |

Create image article

11 |

This gallery is powered by IMGUR image host.

12 |
13 | Select image to upload:

14 | Image Title:

15 | Image Description:

16 | 17 |
18 | "file", 33 | "name" => $_FILES['imagefile']['name'], 34 | "image" => $image 35 | ]); 36 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( 37 | "Authorization: Client-ID {$imgurClientID}" 38 | )); 39 | $response = json_decode(curl_exec($ch)); 40 | $image_url = $response->data->link; 41 | $image_delete = $response->data->deletehash; 42 | $title = $_POST['title']; 43 | $desc = $_POST['desc']; 44 | 45 | if ($image_url !== false) { 46 | 47 | // Insert to database 48 | $inserted = insertImage((int)$session_user_id, $title, $desc, $image_url, $image_delete); 49 | if ($inserted === true) { 50 | ?> 51 |

Image Posted

52 |

However, your image will not be listed until a GM have verified it.
53 | Feel free to remind the GM in-game to login on website and approve the image post.

54 | 55 |

Preview:

56 | 57 | 58 | 59 | 60 | 61 | 64 | 65 | 66 | 73 | 74 |

62 | <?php echo $title; ?> 63 |
67 | ", $descr); 70 | ?> 71 |

72 |
75 | 78 |

Image already exist

79 |

The image has already been posted. However, images will not be listed until a GM have verified it.

80 | 85 |

Failed to find the image

86 |

We failed to find the image, did you give us the Image code from www.freeimagehosting.net?

87 | 93 |

Gallery

94 | 95 |
96 | Got some cool images to show the community? 97 |
98 | load(); 103 | if (is_array($images) && !empty($images)) { 104 | foreach($images as $image) { 105 | ?> 106 | 107 | 108 | 109 | 110 | 111 | 114 | 115 | 116 | 123 | 124 |

112 | <?php echo $image['title']; ?> 113 |
117 | ", $descr); 120 | ?> 121 |

122 |
125 | There are currently no public images.'; 127 | 128 | if ($logged_in === false) echo 'You need to be logged in to add images.'; 129 | } 130 | include 'layout/overall/footer.php'; 131 | ?> 132 | -------------------------------------------------------------------------------- /killers.php: -------------------------------------------------------------------------------- 1 | hasExpired()) { 5 | $killers = fetchMurders(); 6 | 7 | $cache->setContent($killers); 8 | $cache->save(); 9 | } else { 10 | $killers = $cache->load(); 11 | } 12 | $cache = new Cache('engine/cache/victims'); 13 | if ($cache->hasExpired()) { 14 | $victims = fetchLoosers(); 15 | 16 | $cache->setContent($victims); 17 | $cache->save(); 18 | } else { 19 | $victims = $cache->load(); 20 | } 21 | $cache = new Cache('engine/cache/lastkillers'); 22 | if ($cache->hasExpired()) { 23 | $latests = mysql_select_multi("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id WHERE d.`is_player`='1' ORDER BY `time` DESC LIMIT 20;"); 24 | if ($latests !== false) { 25 | $cache->setContent($latests); 26 | $cache->save(); 27 | } 28 | } else { 29 | $latests = $cache->load(); 30 | } 31 | if ($killers) { 32 | ?> 33 |

Biggest Murders

34 | 35 | 36 | 37 | 38 | 39 | '; 41 | echo ""; 42 | echo ""; 43 | echo ''; 44 | } ?> 45 |
NameKills
". $killer['killed_by'] ."". $killer['kills'] ."
46 | 51 |

Biggest Victims

52 | 53 | 54 | 55 | 56 | 57 | '; 59 | echo ""; 60 | echo ""; 61 | echo ''; 62 | } ?> 63 |
NameDeaths
". $victim['name'] ."". $victim['Deaths'] ."
64 | 69 |

Latest kills

70 | 71 | 72 | 73 | 74 | 75 | 76 | '; 78 | echo ""; 79 | echo ""; 80 | echo ""; 81 | echo ''; 82 | } ?> 83 |
KillerTimeVictim
". $last['killed_by'] ."". getClock($last['time'], true) ."". $last['victim'] ."
84 | hasExpired()) { 90 | $deaths = fetchLatestDeaths_03(30, true); 91 | $cache->setContent($deaths); 92 | $cache->save(); 93 | } else { 94 | $deaths = $cache->load(); 95 | } 96 | 97 | if ($deaths && !empty($deaths)) { 98 | ?> 99 |

Latest Killers

100 | 101 | 102 | 103 | 104 | 105 | 106 | '; 108 | echo ""; 109 | echo ""; 110 | echo ""; 111 | echo ''; 112 | } ?> 113 |
KillerTimeVictim
". $death['killed_by'] ."". getClock($death['time'], true) ."At level ". $death['level'] .": ". $death['victim'] ."
114 | 118 | -------------------------------------------------------------------------------- /layout/aside.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 17 |
18 |
19 | Follow Us 20 |
21 | 31 |
32 | 35 |
36 | Events 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 |
Event Name 2h 5m 10s
Event Name 2h 5m 10s
Event Name 2h 5m 10s
Event Name 2h 5m 10s
Event Name 2h 5m 10s
46 |
47 |
48 | 49 |
50 |
51 | Top 10 Players 52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
#Name
1Name
2Name
3Name
4Name
5Name
6Name
7Name
8Name
9Name
10Name
67 |
68 |
69 | */ 70 | ?> 71 | 72 | -------------------------------------------------------------------------------- /layout/css/resp.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width:1300px){ 2 | .main { 3 | width: 1100px; 4 | } 5 | .banner { 6 | height: 214px; 7 | } 8 | } 9 | 10 | @media screen and (max-width:1200px){ 11 | .main { 12 | width: 1000px; 13 | } 14 | .banner { 15 | height: 192px; 16 | } 17 | } 18 | 19 | @media screen and (max-width:1100px){ 20 | .main { 21 | width: 900px; 22 | } 23 | nav .container > div > ul > li > a { 24 | padding: 20px 10px; 25 | } 26 | .banner { 27 | height: 170px; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /layout/fontawesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/fontawesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /layout/fontawesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/fontawesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /layout/fontawesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/fontawesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /layout/fontawesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/fontawesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /layout/fontawesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/fontawesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /layout/fontawesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /layout/fontawesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /layout/fontawesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /layout/fontawesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /layout/fontawesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /layout/fontawesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /layout/fontawesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /layout/fontawesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /layout/fontawesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /layout/fontawesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /layout/fontawesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /layout/fontawesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /layout/fontawesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /layout/img/atomio_front.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/atomio_front.jpg -------------------------------------------------------------------------------- /layout/img/atomio_profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/atomio_profile.jpg -------------------------------------------------------------------------------- /layout/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/bg.png -------------------------------------------------------------------------------- /layout/img/guild_default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/guild_default.jpg -------------------------------------------------------------------------------- /layout/img/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/header.png -------------------------------------------------------------------------------- /layout/img/mainbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/mainbg.jpg -------------------------------------------------------------------------------- /layout/img/modern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/modern.png -------------------------------------------------------------------------------- /layout/img/prev1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/prev1.png -------------------------------------------------------------------------------- /layout/img/prev2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/prev2.png -------------------------------------------------------------------------------- /layout/img/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/preview.png -------------------------------------------------------------------------------- /layout/img/sm_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Znote/ZnoteAAC/dbc1e14ea7826942ebbc14b6671db860ccd059f2/layout/img/sm_icons.png -------------------------------------------------------------------------------- /layout/js/countdown.js: -------------------------------------------------------------------------------- 1 | function countDown(elid, seconds, msg){ 2 | // Set the date we're counting down to 3 | var countDownDate = new Date(); 4 | countDownDate.setSeconds(countDownDate.getSeconds() + seconds); 5 | var countDownDate = countDownDate.getTime(); 6 | 7 | // Update the count down every 1 second 8 | window.countDownInterval = setInterval(function() { 9 | 10 | // Get todays date and time 11 | var now = new Date().getTime(); 12 | 13 | // Find the distance between now and the count down date 14 | var distance = countDownDate - now; 15 | 16 | // Time calculations for days, hours, minutes and seconds 17 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 18 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 19 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 20 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); 21 | 22 | // Display the result in the element with id="demo" 23 | document.getElementById(elid).innerHTML = "Server starts in: "+ days + "d " + hours + "h " + minutes + "m " + seconds + "s "; 24 | 25 | // If the count down is finished, write some text 26 | if (distance < 0) { 27 | clearInterval(window.countDownInterval); 28 | document.getElementById(elid).innerHTML = msg; 29 | } 30 | }, 1000); 31 | 32 | // Get todays date and time 33 | var now = new Date().getTime(); 34 | 35 | // Find the distance between now and the count down date 36 | var distance = countDownDate - now; 37 | 38 | // Time calculations for days, hours, minutes and seconds 39 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 40 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 41 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 42 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); 43 | 44 | // Display the result in the element with id="demo" 45 | document.getElementById(elid).innerHTML = "Server starts in: "+ days + "d " + hours + "h " + minutes + "m " + seconds + "s "; 46 | 47 | if (distance < 0) { 48 | document.getElementById(elid).innerHTML = msg; 49 | } 50 | } -------------------------------------------------------------------------------- /layout/layout_config.php: -------------------------------------------------------------------------------- 1 | false, 5 | "twitter" => "https://www.twitter.com/", 6 | "facebook" => "https://www.facebook.com/", 7 | "youtube" => "https://www.youtube.com/", 8 | "twitch" => "https://www.twitch.tv/" 9 | ); 10 | 11 | // Use same date format when changing: yyyy-mm-dd hh:mm 12 | $countDown = "2020-06-10 01:00"; 13 | 14 | // Hide countdown after 1 day (24 hours) after countDown 15 | $countDown_hide = 1 * 24 * 60 * 60; 16 | 17 | // Say this after countdown, and before the row is hidden 18 | $countDown_complete = "ONLINE"; 19 | ?> 20 | -------------------------------------------------------------------------------- /layout/menu.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/overall/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
9 |

© . . Designed By Snavy. Engine: Znote AAC.

10 |
11 |
12 |

13 |
14 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 30 | -------------------------------------------------------------------------------- /layout/overall/header.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | <?php echo $config['site_title']; ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 0): ?> 21 | 22 | 23 | 24 | 41 | 42 | 0) echo " class='page_{$page_filename}'"; ?>> 43 | 50 | 51 |
52 | 53 | 54 | 55 | 56 |
57 | 0): ?> 58 |
59 |
60 |
61 |
62 |
63 | 64 | 65 |
66 | -------------------------------------------------------------------------------- /layout/sub.php: -------------------------------------------------------------------------------- 1 | array( 10 | 'file' => 'fileName.php', 11 | 'override' => false 12 | ), 13 | ................ 14 | There are 2 ways to view your page, by using sub.php file, or by overriding an existing default page. 15 | 1: yourwebiste.com/sub.php?page=PAGENAME 16 | 2: By having override => true, then it will load your sub file instead of the default znote aac file. 17 | 18 | */ 19 | 20 | $subpages = array( 21 | // website.com/sub.php?page=blank 22 | 'blank' => array( 23 | // layout/sub/blank.php 24 | 'file' => 'blank.php', 25 | // false means don't run this file instead of the regular file at website.com/blank.php 26 | 'override' => false 27 | ), 28 | 'recover' => array( 29 | 'file' => 'recover.php', 30 | 'override' => false 31 | ), 32 | 'search' => array( 33 | 'file' => 'search.php', 34 | 'override' => false 35 | ), 36 | 'houses' => array( 37 | 'file' => 'houses.php', 38 | 'override' => false 39 | ), 40 | 'downloads' => array( 41 | 'file' => 'downloads.php', 42 | 'override' => false 43 | ), 44 | 'loginhelp' => array( 45 | 'file' => 'loginhelp.php', 46 | 'override' => false 47 | ) 48 | ); 49 | ?> 50 | -------------------------------------------------------------------------------- /layout/sub/index.php: -------------------------------------------------------------------------------- 1 | useMemory(false); 8 | $changelogs = $changelogCache->load(); 9 | 10 | if (isset($changelogs) && !empty($changelogs) && $changelogs !== false) { 11 | ?> 12 |
13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 27 |
Latest Changelog Updates (Click here to see full changelog)
28 |
29 | hasExpired()) { 35 | $news = fetchAllNews(); 36 | $cache->setContent($news); 37 | $cache->save(); 38 | } else { 39 | $news = $cache->load(); 40 | } 41 | 42 | // Design and present the list 43 | if ($news) { 44 | 45 | $total_news = count($news); 46 | $row_news = $total_news / $config['news_per_page']; 47 | $page_amount = ceil($total_news / $config['news_per_page']); 48 | $current = $config['news_per_page'] * $page; 49 | 50 | function TransformToBBCode($string) { 51 | $tags = array( 52 | '[center]{$1}[/center]' => '
$1
', 53 | '[b]{$1}[/b]' => '$1', 54 | '[size={$1}]{$2}[/size]' => '$2', 55 | '[img]{$1}[/img]' => 'image', 56 | '[link]{$1}[/link]' => '$1', 57 | '[link={$1}]{$2}[/link]' => '$2', 58 | '[color={$1}]{$2}[/color]' => '$2', 59 | '[*]{$1}[/*]' => '
  • $1
  • ', 60 | '[youtube]{$1}[/youtube]' => '
    ', 61 | ); 62 | foreach ($tags as $tag => $value) { 63 | $code = preg_replace('/placeholder([0-9]+)/', '(.*?)', preg_quote(preg_replace('/\{\$([0-9]+)\}/', 'placeholder$1', $tag), '/')); 64 | $string = preg_replace('/'.$code.'/i', $value, $string); 65 | } 66 | return $string; 67 | } 68 | 69 | if ($view !== "") { // We want to view a specific news post 70 | $si = false; 71 | if (ctype_digit($view) === false) { 72 | for ($i = 0; $i < count($news); $i++) if ($view === urlencode($news[$i]['title'])) $si = $i; 73 | } else { 74 | for ($i = 0; $i < count($news); $i++) if ((int)$view === (int)$news[$i]['id']) $si = $i; 75 | } 76 | 77 | if ($si !== false) { 78 | echo "hello world!"; 79 | ?> 80 |
    81 |
    82 |
    83 | [#'.$news[$si]['id'].'] '. getClock($news[$si]['date'], true) .' by '. $news[$si]['name'] .' - '. TransformToBBCode($news[$si]['title']) .''; ?> 84 |
    85 |
    86 |

    87 |
    88 |
    89 |
    90 | 91 | 94 | 95 | 96 | 97 | 98 | 99 | 102 | 103 |
    News post not found.
    100 |

    We failed to find the post you where looking for.

    101 |
    104 | 111 |
    112 |
    113 |
    114 | '.getClock($news[$i]['date'], true).' by '. $news[$i]['name'] .' - '. TransformToBBCode($news[$i]['title']) .''; ?> 115 |
    116 |
    117 |

    118 |
    119 |
    120 |
    121 | '; 126 | 127 | for ($i = 0; $i < $page_amount; $i++) { 128 | 129 | if ($i == $page) { 130 | 131 | echo ''; 132 | 133 | } else { 134 | 135 | echo ''; 136 | } 137 | } 138 | 139 | echo ''; 140 | 141 | } 142 | 143 | } else { 144 | echo '

    No news exist.

    '; 145 | } 146 | ?> 147 | -------------------------------------------------------------------------------- /layout/sub/loginhelp.php: -------------------------------------------------------------------------------- 1 | 2 |

    Login

    3 |

    Please fill the login form in this aside bar to login. →

    4 | 14 | -------------------------------------------------------------------------------- /layout/sub/recover.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | Lost Account 5 |
    6 |
    7 | Have you lost your username, or your password? 8 |
    9 |
    10 |
    -------------------------------------------------------------------------------- /layout/sub/search.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | Character search 5 |
    6 |
    7 |
    8 | 9 | 10 |
    11 |
    12 |
    13 |
    -------------------------------------------------------------------------------- /layout/widgets/admin.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Administration 4 |
    5 |
    6 |
      7 |
    • 8 | Admin Page 9 |
    • 10 |
    • 11 | Admin News 12 |
    • 13 |
    • 14 | Admin Gallery 15 |
    • 16 |
    • 17 | Admin Skills 18 |
    • 19 |
    • 20 | Admin Reports 21 |
    • 22 |
    • 23 | Admin Helpdesk 24 |
    • 25 |
    • 26 | Admin Shop 27 |
    • 28 |
    • 29 | Admin Auction 30 |
    • 31 | '1';"); 37 | 38 | foreach($threads as $thread) { 39 | $response = false; 40 | $posts = mysql_select_multi("SELECT `id`, `player_id` FROM `znote_forum_posts` WHERE `thread_id`='". $thread['id'] ."';"); 41 | if ($posts !== false) { 42 | foreach($posts as $post) { 43 | foreach ($staffs as $staff) { 44 | if ($post['player_id'] == $staff['id']) $response = true; 45 | } 46 | } 47 | } 48 | 49 | if (!$response) $new++; 50 | } 51 | } 52 | ?> 53 |
    • 54 | Feedback: [] new 55 |
    • 56 |
    57 |
    58 |
    59 | -------------------------------------------------------------------------------- /layout/widgets/charactersearch.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Character search 4 |
    5 |
    6 |
    7 |
    8 | 9 |
    10 | Luxitur 11 |
    12 |
    13 |
    14 |
    15 | 16 |
    17 | hasExpired()) { 20 | $names_sql = mysql_select_multi('SELECT `name` FROM `players` ORDER BY `name` ASC;'); 21 | $names = array(); 22 | if ($names_sql !== false): foreach ($names_sql as $name) { 23 | $names[] = $name['name']; 24 | } endif; 25 | $cache->setContent($names); 26 | $cache->save(); 27 | } else { 28 | $names = $cache->load(); 29 | } 30 | ?> 31 | 61 |
    62 |
    63 | -------------------------------------------------------------------------------- /layout/widgets/highscore.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | View Highscores 4 |
    5 |
    6 |
    7 | 18 | 19 |
    20 |
    21 |
    -------------------------------------------------------------------------------- /layout/widgets/houses.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Town list / houses 4 |
    5 |
    6 |
    "> 7 | 13 | 17 | 18 |
    19 |
    20 |
    21 | -------------------------------------------------------------------------------- /layout/widgets/login.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Login / Register 4 |
    5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 | 12 |
    13 | 14 |
    15 | 16 |
    17 | 18 |
    19 | 20 |
    21 | 25 |
    26 |

    New account

    27 |

    Lost username or password?

    28 |
    29 |
    30 |
    31 |
    32 | -------------------------------------------------------------------------------- /layout/widgets/myaccount.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Welcome, . 4 |
    5 |
    6 | 23 |
    24 |
    25 | -------------------------------------------------------------------------------- /layout/widgets/serverinfo.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Server Information 4 |
    5 |
    6 |
      7 |
      Server Offline!

      "; 13 | $status = false; 14 | } 15 | else { 16 | $info = chr(6).chr(0).chr(255).chr(255).'info'; 17 | fwrite($sock, $info); 18 | $data=''; 19 | while (!feof($sock))$data .= fgets($sock, 1024); 20 | fclose($sock); 21 | echo "
      Server Online!

      "; 22 | } 23 | } 24 | if ($status) { 25 | ?> 26 |
    • Players online: 27 |
    • 28 | 31 |
    • Registered accounts:
    • 32 |
    33 |
    34 |
    35 | -------------------------------------------------------------------------------- /layout/widgets/topplayers.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Top 5 players 4 |
    5 |
    6 | 7 | hasExpired()) { 10 | $players = mysql_select_multi('SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < ' . $config['highscore']['ignoreGroupId'] . ' ORDER BY `level` DESC, `experience` DESC LIMIT 5;'); 11 | 12 | $cache->setContent($players); 13 | $cache->save(); 14 | } else { 15 | $players = $cache->load(); 16 | } 17 | 18 | if ($players) { 19 | foreach($players as $count => $player) { 20 | $nr = $count+1; 21 | echo ""; 22 | } 23 | } 24 | ?> 25 |
    {$nr}{$player['name']} ({$player['level']}).
    26 |
    27 |
    28 | -------------------------------------------------------------------------------- /layout/widgets/vote.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Vote for us! 4 |
    5 |
    6 |
    7 | Get points by voting at OTServers.eu 8 | 9 |
    10 |
    11 |
    -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /mailtest.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /monster_loot.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7, 12 | 'Semi Rare' => 2, 13 | 'Rare' => 0.5, 14 | 'Very Rare' => 0 15 | ); 16 | ?> 17 | 32 | 33 | Hide None | '; 37 | echo 'Hide Not Found | '; 38 | echo 'Hide Monsters Without Loot | '; 39 | echo 'Hide All | '; 40 | echo 'Use Normal Loot Rate | '; 41 | echo 'Use Server Loot Rate'; 42 | ?> 43 |

    44 | 45 | Could not load items!'); 47 | foreach($items->item as $v) 48 | $itemList[(int)$v['id']] = $v['name']; 49 | 50 | if(isset($_GET['lootrate'])) { 51 | $config = parse_ini_file($otdir . '/config.lua'); 52 | $lootRate = $config['rate_loot']; 53 | } 54 | 55 | $monsters = simplexml_load_file($otdir . '/data/monster/monsters.xml') or die('Could not load monsters!'); 56 | foreach($monsters->monster as $monster) { 57 | $loot = simplexml_load_file($otdir . '/data/monster/' . $monster['file']); 58 | if($loot) { 59 | if($item = $loot->loot->item) { 60 | echo ' 61 | [+] ' . $monster['name'] . ' 62 |
    '; 65 | } elseif(!isset($_GET['hideempty'])) 66 | echo '[x] ' . $monster['name'] . '
    '; 67 | } elseif(!isset($_GET['hidefail'])) 68 | echo 'Failed to load monster ' . $monster[name] . ' (' . $monster[file] . ')
    '; 69 | } 70 | 71 | function addLoot($loot, $level=1) { 72 | foreach($loot as $test) { 73 | $chance = $test['chance']; 74 | if(!$chance) 75 | $chance = $test['chance1']; 76 | 77 | printLoot($level, $test['id'], $test['countmax'], $chance); 78 | foreach($test as $k => $v) 79 | addLoot($v->item, $level + 1); 80 | } 81 | } 82 | 83 | function printLoot($level, $itemid, $count, $chance) { 84 | global $itemList, $rarity; 85 | 86 | $chance /= 1000; 87 | if(isset($_GET['lootrate'])) { 88 | global $lootRate; 89 | $chance *= $lootRate; 90 | } 91 | 92 | foreach($rarity as $lootRarity => $percent){ 93 | if($chance >= $percent) { 94 | echo str_repeat("... ", $level) . '' . ($count ? $count : 1) . ' ' . $itemList[(int)$itemid] . ' - ' . $lootRarity . ' (' . $chance . '%)
    '; 95 | break; 96 | } 97 | } 98 | } 99 | ?> 100 | 101 | -------------------------------------------------------------------------------- /onlinelist.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Who is online?

    4 | setExpiration(30); 23 | if ($cache->hasExpired()) { 24 | // Load online list data from SQL 25 | if ($config['ServerEngine'] == 'TFS_10') { 26 | $array = ($loadFlags === true) ? mysql_select_multi("SELECT `p`.`name` AS `name`, `p`.`level` AS `level`, `p`.`vocation` AS `vocation`, `g`.`name` AS `gname`, `za`.`flag` AS `flag` $outfitQuery FROM `players_online` AS `o` INNER JOIN `players` AS `p` ON `o`.`player_id` = `p`.`id` INNER JOIN `znote_accounts` AS `za` ON `p`.`account_id` = `za`.`account_id` LEFT JOIN `guild_membership` AS `gm` ON `o`.`player_id` = `gm`.`player_id` LEFT JOIN `guilds` AS `g` ON `gm`.`guild_id` = `g`.`id`;") : mysql_select_multi("SELECT `p`.`name` AS `name`, `p`.`level` AS `level`, `p`.`vocation` AS `vocation`, `g`.`name` AS `gname` $outfitQuery FROM `players_online` AS `o` INNER JOIN `players` AS `p` ON `o`.`player_id` = `p`.`id` LEFT JOIN `guild_membership` AS `gm` ON `o`.`player_id` = `gm`.`player_id` LEFT JOIN `guilds` AS `g` ON `gm`.`guild_id` = `g`.`id`;"); 27 | } else { 28 | $array = ($loadFlags === true) ? mysql_select_multi("SELECT `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname`, `za`.`flag` as `flag` $outfitQuery FROM `players` as `p` INNER JOIN `znote_accounts` as `za` ON `za`.`account_id` = `p`.`account_id` LEFT JOIN `guild_ranks` as `gr` ON `gr`.`id` = `p`.`rank_id` LEFT JOIN `guilds` as `g` ON `gr`.`guild_id` = `g`.`id` WHERE `p`.`online` = '1' ORDER BY `p`.`name` DESC;") : mysql_select_multi("SELECT `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` $outfitQuery FROM `players` as `p` LEFT JOIN `guild_ranks` as `gr` ON `gr`.`id` = `p`.`rank_id` LEFT JOIN `guilds` as `g` ON `gr`.`guild_id` = `g`.`id` WHERE `p`.`online` = '1' ORDER BY `p`.`name` DESC;"); 29 | } 30 | // End loading data from SQL 31 | $cache->setContent($array); 32 | $cache->save(); 33 | } else { 34 | $array = $cache->load(); 35 | } 36 | // End cache 37 | 38 | if (!empty($array) && $array !== false) { 39 | ?> 40 | 41 | 42 | 43 | Outfit"; ?> 44 | 45 | 46 | 47 | 48 | 49 | 1) ? ' ' : ''; 53 | $guildname = (!empty($value['gname'])) ? ''. $value['gname'] .'' : ''; 54 | ?> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 |
    Name:Guild:Level:Vocation:
    img
    68 | 69 | 74 | 75 | -------------------------------------------------------------------------------- /pagseguro_ipn.php: -------------------------------------------------------------------------------- 1 | status; 77 | $paymentCode = sanitize($payment->code); 78 | 79 | report($notificationCode, $rawPayment); 80 | 81 | // Updating Payment Status 82 | mysql_update('UPDATE `znote_pagseguro` SET `payment_status` = ' . $paymentStatus . ' WHERE `transaction` = \'' . $paymentCode . '\' '); 83 | 84 | // Check that the payment_status is Completed 85 | if ($paymentStatus == 3) { 86 | 87 | // Check that transaction has not been previously processed 88 | $transaction = mysql_select_single('SELECT `transaction`, `completed` FROM `znote_pagseguro` WHERE `transaction`= \'' . $paymentCode .'\''); 89 | $status = true; 90 | $custom = (int) $payment->reference; 91 | 92 | if ($transaction['completed'] == '1') { 93 | $status = false; 94 | } 95 | 96 | if ($payment->grossAmount == 0.0) $status = false; // Wrong ammount of money 97 | $item = $payment->items->item[0]; 98 | if ($item->amount != ($pagseguro['price'] / 100)) $status = false; 99 | 100 | if ($status) { 101 | // transaction log 102 | mysql_update('UPDATE `znote_pagseguro` SET `completed` = 1 WHERE `transaction` = \'' . $paymentCode . '\''); 103 | 104 | // Process payment 105 | $data = mysql_select_single("SELECT `points` AS `old_points` FROM `znote_accounts` WHERE `account_id`='$custom';"); 106 | 107 | // Give points to user 108 | $new_points = $data['old_points'] + $item->quantity; 109 | mysql_update("UPDATE `znote_accounts` SET `points`='$new_points' WHERE `account_id`='$custom'"); 110 | } 111 | } else if ($paymentStatus == 7) { 112 | mysql_update('UPDATE `znote_pagseguro` SET `completed` = 1 WHERE `transaction` = \'' . $paymentCode . '\' '); 113 | } 114 | ?> 115 | -------------------------------------------------------------------------------- /pagseguro_retorno.php: -------------------------------------------------------------------------------- 1 | status; 100 | $completed = ($transactionStatus != 7) ? 0 : 1; 101 | 102 | $custom = (int) $transaction->reference; 103 | $item = $transaction->items->item[0]; 104 | $points = $item->quantity; 105 | $price = $points * ($pagseguro['price'] / 100); 106 | mysql_insert('INSERT INTO `znote_pagseguro` VALUES (null, \'' . sanitize($transaction->code) . '\', ' . $custom . ', \'' . $price . '\', \'' . $points . '\', ' . $transactionStatus . ', ' . $completed . ')'); 107 | 108 | header('Location: shop.php?callback=processing'); 109 | -------------------------------------------------------------------------------- /paygol_ipn.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |

    STOP!

    9 |

    Ummh... Why are you sniffing around here?

    10 | 11 | 14 | 15 |

    Sorry, you need to be logged in to do that!

    16 |

    Please register or log in.

    17 | 18 | 21 | -------------------------------------------------------------------------------- /queststatus.php: -------------------------------------------------------------------------------- 1 | 2 | [Completed]'; 4 | $notstarted = ''; 5 | function Progress($min, $max, $design = '[x%]') { 6 | $design = explode("x%",$design); 7 | $percent = ($min / $max) * 100; 8 | return $design[0] . $percent . $design[1]; 9 | } 10 | $quests = array( 11 | // Simple quests 12 | 'Bearslayer' => 1050, 13 | 'Sword Quest' => 1337, 14 | 15 | // Advanced quest with progress par: 16 | 'Postman Quest' => array( 17 | 1338, 18 | 3, 19 | ), 20 | ); 21 | ?> 22 | 23 | 24 | 25 | 26 | $quest) { 29 | 30 | // Is quest NOT an array (advanced quest?) 31 | if (!is_array($quest)) { 32 | // Query to find quest results 33 | $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='$quest' AND `player_id`='$user_id' AND `value`='1' LIMIT 1;"); 34 | 35 | if ($query !== false) $quest = $completed; 36 | else $quest = $notstarted; 37 | 38 | } else { 39 | $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='".$quest[0]."' AND `player_id`='$user_id' AND `value`>'0' LIMIT 1;"); 40 | if (!$query) $quest = $notstarted; 41 | else { 42 | if ($query['value'] >= $quest[1]) $quest = $completed; 43 | else $quest = Progress($query['value'], $quest[1]); 44 | } 45 | } 46 | ?> 47 | 48 | 49 | 50 | 51 | 54 |
    Quest NameStatus
    -------------------------------------------------------------------------------- /settings.php: -------------------------------------------------------------------------------- 1 | $value) { 15 | if (empty($value) && in_array($key, $required_fields) === true) { 16 | $errors[] = 'You need to fill in all fields.'; 17 | break 1; 18 | } 19 | } 20 | 21 | if (empty($errors) === true) { 22 | if (filter_var($_POST['new_email'], FILTER_VALIDATE_EMAIL) === false) { 23 | $errors[] = 'A valid email address is required.'; 24 | } else if (user_email_exist($_POST['new_email']) === true && $user_data['email'] !== $_POST['new_email']) { 25 | $errors[] = 'That email address is already in use.'; 26 | } 27 | } 28 | } 29 | ?> 30 |

    Settings

    31 | 32 | $_POST['new_email'] 39 | ); 40 | 41 | $update_znote_data = array( 42 | 'flag' => getValue($_POST['new_flag']), 43 | 'active_email' => '0' 44 | ); 45 | 46 | // If he had previously verified his email address, remove the previously aquired bonus points 47 | if ($user_znote_data['active_email'] > 0) { 48 | $update_znote_data['points'] = $user_znote_data['points'] - $config['mailserver']['verify_email_points']; 49 | } 50 | 51 | user_update_account($update_data); 52 | user_update_znote_account($update_znote_data); 53 | header('Location: settings.php?success'); 54 | exit(); 55 | 56 | } else if (empty($errors) === false) { 57 | echo output_errors($errors); 58 | } 59 | ?> 60 | 61 |
    62 |
      63 |
    • 64 | email:
      65 | 66 |
    • 67 |
    • 68 | Country:
      69 | 80 |
    • 81 | 85 |
    • 86 | 87 |
    • 88 |
    89 |
    90 | 94 | -------------------------------------------------------------------------------- /special/.htaccess: -------------------------------------------------------------------------------- 1 | order deny,allow 2 | deny from all 3 | allow from 127.0.0.1 localhost ::1 -------------------------------------------------------------------------------- /special/convertoldshoppoints.php: -------------------------------------------------------------------------------- 1 | 5 | 6 |

    Gesior and Modern shop points to Znote AAC shop points

    7 |

    Convert donation/shop points from previous Gesior/Modern installation to Znote AAC:

    8 | '0';"); 10 | $accountids = array(); 11 | foreach ($accounts as $acc) $accountids[] = $acc['id']; 12 | $accidlist = join(',',$accountids); 13 | 14 | if ($accounts !== false) echo "

    Detected: ". count($accounts) ." accounts who have points in old system.

    "; 15 | else die("

    All accounts already converted. :)

    "); 16 | 17 | $znote_accounts = mysql_select_multi("SELECT `account_id`, `points` FROM `znote_accounts` WHERE `account_id` IN ($accidlist);"); 18 | 19 | if (count($accounts) !== count($znote_accounts)) die("

    Failed to syncronize accounts. You need to convert all accounts to Znote AAC first!

    "); 20 | 21 | // Order old accounts by id. 22 | $idaccounts = array(); 23 | foreach ($accounts as $acc) { 24 | $idaccounts[$acc['id']] = $acc['premium_points']; 25 | } 26 | foreach ($znote_accounts as $acc) { 27 | mysql_update("UPDATE `znote_accounts` SET `points`='". ($acc['points'] + $idaccounts[$acc['account_id']]) ."' WHERE `account_id`='". $acc['account_id'] ."' LIMIT 1;"); 28 | } 29 | mysql_update("UPDATE `accounts` SET `premium_points`='0';"); 30 | 31 | echo "

    Successfully converted all points!

    "; 32 | ?> -------------------------------------------------------------------------------- /special/milestone.txt: -------------------------------------------------------------------------------- 1 | Milestone - What I wish to add to Znote AAC in the future. (Znote AAC TODO/wish list). 2 | - Character auction page for donation points. 3 | - Semi-live communication with OT. 4 | - Live ban, kick, broadcast message, open/close server and Custom commands. 5 | - Sub-page system. 6 | -------------------------------------------------------------------------------- /special/repairSkills.php: -------------------------------------------------------------------------------- 1 | 40 |

    Script run status:

    41 |

    Players detected:

    42 |

    Players already fixed:

    43 |

    Repaired player accounts:

    44 | 47 |

    No players detected.

    48 |

    Something went wrong.

    49 | 52 | 53 |

    Script run completed.

    54 | -------------------------------------------------------------------------------- /sub.php: -------------------------------------------------------------------------------- 1 | Sub page not recognized.

    The sub page you requested is not recognized.

    '; 7 | } 8 | } 9 | else echo '

    System disabled.

    The sub page system is disabled.

    '; 10 | require_once 'layout/overall/footer.php'; ?> 11 | -------------------------------------------------------------------------------- /success.php: -------------------------------------------------------------------------------- 1 | 2 |

    Success!

    3 | Go 4 | -------------------------------------------------------------------------------- /support.php: -------------------------------------------------------------------------------- 1 |

    Support in-game

    hasExpired()) { 5 | // Fetch all staffs in-game. 6 | if ($config['ServerEngine'] == 'TFS_03') { 7 | $staffs = support_list03(); 8 | } else $staffs = support_list(); 9 | // Fetch group ids and names from config.php 10 | $groups = $config['ingame_positions']; 11 | // Loops through groups, separating each group element into an ID variable and name variable 12 | foreach ($groups as $group_id => $group_name) { 13 | // Loops through list of staffs 14 | if (!empty($staffs)) 15 | foreach ($staffs as $staff) { 16 | if ($staff['group_id'] == $group_id) $srtGrp[$group_name][] = $staff; 17 | } 18 | } 19 | if (!empty($srtGrp)) { 20 | $cache->setContent($srtGrp); 21 | $cache->save(); 22 | } 23 | } else { 24 | $srtGrp = $cache->load(); 25 | } 26 | $writeHeader = true; 27 | if (!empty($srtGrp)) { 28 | foreach (array_reverse($srtGrp) as $grpName => $grpList) { 29 | ?> 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | '; 43 | echo ""; 44 | echo ''; 45 | echo ""; 46 | echo ''; 47 | } 48 | } 49 | ?> 50 |
    GroupNameStatus
    ". $grpName ."'. $char['name'] .'". online_id_to_name($char['online']) ."
    51 | '; include 'layout/overall/footer.php'; ?> -------------------------------------------------------------------------------- /topguilds.php: -------------------------------------------------------------------------------- 1 | hasExpired()) { 6 | $guilds = mysql_select_multi("SELECT `g`.`id` AS `id`, `g`.`name` AS `name`, COUNT(`g`.`name`) as `frags` FROM `players` p LEFT JOIN `player_deaths` pd ON `pd`.`killed_by` = `p`.`name` LEFT JOIN `guild_membership` gm ON `p`.`id` = `gm`.`player_id` LEFT JOIN `guilds` g ON `gm`.`guild_id` = `g`.`id` WHERE `pd`.`unjustified` = 1 GROUP BY `name` ORDER BY `frags` DESC, `name` ASC LIMIT 0, 10;"); 7 | 8 | $cache->setContent($guilds); 9 | $cache->save(); 10 | } else { 11 | $guilds = $cache->load(); 12 | } 13 | $count = 1; 14 | 15 | function convert_number_to_words($number) { 16 | 17 | $hyphen = '-'; 18 | $conjunction = ' and '; 19 | $separator = ', '; 20 | $negative= 'negative '; 21 | $decimal = ' point '; 22 | $dictionary = array( 23 | 0 => 'zero', 24 | 1 => 'first', 25 | 2 => 'second', 26 | 3 => 'third', 27 | 4 => 'fourth', 28 | 5 => 'fifth', 29 | 6 => 'sixth', 30 | 7 => 'seventh', 31 | 8 => 'eighth', 32 | 9 => 'ninth', 33 | 10 => 'tenth', 34 | 11 => 'eleventh', 35 | 12 => 'twelve', 36 | 13 => 'thirteen', 37 | 14 => 'fourteen', 38 | 15 => 'fifteen', 39 | 16 => 'sixteen', 40 | 17 => 'seventeen', 41 | 18 => 'eighteen', 42 | 19 => 'nineteen', 43 | 20 => 'twenty', 44 | 30 => 'thirty', 45 | 40 => 'fourty', 46 | 50 => 'fifty', 47 | 60 => 'sixty', 48 | 70 => 'seventy', 49 | 80 => 'eighty', 50 | 90 => 'ninety', 51 | 100 => 'hundred', 52 | 1000 => 'thousand', 53 | 1000000 => 'million', 54 | 1000000000 => 'billion', 55 | 1000000000000 => 'trillion', 56 | 1000000000000000 => 'quadrillion', 57 | 1000000000000000000 => 'quintillion' 58 | ); 59 | 60 | if (!is_numeric($number)) { 61 | return false; 62 | } 63 | 64 | if (($number >= 0 && (int) $number < 0) || (int) $number < 0 - PHP_INT_MAX) { 65 | // overflow 66 | trigger_error( 67 | 'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX, 68 | E_USER_WARNING 69 | ); 70 | return false; 71 | } 72 | 73 | if ($number < 0) { 74 | return $negative . convert_number_to_words(abs($number)); 75 | } 76 | 77 | $string = $fraction = null; 78 | 79 | if (strpos($number, '.') !== false) { 80 | list($number, $fraction) = explode('.', $number); 81 | } 82 | 83 | switch (true) { 84 | case $number < 21: 85 | $string = $dictionary[$number]; 86 | break; 87 | case $number < 100: 88 | $tens = ((int) ($number / 10)) * 10; 89 | $units = $number % 10; 90 | $string = $dictionary[$tens]; 91 | if ($units) { 92 | $string .= $hyphen . $dictionary[$units]; 93 | } 94 | break; 95 | case $number < 1000: 96 | $hundreds = $number / 100; 97 | $remainder = $number % 100; 98 | $string = $dictionary[$hundreds] . ' ' . $dictionary[100]; 99 | if ($remainder) { 100 | $string .= $conjunction . convert_number_to_words($remainder); 101 | } 102 | break; 103 | default: 104 | $baseUnit = pow(1000, floor(log($number, 1000))); 105 | $numBaseUnits = (int) ($number / $baseUnit); 106 | $remainder = $number % $baseUnit; 107 | $string = convert_number_to_words($numBaseUnits) . ' ' . $dictionary[$baseUnit]; 108 | if ($remainder) { 109 | $string .= $remainder < 100 ? $conjunction : $separator; 110 | $string .= convert_number_to_words($remainder); 111 | } 112 | break; 113 | } 114 | 115 | if (null !== $fraction && is_numeric($fraction)) { 116 | $string .= $decimal; 117 | $words = array(); 118 | foreach (str_split((string) $fraction) as $number) { 119 | $words[] = $dictionary[$number]; 120 | } 121 | $string .= implode(' ', $words); 122 | } 123 | 124 | return $string; 125 | } 126 | 127 | if (!empty($guilds) && $guilds !== false) { 128 | ?> 129 |

    Top 10 guilds with most frags

    130 | 131 | 132 | 133 | 134 | 135 | 136 | 140 | 141 | 145 | 146 | 147 | 148 | 150 |
    #Name:Frags:
    151 | No frags yet.'; 154 | } 155 | include 'layout/overall/footer.php'; ?> 156 | -------------------------------------------------------------------------------- /toponline.php: -------------------------------------------------------------------------------- 1 | '.$hours.'h '.$minutes.'m'; 18 | } 19 | function hours_and_minutes($value, $color = 1) 20 | { 21 | $hours = floor($value / 3600); 22 | $value = $value - $hours * 3600; 23 | $minutes = floor($value / 60); 24 | if($color != 1) 25 | return ''.$hours.'h '.$minutes.'m'; 26 | else 27 | if($hours >= 12) 28 | return ''.$hours.'h '.$minutes.'m'; 29 | elseif($hours >= 6) 30 | return ''.$hours.'h '.$minutes.'m'; 31 | else 32 | return ''.$hours.'h '.$minutes.'m'; 33 | } 34 | if(empty($type)) 35 | $znotePlayers = mysql_select_multi('SELECT * FROM `znote_players` AS `z` JOIN `players` AS `p` WHERE `p`.`id`=`z`.`player_id` and `p`.`group_id` < 3 ORDER BY `onlinetimetoday` DESC LIMIT '.$limit); 36 | elseif($type == "sum") 37 | $znotePlayers = mysql_select_multi('SELECT * FROM `znote_players` AS `z` JOIN `players` AS `p` WHERE `p`.`id`=`z`.`player_id` and `p`.`group_id` < 3 ORDER BY `z`.`onlinetimeall` DESC LIMIT '. $limit); 38 | elseif($type >= 1 && $type <= 4) 39 | $znotePlayers = mysql_select_multi('SELECT * FROM `znote_players` AS `z` JOIN `players` AS `p` WHERE `p`.`id`=`z`.`player_id` and `p`.`group_id` < 3 ORDER BY `onlinetime' . (int) $type . '` DESC LIMIT '.$limit); 40 | 41 | echo '

    Most online on' .$config['site_title'] . '

    42 |
    43 | 44 | 45 | '; 46 | if($type == "sum") 47 | echo ''; 48 | else 49 | echo ''; 50 | for($i = 3; $i >= 2; $i--) 51 | { 52 | if($type == $i) 53 | echo ''; 54 | else 55 | echo ''; 56 | } 57 | if($type == 1) 58 | echo ''; 59 | else 60 | echo ''; 61 | if(empty($type)) 62 | echo ''; 63 | else 64 | echo ''; 65 | echo ''; 66 | $number_of_rows = 1; 67 | if($znotePlayers) 68 | foreach($znotePlayers as $player) 69 | { 70 | echo ''; 71 | echo ''; 74 | $number_of_rows++; 75 | echo ''; 76 | } 77 | echo '
    #
    Name
    Total
    Total
    '.$i.' Days Ago
    '.$i.' Days Ago
    1 Day Ago
    1 Day Ago
    Today
    Today
    '. $number_of_rows . '.
    ' .$player['name']. ''; 72 | echo '
    ' .$player['level']. ' '.htmlspecialchars(vocation_id_to_name($player['vocation'])).' '; 73 | echo '
    ' .onlineTimeTotal($player['onlinetimeall']).'
    '.hours_and_minutes($player['onlinetime3']).'
    '.hours_and_minutes($player['onlinetime2']).'
    '.hours_and_minutes($player['onlinetime1']).'
    '.hours_and_minutes($player['onlinetimetoday']).'
    '; 78 | ?> 79 | 82 | -------------------------------------------------------------------------------- /twofa.php: -------------------------------------------------------------------------------- 1 | 5 |

    Server compatibility error

    6 |

    Sorry, this server is not compatible with Two-Factor Authentication.
    7 | TFS 1.2 or higher is required to run two-factor authentication, grab it 8 | here.

    9 | 35 |

    Two-Factor Authentication

    36 |

    Account security with Two-factor Authentication: .

    37 | 38 | 39 |

    Login with a token generated from this QR code to activate:

    40 | 41 |

    Click HERE to disable Two-Factor Authentication and generate a new QR code.

    42 | 43 | 44 | " 46 | alt="Two-Factor Authentication QR code image for this account." 47 | /> 48 | 49 |

    How to use:

    50 |
      51 |
    1. Download an authenticator app for free on your mobile phone like Authy (Android), (iPhone) or Google Authenticator (Android), (iPhone).
    2. 52 |
    3. Scan the QR image with the app on your phone to create a Two-Factor account for this server.
    4. 53 |
    5. Logout, then login with username, password and token generated from your phone to enable Two-Factor Authentication.
    6. 54 |
    55 | 58 | -------------------------------------------------------------------------------- /twtrNews.php: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /voting.php: -------------------------------------------------------------------------------- 1 | Something went wrong! Could not make a vote request.

    '; 14 | } else { 15 | header('Location: ' . $result['voteLink']); 16 | die; 17 | } 18 | } else { 19 | $result = checkHasVoted($user_data['id'], $otservers_eu_voting); 20 | if ($result !== false) { 21 | if ($result['voted'] === true) { 22 | $points = $otservers_eu_voting['points']; 23 | $pointsText = $points === '1' ? 'point' : 'points'; 24 | mysql_update("UPDATE `znote_accounts` SET `points` = `points` + '$points' WHERE `account_id`=" . $user_data['id']); 25 | echo "

    Thank you for voting! You have been rewarded with $points $pointsText!

    "; 26 | } else { 27 | echo '

    It does not seem like you have voted.

    '; 28 | } 29 | } else { 30 | echo '

    Could not verify that you have voted.

    '; 31 | } 32 | } 33 | } else { 34 | header('Location: ' . $otservers_eu_voting['simpleVoteUrl']); 35 | die; 36 | } 37 | } else { 38 | echo '

    Voting is not enabled.

    '; 39 | } 40 | 41 | include 'layout/overall/footer.php'; 42 | 43 | function vote($otUserId, $otservers_eu_voting) { 44 | $context = stream_context_create([ 45 | 'http' => [ 46 | 'header' => "Content-type: application/json", 47 | 'method' => 'POST', 48 | 'content' => json_encode([ 49 | 'otUserId' => $otUserId, 50 | 'secretToken' => $otservers_eu_voting['secretToken'], 51 | 'landingPage' => $otservers_eu_voting['landingPage'] 52 | ]) 53 | ] 54 | ]); 55 | $result = file_get_contents($otservers_eu_voting['voteUrl'], false, $context); 56 | return $result !== false ? json_decode($result, true) : false; 57 | } 58 | 59 | function checkHasVoted($otUserId, $otservers_eu_voting) { 60 | $context = stream_context_create([ 61 | 'http' => [ 62 | 'header' => "Content-type: application/json", 63 | 'method' => 'POST', 64 | 'content' => json_encode([ 65 | 'otUserId' => $otUserId, 66 | 'secretToken' => $otservers_eu_voting['secretToken'], 67 | 'consume' => true 68 | ]) 69 | ] 70 | ]); 71 | $result = file_get_contents($otservers_eu_voting['voteCheckUrl'], false, $context); 72 | return $result !== false ? json_decode($result, true) : false; 73 | } 74 | --------------------------------------------------------------------------------