local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
accountManager = "Account Manager"
managerCounter = 0
for i, player in ipairs(getOnlinePlayers()) do
if accountManager:lower() == player:lower() then
managerCounter = managerCounter + 1
end
end
if managerCounter >= 3 then
return false
end
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, VipReceive)
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KillingInTheNameOf")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0)
end
setPlayerStorageValue(cid, 42350, 0)
setPlayerStorageValue(cid, 42352, 0)
return true
end
function onThink(cid, interval)
if(not isCreature(cid)) then
return
end
local skull, skullEnd = getCreatureSkull(cid), getPlayerSkullEnd(cid)
if(skullEnd > 0 and skull > SKULL_WHITE and os.time() > skullEnd and not getCreatureCondition(cid, CONDITION_INFIGHT)) then
doPlayerSetSkullEnd(cid, 0, skull)
end
end
-- Global Server Config
-- Account manager
accountManager = true
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 32230
newPlayerSpawnPosY = 32206
newPlayerSpawnPosZ = 7
newPlayerTownId = 2
newPlayerLevel = 8
newPlayerMagicLevel = 8
generateAccountNumber = false
-- Unjustified kills
useFragHandler = true
redSkullLength = 30 * 24 * 60 * 60
blackSkullLength = 45 * 24 * 60 * 60
dailyFragsToRedSkull = 3
weeklyFragsToRedSkull = 10
monthlyFragsToRedSkull = 40
dailyFragsToBlackSkull = 10
weeklyFragsToBlackSkull = 20
monthlyFragsToBlackSkull = 90
dailyFragsToBanishment = 100
weeklyFragsToBanishment = 300
monthlyFragsToBanishment = 1200
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = true
advancedFragList = true
-- Banishments
notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 7 * 24 * 60 * 60
killsBanLength = 7 * 24 * 60 * 60
finalBanLength = 30 * 24 * 60 * 60
ipBanishmentLength = 1 * 24 * 60 * 60
broadcastBanishments = true
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = false
-- Battle
worldType = "pvp"
protectionLevel = 20
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 60 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 7
criticalHitMultiplier = 1
displayCriticalHitNotify = false
removeWeaponAmmunition = true
removeWeaponCharges = true
removeRuneCharges = true
whiteSkullTime = 15 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = false
showHealingDamageForMonsters = false
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = false
loginProtectionPeriod = 10 * 1000
deathLostPercent = 10
stairhopDelay = 2 * 1000
pushCreatureDelay = 2 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true
fistBaseAttack = 7
-- Connection config
worldId = 0
ip = "angelions.noip.me"
loginPort = 7171
gamePort = 7172
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 1000
motd = "Raids Novas!"
displayOnOrOffAtCharlist = true
onePlayerOnlinePerAccount = false
allowClones = false
serverName = "Angelion"
loginMessage = "Welcome! ^-^"
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = false
-- Database
sqlType = "sqlite"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = "150198"
sqlDatabase = "realserver"
sqlFile = "realserver.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"
-- Deathlist
deathListEnabled = false
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5
-- Guilds
ingameGuildManagement = true
levelToFormGuild = 40
premiumDaysToFormGuild = 0
guildNameMinLength = 4
guildNameMaxLength = 40
-- Highscores
highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 60
-- Houses
buyableAndSellableHouses = true
houseNeedPremium = true
bedsRequirePremium = true
levelToBuyHouse = 20
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 1000
houseRentPeriod = "never"
houseCleanOld = 0
guildHalls = true
-- Item usage
timeBetweenActions = 1 * 0001
timeBetweenExActions = 1 * 0001
hotkeyAimbotEnabled = true
-- Map
mapName = "World"
mapAuthor = "Giorox"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = ""
-- Process
defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"
-- Startup
startupDatabaseOptimization = true
updatePremiumStateAtStartup = true
confirmOutdatedVersion = false
-- Spells
formulaLevel = 5.0
formulaMagic = 1.0
bufferMutedOnSpellFailure = false
spellNameInsteadOfWords = false
emoteSpells = false
-- Outfits
allowChangeOutfit = true
allowChangeColors = true
allowChangeAddons = true
disableOutfitsForPrivilegedPlayers = false
addonsOnlyPremium = true
-- Miscellaneous
dataDirectory = "data/"
logsDirectory = "data/logs/"
bankSystem = true
displaySkillLevelOnAdvance = false
promptExceptionTracerErrorBox = true
maximumDoorLevel = 500
maxMessageBuffer = 4
-- VIP list
separateVipListPerCharacter = false
vipListDefaultLimit = 20
vipListDefaultPremiumLimit = 100
-- Saving-related
saveGlobalStorage = true
useHouseDataStorage = true
storePlayerDirection = false
-- Loot
checkCorpseOwner = true
monsterLootMessage = 3
monsterLootMessageType = 25
-- Ghost mode
ghostModeInvisibleEffect = false
ghostModeSpellEffects = true
-- Limits
idleWarningTime = 59 * 60 * 1000
idleKickTime = 60 * 60 * 1000
reportsExpirationAfterReads = 1
playerQueryDeepness = 2
tileLimit = 0
protectionTileLimit = 0
houseTileLimit = 0
-- Premium-related
freePremium = true
premiumForPromotion = true
-- Blessings
blessings = true
blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8
-- Rates
experienceStages = false
rateExperience = 50
rateExperienceFromPlayers = 0
rateSkill = 50
rateMagic = 100
rateLoot = 3
rateSpawn = 1
-- Monster rates
rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0
-- Experience from players
minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1
-- Stamina
rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 12
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
staminaLootLimit = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true
-- Party
experienceShareRadiusX = 100
experienceShareRadiusY = 100
experienceShareRadiusZ = 2
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000
-- Global save
globalSaveEnabled = false
globalSaveHour = 8
globalSaveMinute = 0
shutdownAtGlobalSave = true
cleanMapAtGlobalSave = false
-- Spawns
deSpawnRange = 2
deSpawnRadius = 50
-- Summons
maxPlayerSummons = 2
teleportAllSummons = false
teleportPlayerSummons = false
-- Status
statusPort = 7171
ownerName = "Giorox"
ownerEmail = "[email protected]"
url = ""
location = "Brasil"
displayGamemastersWithOnlineCommand = false
-- Logs
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outputLog = ""
truncateLogsOnStartup = false
-- Manager
managerPort = 7171
managerLogs = true
managerPassword = ""
managerLocalhostOnly = true
managerConnectionsLimit = 1
-- Admin
adminPort = 7171
adminLogs = true
adminPassword = ""
adminLocalhostOnly = true
adminConnectionsLimit = 1
adminRequireLogin = true
adminEncryption = ""
adminEncryptionData = ""
<?xml version="1.0" encoding="UTF-8"?>
<groups>
<group id="1" name="Player"/>
<group id="2" name="Tutor" flags="16809984" customFlags="2" access="1" violationReasons="4" nameViolationFlags="2"/>
<group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="2" violationReasons="10" nameViolationFlags="2" statementViolationFlags="63" maxVips="200"/>
<group id="4" name="Gamemaster" flags="3808558964575" customFlags="257215" access="3" violationReasons="19" nameViolationFlags="10" statementViolationFlags="69" depotLimit="3000" maxVips="300" outfit="75"/>
<group id="5" name="Community Manager" flags="3845069447162" customFlags="2097151" access="4" violationReasons="23" nameViolationFlags="42" statementViolationFlags="213" depotLimit="0" maxVips="0" outfit="266"/>
<group id="6" name="God" flags="3845069447162" customFlags="2097151" access="5" violationReasons="23" nameViolationFlags="426" statementViolationFlags="469" depotLimit="5000" maxVips="500" outfit="266"/>
</groups>