To bad i dont have path_10_11/vc14/theforgottenserver.slntake a look here:
![]()
Support to old frags skull system · mattyx14/otxserver@bbdfef2
Support to ruleVilations - https://github.com/mattyx14/otxserver/issues/280 For: Nostalrius 7.7 Clean codegithub.com
| teleportNewbies = true | |||
| newbieTownId = 11 | |||
| newbieLevelThreshold = 5 |
| static constexpr int32_t CHANNEL_GUILD = 0x00; | |||
| static constexpr int32_t CHANNEL_PARTY = 0x01; | |||
| static constexpr int32_t CHANNEL_PRIVATE = 0xFFFF; |
1>..\src\iologindata.cpp(361): error C2228: left of '.storeQuery' must have class/struct/unionThis commit is not just to add old frag system ,if you read the changelog you will see: - Add support to skullSystem and ruleViolations to 7.x .
So you need to edit the part that corresponds to frag system.
You need to change: config.lua , migrations ,configmanager.cpp and configmanager.h (just the skull and ban part) ,iologindata.cpp, luascript.cpp and luascript.h (just the skull and ban part) ,player.cpp and player.h .
1>..\src\iologindata.cpp(742): error C2228: left of '.executeQuery' must have class/struct/unioni tried with otx3 8.6 and compiled fine here , the warning C4018 is not a problem.
you have to remove registerEnumIn("configKeys", ConfigManager::FRAG_TIME) on luascript.cpp,
,iologindata.cpp line 361 change db.storeQuery for db->storeQuery ,try again and good luck =)
edit*= ahh i forgot to say ,you shouldn't have changed this part: if (lastHitPlayer) { on player.cpp line 2092
and you will need to change your talkaction kills for something like this:iologindata.cpp line 361 change db.storeQuery for db->storeQuery ,try again and good luck =)
function onSay(player, words, param)
if Game.getWorldType() == WORLD_TYPE_PVP_ENFORCED then
player:showTextDialog(1998, "Your character has not murders history.", false)
return false
end
local today = os.time()
local skullTicks = player:getPlayerKillerEnd()
local lastDay = 0
local lastWeek = 0
local lastMonth = 0
local egibleMurders = 0
local dayTimestamp = today - (24 * 60 * 60)
local weekTimestamp = today - (7 * 24 * 60 * 60)
local monthTimestamp = today - (30 * 24 * 60 * 60)
local killsDayRedSkull = configManager.getNumber(configKeys.KILLS_DAY_RED_SKULL)
local killsWeekRedSkull = configManager.getNumber(configKeys.KILLS_WEEK_RED_SKULL)
local killsMonthRedSkull = configManager.getNumber(configKeys.KILLS_MONTH_RED_SKULL)
local killsDayBanishment = configManager.getNumber(configKeys.KILLS_DAY_BANISHMENT)
local killsWeekBanishment = configManager.getNumber(configKeys.KILLS_WEEK_BANISHMENT)
local killsMonthBanishment = configManager.getNumber(configKeys.KILLS_MONTH_BANISHMENT)
for _, timestamp in pairs(player:getMurderTimestamps()) do
if timestamp > dayTimestamp then
lastDay = lastDay + 1
end
if timestamp > weekTimestamp then
lastWeek = lastWeek + 1
end
egibleMurders = lastMonth + 1
if timestamp <= monthTimestamp then
egibleMurders = lastMonth
end
lastMonth = egibleMurders
end
local message = ""
message = message .. "\n"
message = message .. "Last murders within 24 hours " .. lastDay .. "\n"
message = message .. "Last murders within a week " .. lastDay .. "\n"
message = message .. "Last murders within a month " .. lastDay .. "\n"
message = message .. "\n"
message = message .. "Players you may kill for a red skull:\n"
message = message .. "- Within 24 hours " .. killsDayRedSkull - lastDay .. " murders.\n"
message = message .. "- Within a week " .. killsWeekRedSkull - lastWeek .. " murders.\n"
message = message .. "- Within a month " .. killsMonthRedSkull - lastDay .. " murders.\n"
message = message .. "\n"
message = message .. "Players you may kill for a banishment:\n"
message = message .. "- Within 24 hours " .. killsDayBanishment - lastDay .. " murders.\n"
message = message .. "- Within a week " .. killsWeekBanishment - lastWeek .. " murders.\n"
message = message .. "- Within a month " .. killsMonthBanishment - lastDay .. " murders.\n"
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message)
return false
end
Ok fixed those errors, so now what aboutand you will need to change your talkaction kills for something like this:
LUA:function onSay(player, words, param) if Game.getWorldType() == WORLD_TYPE_PVP_ENFORCED then player:showTextDialog(1998, "Your character has not murders history.", false) return false end local today = os.time() local skullTicks = player:getPlayerKillerEnd() local lastDay = 0 local lastWeek = 0 local lastMonth = 0 local egibleMurders = 0 local dayTimestamp = today - (24 * 60 * 60) local weekTimestamp = today - (7 * 24 * 60 * 60) local monthTimestamp = today - (30 * 24 * 60 * 60) local killsDayRedSkull = configManager.getNumber(configKeys.KILLS_DAY_RED_SKULL) local killsWeekRedSkull = configManager.getNumber(configKeys.KILLS_WEEK_RED_SKULL) local killsMonthRedSkull = configManager.getNumber(configKeys.KILLS_MONTH_RED_SKULL) local killsDayBanishment = configManager.getNumber(configKeys.KILLS_DAY_BANISHMENT) local killsWeekBanishment = configManager.getNumber(configKeys.KILLS_WEEK_BANISHMENT) local killsMonthBanishment = configManager.getNumber(configKeys.KILLS_MONTH_BANISHMENT) for _, timestamp in pairs(player:getMurderTimestamps()) do if timestamp > dayTimestamp then lastDay = lastDay + 1 end if timestamp > weekTimestamp then lastWeek = lastWeek + 1 end egibleMurders = lastMonth + 1 if timestamp <= monthTimestamp then egibleMurders = lastMonth end lastMonth = egibleMurders end local message = "" message = message .. "\n" message = message .. "Last murders within 24 hours " .. lastDay .. "\n" message = message .. "Last murders within a week " .. lastDay .. "\n" message = message .. "Last murders within a month " .. lastDay .. "\n" message = message .. "\n" message = message .. "Players you may kill for a red skull:\n" message = message .. "- Within 24 hours " .. killsDayRedSkull - lastDay .. " murders.\n" message = message .. "- Within a week " .. killsWeekRedSkull - lastWeek .. " murders.\n" message = message .. "- Within a month " .. killsMonthRedSkull - lastDay .. " murders.\n" message = message .. "\n" message = message .. "Players you may kill for a banishment:\n" message = message .. "- Within 24 hours " .. killsDayBanishment - lastDay .. " murders.\n" message = message .. "- Within a week " .. killsWeekBanishment - lastWeek .. " murders.\n" message = message .. "- Within a month " .. killsMonthBanishment - lastDay .. " murders.\n" player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message) return false end
Yea fixed all errors thanks. As far as i know warnings isnt bad but do you have an idea how to fix those unsigned? Since it makes source dirtychange Database& db for Database* db