From a00dbcfabd4c68eed0568f156c5de05e97c18aa0 Mon Sep 17 00:00:00 2001 From: Evil Puncker Date: Sun, 2 Aug 2020 09:48:13 -0300 Subject: [PATCH] bye bye trailing whitespaces (#442) --- .../creaturescript firstitems/firstitems.lua | 6 +- .../talkaction shopsystem/znoteshop.lua | 4 +- .../talkaction shopsystem/znoteshop.lua | 6 +- .../syncoutfit.lua | 18 +- .../globalevent powergamers/powergamers.lua | 18 +- .../globalevent shopsystem/znoteshop.lua | 24 +- Lua/TFS_10/revscriptsys/powergamers.lua | 18 +- .../revscriptsys/shopsystem_globalevent.lua | 24 +- .../revscriptsys/shopsystem_talkaction.lua | 4 +- Lua/TFS_10/revscriptsys/sync_outfit.lua | 18 +- .../talkaction shopsystem/znoteshop.lua | 4 +- README.md | 20 +- admin.php | 16 +- admin_auction.php | 464 ++++++------- admin_gallery.php | 4 +- admin_news.php | 6 +- admin_reports.php | 16 +- admin_shop.php | 2 +- admin_skills.php | 8 +- adminempty.php | 4 +- api/modules/base/player/class/player.php | 18 +- api/modules/samples/blank.php | 4 +- buypoints.php | 2 +- changelog.php | 8 +- changepassword.php | 10 +- createcharacter.php | 20 +- credits.php | 4 +- deaths.php | 6 +- downloads.php | 2 +- engine/database/znote_schema.sql | 622 +++++++++--------- engine/function/cache.php | 2 +- engine/function/itemparser/itemlistparser.php | 6 +- engine/function/rfc6238.php | 124 ++-- engine/function/token.php | 6 +- engine/init.php | 32 +- forum.php | 86 +-- forum_search.php | 22 +- gallery.php | 12 +- guildwar.php | 22 +- helpdesk.php | 26 +- highscores.php | 4 +- house.php | 46 +- houses.php | 12 +- index.php | 16 +- ipn.php | 18 +- items.php | 60 +- killers.php | 14 +- layout/css/resp.css | 1 - layout/css/style.css | 8 +- layout/layout_config.php | 2 +- layout/overall/footer.php | 6 +- layout/sub.php | 6 +- layout/sub/index.php | 12 +- layout/widgets/admin.php | 4 +- layout/widgets/charactersearch.php | 4 +- layout/widgets/houses.php | 6 +- layout/widgets/serverinfo.php | 4 +- layout/widgets/topplayers.php | 4 +- logout.php | 8 +- market.php | 6 +- monster_loot.php | 10 +- myaccount.php | 10 +- onlinelist.php | 4 +- powergamers.php | 8 +- protected.php | 8 +- recovery.php | 12 +- register.php | 4 +- serverinfo.php | 8 +- settings.php | 2 +- shop.php | 22 +- special/database2znoteaac.php | 36 +- special/milestone.txt | 5 +- special/repairSkills.php | 8 +- spells.php | 4 +- sub.php | 4 +- toponline.php | 6 +- twofa.php | 10 +- 77 files changed, 1056 insertions(+), 1064 deletions(-) diff --git a/Lua/TFS_02/creaturescript firstitems/firstitems.lua b/Lua/TFS_02/creaturescript firstitems/firstitems.lua index a3ee102..0c0443a 100644 --- a/Lua/TFS_02/creaturescript firstitems/firstitems.lua +++ b/Lua/TFS_02/creaturescript firstitems/firstitems.lua @@ -47,13 +47,13 @@ function onLogin(cid) for i = 1, table.getn(sorcItems), 1 do doPlayerAddItem(cid, sorcItems[i], 1, false) end - + elseif getPlayerVocation(cid) == 2 then -- Druid for i = 1, table.getn(druidItems), 1 do doPlayerAddItem(cid, druidItems[i], 1, false) end - + elseif getPlayerVocation(cid) == 3 then -- Paladin for i = 1, table.getn(pallyItems), 1 do @@ -61,7 +61,7 @@ function onLogin(cid) end -- 8 arrows doPlayerAddItem(cid, 2544, 8, false) - + elseif getPlayerVocation(cid) == 4 then -- Knight for i = 1, table.getn(kinaItems), 1 do diff --git a/Lua/TFS_02/talkaction shopsystem/znoteshop.lua b/Lua/TFS_02/talkaction shopsystem/znoteshop.lua index de6fd08..361ff27 100644 --- a/Lua/TFS_02/talkaction shopsystem/znoteshop.lua +++ b/Lua/TFS_02/talkaction shopsystem/znoteshop.lua @@ -19,7 +19,7 @@ function onSay(cid, words, param) print("Player: " .. getCreatureName(cid) .. " triggered !shop talkaction.") -- Create the query local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. accid .. ";") - local served = false + local served = false -- Detect if we got any results if orderQuery ~= false then @@ -30,7 +30,7 @@ function onSay(cid, words, param) local q_count = result.getDataInt(orderQuery, "count") local description = "Unknown or custom type" - if type_desc[q_type] ~= nil then + if type_desc[q_type] ~= nil then description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) diff --git a/Lua/TFS_03/talkaction shopsystem/znoteshop.lua b/Lua/TFS_03/talkaction shopsystem/znoteshop.lua index 82b7cef..2179277 100644 --- a/Lua/TFS_03/talkaction shopsystem/znoteshop.lua +++ b/Lua/TFS_03/talkaction shopsystem/znoteshop.lua @@ -19,7 +19,7 @@ function onSay(cid, words, param) print("Player: " .. getCreatureName(cid) .. " triggered !shop talkaction.") -- Create the query local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. accid .. ";") - local served = false + local served = false -- Detect if we got any results if orderQuery ~= false then @@ -31,7 +31,7 @@ function onSay(cid, words, param) local q_count = result.getDataInt(orderQuery, "count") local description = "Unknown or custom type" - if type_desc[q_type] ~= nil then + if type_desc[q_type] ~= nil then description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) @@ -57,7 +57,7 @@ function onSay(cid, words, param) if(not gotItem) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have no available space in backpack to receive that item.") - end + end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP and Need ProtectZone!") end diff --git a/Lua/TFS_10/creaturescript sync outfits/syncoutfit.lua b/Lua/TFS_10/creaturescript sync outfits/syncoutfit.lua index 5cdf71d..563f6f5 100644 --- a/Lua/TFS_10/creaturescript sync outfits/syncoutfit.lua +++ b/Lua/TFS_10/creaturescript sync outfits/syncoutfit.lua @@ -1,9 +1,9 @@ --- Sync outfits that player own with Znote AAC --- So its possible to see which full sets player --- has in characterprofile.php +-- Sync outfits that player own with Znote AAC +-- So its possible to see which full sets player +-- has in characterprofile.php znote_outfit_list = { - { -- Female outfits + { -- Female outfits 136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, @@ -15,7 +15,7 @@ znote_outfit_list = { 1187, 1203, 1205, 1207, 1211, 1246, 1244, 1252, 1271, 1280, 1283, 1289, 1293, 1332 }, - { -- Male outfits + { -- Male outfits 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, @@ -31,14 +31,14 @@ znote_outfit_list = { } function onLogin(player) - -- storage_value + 1000 storages (highest outfit id) must not be used in other script. + -- storage_value + 1000 storages (highest outfit id) must not be used in other script. -- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value local storage_value = 10000 -- Loop through outfits for _, outfit in pairs(znote_outfit_list[player:getSex() + 1]) do - if player:hasOutfit(outfit,3) then - if player:getStorageValue(storage_value + outfit) ~= 3 then - player:setStorageValue(storage_value + outfit, 3) + if player:hasOutfit(outfit,3) then + if player:getStorageValue(storage_value + outfit) ~= 3 then + player:setStorageValue(storage_value + outfit, 3) end end end diff --git a/Lua/TFS_10/globalevent powergamers/powergamers.lua b/Lua/TFS_10/globalevent powergamers/powergamers.lua index d7af34e..2c84fa2 100644 --- a/Lua/TFS_10/globalevent powergamers/powergamers.lua +++ b/Lua/TFS_10/globalevent powergamers/powergamers.lua @@ -1,4 +1,4 @@ --- getEternalStorage and setEternalStorage +-- getEternalStorage and setEternalStorage -- can be added to data/global.lua if you want to use eternal storage for another purpose than this. -- Regular TFS global storage values get reset every time server reboots. This does not. local function getEternalStorage(key, parser) @@ -25,14 +25,14 @@ end -- SQL Query to execute: -- --[[ -ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist1` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist2` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist3` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist4` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist5` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist6` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist7` BIGINT(255) NOT NULL DEFAULT '0', +ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist1` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist2` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist3` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist4` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist5` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist6` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist7` BIGINT(255) NOT NULL DEFAULT '0', ADD `onlinetimetoday` BIGINT(20) NOT NULL DEFAULT '0', ADD `onlinetime1` BIGINT(20) NOT NULL DEFAULT '0', ADD `onlinetime2` BIGINT(20) NOT NULL DEFAULT '0', diff --git a/Lua/TFS_10/globalevent shopsystem/znoteshop.lua b/Lua/TFS_10/globalevent shopsystem/znoteshop.lua index e945dbb..a98bc2c 100644 --- a/Lua/TFS_10/globalevent shopsystem/znoteshop.lua +++ b/Lua/TFS_10/globalevent shopsystem/znoteshop.lua @@ -7,11 +7,11 @@ function onThink(interval, lastExecution) table.insert(shopTypes, 6); end local orderQuery = db.storeQuery([[ - SELECT + SELECT MIN(`po`.`player_id`) AS `player_id`, - `shop`.`id`, - `shop`.`type`, - `shop`.`itemid`, + `shop`.`id`, + `shop`.`type`, + `shop`.`itemid`, `shop`.`count` FROM `players_online` AS `po` INNER JOIN `players` AS `p` @@ -32,7 +32,7 @@ function onThink(interval, lastExecution) "Mounts", "Instant house purchase" } - repeat + repeat local player_id = result.getNumber(orderQuery, 'player_id') local orderId = result.getNumber(orderQuery, 'id') local orderType = result.getNumber(orderQuery, 'type') @@ -44,7 +44,7 @@ function onThink(interval, lastExecution) if player ~= nil then local description = "Unknown or custom type" - if type_desc[orderType] ~= nil then + if type_desc[orderType] ~= nil then description = type_desc[orderType] end print("Processing type "..orderType..": ".. description) @@ -66,11 +66,11 @@ function onThink(interval, lastExecution) player:addItem(orderItemId, orderCount) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. "!") print("Process complete. [".. player:getName() .."] has received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") - else -- not enough slots + else -- not enough slots player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your main backpack is full. You need to free up "..needslots.." available slots to get " .. orderCount .. " " .. ItemType(orderItemId):getName() .. "!") print("Process canceled. [".. player:getName() .."] need more space in his backpack to get " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") end - else -- not enough cap + else -- not enough cap player:sendTextMessage(MESSAGE_STATUS_WARNING, "You need more CAP to carry this order!") print("Process canceled. [".. player:getName() .."] need more cap to carry " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") end @@ -98,7 +98,7 @@ function onThink(interval, lastExecution) player:addOutfitAddon(outfitId, orderCount) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") print("Process complete. [".. player:getName() .."] has received outfit: ["..outfitId.."] with addon: ["..orderCount.."]") - else -- Already has outfit + else -- Already has outfit player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") print("Process canceled. [".. player:getName() .."] already have outfit: ["..outfitId.."] with addon: ["..orderCount.."].") end @@ -114,7 +114,7 @@ function onThink(interval, lastExecution) player:addMount(orderItemId) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new mount!") print("Process complete. [".. player:getName() .."] has received mount: ["..orderItemId.."]") - else -- Already has mount + else -- Already has mount player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this mount!") print("Process canceled. [".. player:getName() .."] already have mount: ["..orderItemId.."].") end @@ -145,11 +145,11 @@ function onThink(interval, lastExecution) if not served then -- If this order hasn't been processed yet (missing type handling?) print("Znote shop: Type ["..orderType.."] not properly processed. Missing Lua code?") end - else -- Not in protection zone + else -- Not in protection zone player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have a pending shop order, please enter protection zone.') print("Skipped one shop order. Reason: Player: [".. player:getName() .."] is not inside protection zone.") end - else -- player not logged in + else -- player not logged in print("Skipped one shop order. Reason: Player with id [".. player_id .."] is not online.") end diff --git a/Lua/TFS_10/revscriptsys/powergamers.lua b/Lua/TFS_10/revscriptsys/powergamers.lua index c60fd8a..ae5044e 100644 --- a/Lua/TFS_10/revscriptsys/powergamers.lua +++ b/Lua/TFS_10/revscriptsys/powergamers.lua @@ -1,5 +1,5 @@ --- getEternalStorage and setEternalStorage +-- getEternalStorage and setEternalStorage -- can be added to data/global.lua if you want to use eternal storage for another purpose than this. -- Regular TFS global storage values get reset every time server reboots. This does not. local function getEternalStorage(key, parser) @@ -26,14 +26,14 @@ end -- SQL Query to execute: -- --[[ -ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist1` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist2` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist3` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist4` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist5` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist6` BIGINT(255) NOT NULL DEFAULT '0', -ADD `exphist7` BIGINT(255) NOT NULL DEFAULT '0', +ALTER TABLE `znote_players` ADD `exphist_lastexp` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist1` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist2` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist3` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist4` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist5` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist6` BIGINT(255) NOT NULL DEFAULT '0', +ADD `exphist7` BIGINT(255) NOT NULL DEFAULT '0', ADD `onlinetimetoday` BIGINT(20) NOT NULL DEFAULT '0', ADD `onlinetime1` BIGINT(20) NOT NULL DEFAULT '0', ADD `onlinetime2` BIGINT(20) NOT NULL DEFAULT '0', diff --git a/Lua/TFS_10/revscriptsys/shopsystem_globalevent.lua b/Lua/TFS_10/revscriptsys/shopsystem_globalevent.lua index aaa338d..821aa7d 100644 --- a/Lua/TFS_10/revscriptsys/shopsystem_globalevent.lua +++ b/Lua/TFS_10/revscriptsys/shopsystem_globalevent.lua @@ -7,11 +7,11 @@ function globalevent.onThink(...) table.insert(shopTypes, 6); end local orderQuery = db.storeQuery([[ - SELECT + SELECT MIN(`po`.`player_id`) AS `player_id`, - `shop`.`id`, - `shop`.`type`, - `shop`.`itemid`, + `shop`.`id`, + `shop`.`type`, + `shop`.`itemid`, `shop`.`count` FROM `players_online` AS `po` INNER JOIN `players` AS `p` @@ -32,7 +32,7 @@ function globalevent.onThink(...) "Mounts", "Instant house purchase" } - repeat + repeat local player_id = result.getNumber(orderQuery, 'player_id') local orderId = result.getNumber(orderQuery, 'id') local orderType = result.getNumber(orderQuery, 'type') @@ -44,7 +44,7 @@ function globalevent.onThink(...) if player ~= nil then local description = "Unknown or custom type" - if type_desc[orderType] ~= nil then + if type_desc[orderType] ~= nil then description = type_desc[orderType] end print("Processing type "..orderType..": ".. description) @@ -66,11 +66,11 @@ function globalevent.onThink(...) player:addItem(orderItemId, orderCount) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. "!") print("Process complete. [".. player:getName() .."] has received " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") - else -- not enough slots + else -- not enough slots player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your main backpack is full. You need to free up "..needslots.." available slots to get " .. orderCount .. " " .. ItemType(orderItemId):getName() .. "!") print("Process canceled. [".. player:getName() .."] need more space in his backpack to get " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") end - else -- not enough cap + else -- not enough cap player:sendTextMessage(MESSAGE_STATUS_WARNING, "You need more CAP to carry this order!") print("Process canceled. [".. player:getName() .."] need more cap to carry " .. orderCount .. "x " .. ItemType(orderItemId):getName() .. ".") end @@ -98,7 +98,7 @@ function globalevent.onThink(...) player:addOutfitAddon(outfitId, orderCount) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") print("Process complete. [".. player:getName() .."] has received outfit: ["..outfitId.."] with addon: ["..orderCount.."]") - else -- Already has outfit + else -- Already has outfit player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") print("Process canceled. [".. player:getName() .."] already have outfit: ["..outfitId.."] with addon: ["..orderCount.."].") end @@ -114,7 +114,7 @@ function globalevent.onThink(...) player:addMount(orderItemId) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new mount!") print("Process complete. [".. player:getName() .."] has received mount: ["..orderItemId.."]") - else -- Already has mount + else -- Already has mount player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this mount!") print("Process canceled. [".. player:getName() .."] already have mount: ["..orderItemId.."].") end @@ -145,11 +145,11 @@ function globalevent.onThink(...) if not served then -- If this order hasn't been processed yet (missing type handling?) print("Znote shop: Type ["..orderType.."] not properly processed. Missing Lua code?") end - else -- Not in protection zone + else -- Not in protection zone player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have a pending shop order, please enter protection zone.') print("Skipped one shop order. Reason: Player: [".. player:getName() .."] is not inside protection zone.") end - else -- player not logged in + else -- player not logged in print("Skipped one shop order. Reason: Player with id [".. player_id .."] is not online.") end diff --git a/Lua/TFS_10/revscriptsys/shopsystem_talkaction.lua b/Lua/TFS_10/revscriptsys/shopsystem_talkaction.lua index 7d5ada9..3c98b3f 100644 --- a/Lua/TFS_10/revscriptsys/shopsystem_talkaction.lua +++ b/Lua/TFS_10/revscriptsys/shopsystem_talkaction.lua @@ -19,7 +19,7 @@ function talkaction.onSay(player) print("Player: " .. player:getName() .. " triggered !shop talkaction.") -- Create the query local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. player:getAccountId() .. ";") - local served = false + local served = false -- Detect if we got any results if orderQuery ~= false then @@ -31,7 +31,7 @@ function talkaction.onSay(player) local q_count = result.getNumber(orderQuery, "count") local description = "Unknown or custom type" - if type_desc[q_type] ~= nil then + if type_desc[q_type] ~= nil then description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) diff --git a/Lua/TFS_10/revscriptsys/sync_outfit.lua b/Lua/TFS_10/revscriptsys/sync_outfit.lua index 8cc2d3a..236b246 100644 --- a/Lua/TFS_10/revscriptsys/sync_outfit.lua +++ b/Lua/TFS_10/revscriptsys/sync_outfit.lua @@ -1,11 +1,11 @@ local creatureevent = CreatureEvent("SincOutfit") --- Sync outfits that player own with Znote AAC --- So its possible to see which full sets player --- has in characterprofile.php +-- Sync outfits that player own with Znote AAC +-- So its possible to see which full sets player +-- has in characterprofile.php znote_outfit_list = { - { -- Female outfits + { -- Female outfits 136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, @@ -17,7 +17,7 @@ znote_outfit_list = { 1187, 1203, 1205, 1207, 1211, 1246, 1244, 1252, 1271, 1280, 1283, 1289, 1293, 1332 }, - { -- Male outfits + { -- Male outfits 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, @@ -33,14 +33,14 @@ znote_outfit_list = { } function creatureevent.onLogin(player) - -- storage_value + 1000 storages (highest outfit id) must not be used in other script. + -- storage_value + 1000 storages (highest outfit id) must not be used in other script. -- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value local storage_value = 10000 -- Loop through outfits for _, outfit in pairs(znote_outfit_list[player:getSex() + 1]) do - if player:hasOutfit(outfit,3) then - if player:getStorageValue(storage_value + outfit) ~= 3 then - player:setStorageValue(storage_value + outfit, 3) + if player:hasOutfit(outfit,3) then + if player:getStorageValue(storage_value + outfit) ~= 3 then + player:setStorageValue(storage_value + outfit, 3) end end end diff --git a/Lua/TFS_10/talkaction shopsystem/znoteshop.lua b/Lua/TFS_10/talkaction shopsystem/znoteshop.lua index 9c05bac..c53abb5 100644 --- a/Lua/TFS_10/talkaction shopsystem/znoteshop.lua +++ b/Lua/TFS_10/talkaction shopsystem/znoteshop.lua @@ -19,7 +19,7 @@ function onSay(player, words, param) print("Player: " .. player:getName() .. " triggered !shop talkaction.") -- Create the query local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. player:getAccountId() .. ";") - local served = false + local served = false -- Detect if we got any results if orderQuery ~= false then @@ -31,7 +31,7 @@ function onSay(player, words, param) local q_count = result.getNumber(orderQuery, "count") local description = "Unknown or custom type" - if type_desc[q_type] ~= nil then + if type_desc[q_type] ~= nil then description = type_desc[q_type] end print("Processing type "..q_type..": ".. description) diff --git a/README.md b/README.md index 040f8b2..a11e191 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,17 @@ ZnoteAAC [![CodeFactor](https://www.codefactor.io/repository/github/znote/znoteaac/badge)](https://www.codefactor.io/repository/github/znote/znoteaac) ### What is Znote AAC? -Znote AAC is a full-fledged website used together with an Open Tibia(OT) server. -It aims to be super easy to install and compatible with all the popular OT distributions. -It is created in PHP with a simple custom procedural framework. +Znote AAC is a full-fledged website used together with an Open Tibia(OT) server. +It aims to be super easy to install and compatible with all the popular OT distributions. +It is created in PHP with a simple custom procedural framework. ### Where do I download? -We use github to distribute our versions, stable are tagged as releases, while development is the latest commit. +We use github to distribute our versions, stable are tagged as releases, while development is the latest commit. * [Stable](https://github.com/Znote/ZnoteAAC/releases) * [Development](https://github.com/Znote/ZnoteAAC/archive/master.zip) -**NOTE:** Development version supports TFS 1.3, but you can expect bugs to occur. +**NOTE:** Development version supports TFS 1.3, but you can expect bugs to occur. ### Compatible OT distributions Znote AAC primarily aims to be compatible with [Forgotten Server](https://github.com/otland/forgottenserver) @@ -26,7 +26,7 @@ Forgotten Server is commonly known as TFS (The Forgotten Server) and Znote AAC s * PHP Version 5.6 or higher. Mostly tested on 5.6 and 7.4. Most web stacks ships with this as default these days. ### Optionals -* For email registration verification and account recovery: [PHPMailer](https://github.com/PHPMailer/PHPMailer/releases) Version 6.x, extracted and renamed to just "PHPMailer" in Znote AAC directory. +* For email registration verification and account recovery: [PHPMailer](https://github.com/PHPMailer/PHPMailer/releases) Version 6.x, extracted and renamed to just "PHPMailer" in Znote AAC directory. * PHP extension curl for PHPMailer, paypal and google reCaptcha services. * PHP extension openssl for google reCaptcha services. @@ -36,8 +36,8 @@ Forgotten Server is commonly known as TFS (The Forgotten Server) and Znote AAC s Without modifying config.php, enter the website and wait for mysql connection error. This will show you the rest of the instructions as well as the mysql schema. -2: Edit config.php and: -- modify $config['ServerEngine'] with correct TFS version you are running. (TFS_02, TFS_03, TFS_10, OTHIRE). +2: Edit config.php and: +- modify $config['ServerEngine'] with correct TFS version you are running. (TFS_02, TFS_03, TFS_10, OTHIRE). - modify $config['page_admin_access'] with your admin account username(s). 3: Before inserting correct SQL connection details, visit the website ( http://127.0.0.1/ ), it will generate a mysql schema you should import to your OT servers database. @@ -48,7 +48,7 @@ This will show you the rest of the instructions as well as the mysql schema. 6: Enjoy Znote AAC. You can look around [HERE](https://otland.net/forums/website-applications.118/) for plugins and resources to Znote AAC, for instance various free templates to use. -7: Please note that you need PHP cURL enabled to make Paypal payments work. +7: Please note that you need PHP cURL enabled to make Paypal payments work. 8: You may need to change directory access rights of /engine/cache to allow writing. @@ -60,7 +60,7 @@ Znote AAC is very rich feature wise, here is an attempt at summarizing what we o - TFS 0.2 - TFS 0.3/4 - TFS 1.x -- Distributions based on these (such as OTX). +- Distributions based on these (such as OTX). #### General - Server wide latest death list diff --git a/admin.php b/admin.php index a822df9..1df5044 100644 --- a/admin.php +++ b/admin.php @@ -1,4 +1,4 @@ - $znote_account['points'], - 'New:' => $points, + 'Old:' => $znote_account['points'], + 'New:' => $points, 'Total:' => ($znote_account['points'] + $points) ), false, @@ -175,7 +175,7 @@ echo "Last cached on: ". hhb_tohtml(getClock($basic['cached'], true)) .".
";