From d506b1c89a892bd5da02c78a496438f8bdd65e86 Mon Sep 17 00:00:00 2001 From: ErikasKontenis <e.kontenis@gmail.com> Date: Sat, 25 Jan 2020 19:45:40 +0200 Subject: [PATCH] increase loot rate and spawn rate --- config.lua | 2 +- config.prod.lua | 2 +- data/talkactions/scripts/remove_house.lua | 22 ++++++++++++++++++++++ data/talkactions/talkactions.xml | 1 + src/spawn.cpp | 2 +- 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 data/talkactions/scripts/remove_house.lua diff --git a/config.lua b/config.lua index 19cca05..8b6e3fa 100644 --- a/config.lua +++ b/config.lua @@ -84,7 +84,7 @@ newbieLevelThreshold = 5 -- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml rateExp = 1 rateSkill = 5 -rateLoot = 1 +rateLoot = 2 rateMagic = 2 rateSpawn = 0 diff --git a/config.prod.lua b/config.prod.lua index 34550de..1e200c1 100644 --- a/config.prod.lua +++ b/config.prod.lua @@ -84,7 +84,7 @@ newbieLevelThreshold = 5 -- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml rateExp = 1 rateSkill = 5 -rateLoot = 1 +rateLoot = 2 rateMagic = 2 rateSpawn = 0 diff --git a/data/talkactions/scripts/remove_house.lua b/data/talkactions/scripts/remove_house.lua new file mode 100644 index 0000000..c7f4f86 --- /dev/null +++ b/data/talkactions/scripts/remove_house.lua @@ -0,0 +1,22 @@ +function onSay(player, words, param) + if not player:getGroup():getAccess() then + return true + end + + if player:getAccountType() < ACCOUNT_TYPE_GOD then + return false + end + + local position = player:getPosition() + local tile = Tile(position) + local house = tile and tile:getHouse() + if house == nil then + player:sendCancelMessage("You are not inside a house.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + house:setOwnerGuid(0) + player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully removed this house.") + return false +end diff --git a/data/talkactions/talkactions.xml b/data/talkactions/talkactions.xml index 99e591d..a0c7fa5 100644 --- a/data/talkactions/talkactions.xml +++ b/data/talkactions/talkactions.xml @@ -37,6 +37,7 @@ <talkaction words="/clean" script="clean.lua" /> <talkaction words="/storagevalue" separator=" " script="storagevalue.lua" /> <talkaction words="/minimap" separator=" " script="minimap_scan.lua" /> + <talkaction words="/removehouse" separator=" " script="remove_house.lua" /> <!-- player talkactions --> <talkaction words="!buypremium" script="buyprem.lua"/> diff --git a/src/spawn.cpp b/src/spawn.cpp index 8b08492..4a39128 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -89,7 +89,7 @@ bool Spawns::loadFromXml(const std::string& filename) spawnList.emplace_front(pos, radius); Spawn& spawn = spawnList.front(); - uint32_t interval = pugi::cast<uint32_t>(childNode.attribute("spawntime").value()) * 1000; + uint32_t interval = pugi::cast<uint32_t>(childNode.attribute("spawntime").value()) * 500; if (interval > MINSPAWN_INTERVAL) { uint32_t exInterval = g_config.getNumber(ConfigManager::RATE_SPAWN); if (exInterval) {