//****************************************************************************
// Copyright 2023 SphereServer development team.
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//****************************************************************************

///////////////////////////////////////////////////////////////
//////// General Information
///////////////////////////////////////////////////////////////

[SPHERE]
AGREE=1
// Name of your Sphere shard
ServName=MyShard
// The IP of your server, this will be 127.0.0.1 almost always
//  If you are behind a router, set your public IP in the function f_onserver_start, in core/serv_triggers.scp
ServIP=127.0.0.1
// The port of your server, this is 2593 by default
ServPort=2593

// Admin's contact email
AdminEmail=me@my.email.com
// Web page for this server
URL=www.myshard.com
// GMT offset, from -12 to +12 [London=0, EST=5, etc]
TimeZone=0

// Official staff language
Lang=English

// Starts Sphere as a system service on Windows XP and newer.
// To install Sphere as service, set this to 1 and run sphere from cli with `-k install` parameter.
// To uninstall service, use `-k uninstall` parameter.
NTService=0

// MariaDB (MySQL) configuration
//MySQL=0
//MySQLHost=
//MySQLUser=
//MySQLPassword=
//MySQLDatabase=

///////////////////////////////////////////////////////////////
//////// File Locations
///////////////////////////////////////////////////////////////
// Directory where spheretables.scp is located, from there we will
// load any additional scripts
ScpFiles=scripts/

// Where your sphereworld.scp and spherechars.scp are located
WorldSave=save/

// Where your sphereaccu.scp and sphereacct.scp is located
AcctFiles=accounts/


// UO INSTALLATION  -  Note that if it's not set ( or commented ), sphere will scan windows registry to auto-detect it.
// If windows can't find the dir, then it must point to install's directory.
//
// For Old installations (client less than 7.0.20) this need: map0.mul, statics0.mul,
//  staidx0.mul, multi.mul, multi.idx, hues.mul, tiledata.mul.
// Optional files: verdata.mul, mapX.mul/staticsX.mul/staidxX.mul for higher
//  maps support (Malas, etc).
//
// For newer installs this need the same files in .uop format
//
// A full install folder is recommended as required files may change over time.
//MulFiles=mul/

// Where your log files will be saved by sphere
Log=logs/

// ***WARNING***
// These Map settings are required for a map to be enabled as of revision 1834.
// MAP0 is automatically loaded even if not present here as of revision 1836.
// Disabling one of theses map settings on a live shard will cause it to wipe that map from the saves.
// Remember to comment/uncomment associated sphere_mapX and .scp and sphere_map_pointsX.scp in spheretables.scp

//MapX=MaxX,MaxY,SectorSize,MapReadID,MapSendID
//MapX = Sets X to the given number, so .map X will send work over these settings
//MaxX = Sets Maximum X value for this map's size. Same for MaxY.
//SectorSize = Sets the size of sectors, in each server's tick all sectors for all maps are read in a loop, this should be taken in consideration for performance along with SectorSleep.
//MapReadID = Sets the mapX file to read from muls folder (This means which file will server read for walkchecks).
//MapSendID = Sets the mapX file to read for the client (this can be different than MapReadID but, obviously, not recomended for normal usage).

// Map of Felucca
//Map0=6144,4096,-1,0,0		//Old size
Map0=7168,4096,-1,0,0		//ML size

// Map of Trammel
//Map1=6144,4096,-1,1,1		//Old size
Map1=7168,4096,-1,1,1		//ML size

// Map of Ilshenar
Map2=2304,1600,-1,2,2

// Map of Malas
Map3=2560,2048,-1,3,3

// Map of Tokuno Islands
Map4=1448,1448,-1,4,4

// Map of Ter Mur
Map5=1280,4096,-1,5,5

// To enable the use of MapDif*.mul and StaDif*.mul files, set this to 1. Note: these files were removed on clients 6+.
UseMapDiffs=0

///////////////////////////////////////////////////////////////
//////// World Save Information
///////////////////////////////////////////////////////////////
// How often for Sphere to save your world (minutes)
SavePeriod=20

// How many backup levels to keep. Each level means 7 backups done for it.
// So, 10*7 = 70 backup saves will be storied.
BackupLevels=10

// On would save in the background quietly over a longer period of time, and not interrupt the game
// Off would notify "World save has been initiated" and save faster, but pause the game momentarily
SaveBackground=0

// If EF_DYNAMICBACKSAVE is set. How many sectors should be saved per Backgroundsave-Tick?
SaveSectorsPerTick=1

// If EF_DYNAMICBACKSAVE is set:
// How many items should the dynamic backsave save at max per Backgroundsave-Tick?
SaveStepMaxComplexity=500

// Save NPC's skills that are bigger or equal to NPCSkillSave. If smaller, reset skill to 0
// NPCSkillSave=10

///////////////////////////////////////////////////////////////
//////// Account Management
///////////////////////////////////////////////////////////////
//Code for servers account application process
//  0=Closed,       // Closed. Not accepting more.
//  2=Free,         // Anyone can just log in and create a full account.
//  3=GuestAuto,    // You get to be a guest and are automatically sent email with u're new password.
//  4=GuestTrial,   // You get to be a guest til u're accepted for full by an Admin.
//  6=Unspecified,  // Not specified.
// To enable auto account you must set this to 2
AccApp=0

// Store password hashed with MD5
Md5Passwords=0

// local ip is assumed to be the admin
LocalIPAdmin=1

// Default number of chars allowed per account (maximum value is 7)
MaxCharsPerAccount=5

// Min time for a char to exist before delete allowed (in seconds)
MinCharDeleteTime=7*24*60*60

// Max number of Guest accounts allowed
GuestsMax=0

// Max wrong password tries on client login screen before temporary ban client IP (0 is disabled)
ClientLoginMaxTries=0

// Duration (in minutes) of temporary ban to client IPs that reach max wrong password tries
ClientLoginTempBan=3

///////////////////////////////////////////////////////////////
//////// Client Management
///////////////////////////////////////////////////////////////
// What client protocol version used
// Comment out the ClientVersion line to allow any client that is supported.
//ClientVersion=2.0.3

// Set this to 1 to allow login to encrypted clients
UseCrypt=1

// Set this to 1 to allow login to unencrypted clients
UseNoCrypt=0

// Maximum total open connections to server
ClientMax=256

// Maximum open connections to server per IP
ClientMaxIP=16

// Maximum total (not-in-game) connections to server 
ConnectingMax=32

// Maximum total simultaneous (not-in-game) connections to server per IP
ConnectingMaxIp=8

// How long logged out clients linger in seconds
ClientLinger=300

//Speedhack detection settings.
// Upon detection, @USEREXWALKLIMIT trigger is fired and it can be used for taking action.
// The system is based on points. On a fast step, player loses points. On a slow step, player gains points.
// If player reaches 0 points speedhack is detected and score is reset to 500.
// WalkBuffer is the maximum points a player can have. Higher buffer could take more time to detect and not much influence on false positive
WalkBuffer=15 //Set to 0 to disable speedhack detection

// WalkRegen is the a correction factor applied on point gaining. If too high, smaller speedhack will not be detected. If too low, you'll get false positives.
WalkRegen=25 // Increase in case of false positive. Value below 20 will always cause false positive.

// Only commands issued by this plevel and higher will be logged
CommandLog=0

// Set to 1 to enable logging of commands issued via telnet
TelnetLog=1

// Prefix for ingame commands
CommandPrefix=.

// Set from 0 - 7 to set what the default plevel is to use commands.
DefaultCommandLevel=7

// Function to call if client is executing a command to override the default.
//CommandTrigger=f_oncommand

// Use the built in http server
// 0 - disable http server and webpage generation
// 1 - disable http server and enable webpage generation
// 2 - enable http server and webpage generation (default)
UseHttp=2

// Use the OSI AuthID to avoid possible hijack to game server.
UseAuthID=1

// Set account RESDISP automatically based on player client version
AutoResDisp=1

// Default setting for new accounts specifying default priv level
//PRIV_DETAIL		00040	// Show combat detail messages
//PRIV_BLOCKED		02000	// The account is blocked.
//AutoPrivFlags=040

// How often send my hits updates to visible clients (in seconds)
//HitsUpdateRate=1

///////////////////////////////////////////////////////////////
//////// Game Mechanics
///////////////////////////////////////////////////////////////

// Warning: If you change EraLimitGear/Loot/Props value on a live shard, you'll have to restart Sphere for them to be active.
// Don't allow to NPCs to create gear newer than the items from the expansion in the given value (Clothes, weapons, hairs ...).
EraLimitGear = 9 // 9 = ToL (See the resdisp defnames in defs.scp to know which value matches which expansion)

// Don't allow to NPCs to create loot newer than the items from the expansion in the given value.
EraLimitLoot = 9

// Don't allow to chars (players and NPCs) to have properties newer than the ones from the expansion in the given value (Clothes, weapons, hairs ...).
EraLimitProps = 9

// Maximum distance to hear char whispering
// (-1 = never hear, 0 = hear if distance is <= listener's VisualRange)
//DistanceWhisper=3

// Maximum distance to hear char talking
// (-1 = never hear, 0 = hear if distance is <= listener's VisualRange)
//DistanceTalk=18

// Maximum distance to hear char yelling
// (-1 = never hear, 0 = hear if distance is <= listener's VisualRange)
//DistanceYell=31

// Maximum distance for NPCs to hear
// Setting value to negative will set a distance of abs(value) with no LOS check
//NPCDistanceHear=4

// Do not allow entering under roof being on horse?
MountHeight=0

// Archery does not work if too close (0 = not checked)
ArcheryMinDist=2

// Maximum Distance for Archery
ArcheryMaxDist=15

// This is the percent of max weight at which stamina is lost half the time
// (200 = no effect)
StaminaLossAtWeight=150

// Stamina penalty % to apply over StaminaLossAtWeight when running (0 = no penalty)
RunningPenalty=50

// Stamina to lose at each step when walking while overweight
// (NOTE: value is also increased by 1 at each 5 stones exceeded, and divided by 3 on mounted chars)
StaminaLossOverweight=5

// Stamina penalty % to apply over StaminaLossOverweight when running (0 = no penalty)
RunningPenaltyOverweight=10

// Show people joining/leaving the server. 0 disables, 2 enables staff only.
ArriveDepartMsg=1

// Do houses generate keys automatically?
AutoHouseKeys=1

// Do ships generate keys automatically?
AutoShipKeys=1

// Are house and boat keys newbied automatically? (Requires AutoHouseKeys=1)
AutoNewbieKeys=1

// Max houses an account can have (default 1).
MaxHousesAccount = 1

// Max houses one player can have (default 1).
MaxHousesPlayer = 1

// Max ships an account can have (default 1).
MaxShipsAccount = 1

// Max ships one player can have (default 1).
MaxShipsPlayer = 1

// Max houses a guild can have (default 1).
MaxHousesGuild = 1

// Max ships a guild can have (default 1).
MaxShipsGuild = 1

// Maximum number of items inside a container. Default (and maximum): 255 (higher values are unsupported by the Classic Client
//  and the older 2D client versions. The Enhanced Client supports a maximum af 125 items per container, so update this setting if you are going to use that client).
ContainerMaxItems=255

// % of maxweight a player can drag and drop (-1 = unlimited)
DragWeightMax=300

// Addition weight in stones allowed over the calculated maxweight in main backpack (-1 = unlimited ; 0 = Player can't go over maxweight)
// This will allow player to add item on their backpack and surcharge themself. (StaminaLossOverweight will be use) 
BackpackOverload=40

// Maximum number of items allowed in bank
// Setting it to anything less than 0 (-1) will avoid items check
BankMaxItems=1000

// Maximum weight in stones allowed in bank
// Setting it to anything less than 0 (-1) will avoid weight check
BankMaxWeight=1000

// If 1 vendors will take gold only from backpack
PayFromPackOnly=0

// Disable weather effects?
NoWeather=1

// Set to 1 for items to keep their attr_newbie flag
// when item is transfered to an NPC.
//AllowNewbTransfer=0

// Default light level in dungeons
DungeonLight=27

// Day light level 0-30
LightDay=0

// Night light level 0-30
LightNight=25

// Allow manual sector light override?
//AllowLightOverride=1

// Wool Regen Time (in minutes)
WoolGrowthTime=30

// Suppress player speech with 75% of capital letters
SuppressCapitals=0

// Extra combat flags to control the fight (default: 0)
// COMBAT_NODIRCHANGE           00001  // Not rotate player when fighting (like was in 0.51a)
// COMBAT_FACECOMBAT            00002  // Allow faced combat only (recommended)
// COMBAT_PREHIT                00004  // Deal the damage in the same moment as the swing animation starts  (OSI like) (use an AnimDelay = 0 instead of = 10 tenths of second)
// COMBAT_ELEMENTAL_ENGINE      00008  // Use DAM*/RES* to split damage/resist into Physical/Fire/Cold/Poison/Energy (AOS) instead use old AR (pre-AOS)
// COMBAT_DCLICKSELF_UNMOUNTS   00020  // Unmount horse when dclicking self while in warmode
// COMBAT_ALLOWHITFROMSHIP      00040  // Allow attacking opponents from ships
// COMBAT_NOPETDESERT			00080 // Allow pet owner attack own pet without make it desert its owner
// COMBAT_ARCHERYCANMOVE        00100  // Allow firing bow while moving
// COMBAT_STAYINRANGE           00200  // Abort attack swing when out of range instead of waiting to come back in range
// COMBAT_STACKARMOR            01000  // If a region is covered by more than one armor part, all AR will count
// COMBAT_NOPOISONHIT           02000  // Disables old (55i like) poisoning style (0~100% chance based on Poisoning skill for monsters, or 50% chance for poisoned weapons)
// COMBAT_SLAYER				04000  // Enables Slayer damage PVM combat
// COMBAT_SWING_NORANGE			08000  // The hit can be started at any distance and regardless of the Line of Sight, then the damage will be dealt when in range and LoS
//								// WARNING: This flag is ignored if PREHIT is on!
// COMBAT_ANIM_HIT_SMOOTH		010000 // The hit animation has the same duration as the swing delay, instead of having a fixed fast duration and being idle until the delay has expired.
//								// WARNING: doesn't work with Gargoyles due to the new animation packet not accepting a custom animation duration!
// COMBAT_FIRSTHIT_INSTANT		020000 // The first hit in a fight doesn't wait for the recoil time (OSI like)
// COMBAT_NPC_BONUSDAMAGE		040000	// Npc get bonus damage from various sources such as CombatBonus, CombatBonusPercent, IncreaseDam, Anatomy, Tactics etc. See revision from 12-11-2019 for more details.
//CombatFlags=0

// If COMBAT_ARCHERYCANMOVE is not enabled, wait this much tenth of seconds (minimum=0) after the player
//  stopped moving before starting a new attack
// (Values changed between expansions. SE:2~3 / AOS:5 / pre-AOS:10)
CombatArcheryMovementDelay=10

// Damage formula to use on physical combat
// 0 = Sphere custom
// 1 = pre-AOS
// 2 = AOS
CombatDamageEra=0

// Hit Chance formula to use on physical combat
// 0 = Sphere custom	// Not compatible with Hit Chance Increase property
// 1 = pre-AOS			// Not compatible with Hit Chance Increase property
// 2 = AOS
CombatHitChanceEra=0

// Swing Speed formula to use on physical combat
// 0 = Sphere custom	// Recommended SpeedScaleFactor = 15000. Old Sphere 0.55 custom formula. Not compatible with Swing Speed Increase property, and uses DEX instead STAM
// 1 = pre-AOS			// Recommended SpeedScaleFactor = 15000. Not compatible with Swing Speed Increase property
// 2 = AOS				// Recommended SpeedScaleFactor = 40000
// 3 = SE 				// Recommended SpeedScaleFactor = 80000
// 4 = ML 				// Doesn't use SpeedScaleFactor. Only compatible with ML speed format (eg. 0.25 ~ 5.00 seconds instead 0 ~ 50), uncomment TAG.OVERRIDE.SPEED on all weapons to enable ML speed format
CombatSpeedEra=0

// Speed scale factor for weapons
SpeedScaleFactor=15000

// Parrying behaviour
// 01 = pre-SE parrying chance formula (not using the Bushido skill). Mutually exclusive with 02 flag.
// 02 = SE parrying chance formula (using also the Bushido skill). Mutually exclusive with 01 flag.
// 010 = can parry with a shield
// 020 = can parry with a one-handed weapon without a shield
// 040 = can parry with two handed weapons
// 080 =  Shield Armour value will scale according to the character's skill, otherwise only a 7% of the ARMOUR value is used. Not compatible with Combat Elemental Engine Flag
CombatParryingEra=01|010

//When enabled, display, in the tooltip, the Armor of the item as a percentage of its full armor value, the percentage is based  upon the body parts the item covers.
DisplayArmorAsPercent = 0

//When enabled, display, in the status bar the elemental (and the max elemental) resistances even if the combat flag ELEMENTAL ENGINE is disabled.
DisplayElementalResistance = 0

// Extra magic flags to control magic/magery behaviour (default:0, 0.55i compatible)
// MAGICF_NODIRCHANGE           00001	// Not rotate player when casting/targeting
// MAGICF_PRECAST               00002	// Precasting (cast spell before target prompt)
// MAGICF_IGNOREAR              00004	// Magic damage ignore ar
// MAGICF_CANHARMSELF           00008	// Magic can do damage on self
// MAGICF_STACKSTATS            00010	// Different stat spells don't cancel each other out
// MAGICF_FREEZEONCAST          00020	// No movement whilst casting
// MAGICF_SUMMONWALKCHECK       00040	// Summoned creatures should be able to walk on the target location (e.g. water creatures to be summoned on water)
// MAGICF_NOFIELDSOVERWALLS     00080	// Field spells cannot cross over blocking objects
// MAGICF_NOANIM                00100	// Auto SPELLFLAG_NO_ANIM in every spell
// MAGICF_OSIFORMULAS           00200	// Calculate spell damage and duration based on OSI formulas
// MAGICF_NOCASTFROZENHANDS     00400	// Can't cast spells if got paralyzed holding something on hands
// MAGICF_POLYMORPHSTATS	00800	// Polymorph spells give out stats based on base chars (old behaviour backwards)
// MAGICF_OVERRIDEFIELDS        01000	// Prevent cast multiple field spells on the same tile, making the new field tile remove the previous field
// MAGICF_CASTPARALYZED		02000	// Can cast even if paralyzed
// MAGICF_NOREFLECTOWN		04000	// Do not reflect own spell if the spell has already reflected from the target.
// MAGICF_DELREFLECTOWN		08000	// Remove reflection instead of damage himself when NOREFLECTOWN active if the spell reflected from another target.
//MagicFlags=0

// Max amount of each Stat gained through Polymorph spell. This affects separatelly to each stat.
MaxPolyStats=150

// Racial traits flags
// RACIALF_HUMAN_STRONGBACK		0001	// Increase carrying capacity (+60 stones of weight)
// RACIALF_HUMAN_TOUGH			0002	// Regenerate hitpoints faster (+2 Hit Point Regeneration)
// RACIALF_HUMAN_WORKHORSE		0004	// Find more resources while gathering hides, ore and lumber
// RACIALF_HUMAN_JACKOFTRADES		0008	// Skill calculations always consider 20.0 minimum ability on untrained skills
// RACIALF_ELF_NIGHTSIGHT		0010	// Permanent night sight effect
// RACIALF_ELF_DIFFTRACK		0020	// Increase difficulty to be tracked while hidden/invisible
// RACIALF_ELF_WISDOM			0040	// Permanent max mana bonus (+20 Mana Increase)
// RACIALF_GARG_FLY				0080	// Enable gargoyle fly ability (FEATURE_AOS_UPDATE_B is required to enable gargoyle ability book)
// RACIALF_GARG_BERSERK			0100	// Increase ferocity in situations of danger (15% Damage Increase + 3% Spell Damage Increase for each 20hp lost)
// RACIALF_GARG_DEADLYAIM		0200	// Throwing calculations always consider 20.0 minimum ability when untrained
// RACIALF_GARG_MYSTICINSIGHT		0400	// Mysticism calculations always consider 30.0 minimum ability when untrained
RacialFlags=0

// Reveal flags related to reveal hidden and Invisible Spell
// REVEALF_DETECTINGHIDDEN		0001	// Reveal Spell with Detecting Hidden Skill. (NOTE: Hidden characters will be always revealed by default)
// REVEALF_LOOTINGSELF			0002	// Reveal when looting self bodies (NOTE: Hidden characters will be always revealed by default).
// REVEALF_LOOTINGOTHERS		0004	// Reveal when looting bodies of other Players or NPCs (NOTE: Hidden characters will be always revealed by default).
// REVEALF_SPEAK				0008	// Reveal when speaking. (NOTE: Hidden characters will be always revealed by default)
// REVEALF_SPELLCAST			0010	// Reveal when starting to cast a Spell. (NOTE: Hidden characters will be always revealed by default)
// REVEALF_OSILIKEPERSONALSPACE	0020	// Do not reveal hidden and invisible character when a character enters on personal space.
// REVEALF_SNOOPING				0040	// Do not reveal hidden players while snooping.
// REVEALF_STEALING				0080	// Do not reveal hidden players while stealing.
// REVEALF_STEALING_SUCCESS		0100	// Reveal hidden players when stealing successfully finished.
// REVEALF_STEALING_FAIL		0200	// Reveal hidden players when stealing failed.
// Set to 04 to make it behave like 55i.
RevealFlags=01|02|04|08|010|040|080|0200

// Emote flags
// EMOTEF_ATTACKER			01 // Only show %s is attacking %s! emote to attacked character.
// EMOTEF_POISON			02 // Only show poison emotes to the affected character.
// EMOTEF_DESTROY			04 // Only show item destroyed emote to the owner of the item.
EmoteFlags=0

// Length of time (in seconds) for a char to remember his attacker (used for attacker keyword)
// Default = 300. (0 = don't forget until death.)
AttackerTimeout=300

// Length of time (in seconds) for a player to choose a target when casting (0 = no timeout)
SpellTimeout=0

// Zero point for sextant coordinates counting. Comment this line out if you are
// not using ML maps.
ZeroPoint=1323,1624,0

// How far from land i can be to take off a ship
//MaxShipPlankTeleport=18

// Enable death screen animation on classic clients (on enhanced clients this is always enabled)
PacketDeathAnimation=1

///////////////////////////////////////////////////////////////
//////// NPC/Item/Player Management
///////////////////////////////////////////////////////////////
// Distance in tiles before an NPC that's wandered too far from it's home will teleport back
LostNPCTeleport=50

// Whether PCs get a resurrection robe when they get resurrected.
NoResRobe=0

// Time for a NPC corpse to decay mins
CorpseNPCDecay=7

// Time for a player corpse to decay mins
CorpsePlayerDecay=7

// Ghosts are not able to see and hear living players and creatures (0=disabled, 1=only npcs, 2=both npcs and players)
DeadCannotSeeLiving=0

// At this Spirit Speak skill level players can understand ghosts speech instead hear 'oOOoO ooO'
MediumCanHearGhosts=1000

// Base decay time in minutes for items
DecayTimer=30

// Show [NPC] tags over chars
CharTags=0

// Show job title on vendor names
VendorTradeTitle=1

// Flip dropped items (Allow player to flip item with dupelist)
FlipDroppedItems=0

// Max amount allowed for stackable items (can't be higher than 65535)
ItemsMaxAmount=60000

// Set to 1 to allow players to take equipment from their pets' paperdoll
CanUndressPets=1

// Monsters run when scared of death
MonsterFear=0

// Monsters may fight each other
MonsterFight=0

// Percent setting of the all NPC move rate, default 100
MoveRate=100

// Do players receive sounds
GenericSounds=1

// Global vendor markup setting, used only if no other markup tag is set.
// To disable markup set it to 1 and remove any other tags present, setting it to 0 makes the shopping free.
VendorMarkup=15

// Max number of items to sell to one person at once
VendorMaxSell=255

// NPCs can walk through other NPCs
NPCShoveNPC = 0

// Cost (in gp) of each 0.1 skill trained on NPCs
NPCTrainCost=1

// Max level npc trainers can go
NPCTrainMax=420

// Percent of own ability npcs can train to
NPCTrainPercent=30

// NPC will not be addressed as "Lord" or such if this is set
NPCNoFameTitle=1

// Max level of skill trainable on dummies, archery butte ecc..
SkillPracticeMax=300

// Max skill player's will start with on skills they haven't chosen during
// character creation
MaxBaseSkill=200

// Time in seconds for hitpoint regeneration (-1 = no regen)
Regen0=40

// Time in seconds for mana regeneration (-1 = no regen)
Regen1=20

// Time in seconds for stamina regeneration (-1 = no regen)
Regen2=10

// Time in seconds for food decay (-1 = no regen)
// 60*60*24 = 1 day of real life time
Regen3=60*60*24

// Time in seconds for Hitpoints update on the item status bar.
// Only for clients 7.0.30+ and items with CAN or CANMASK & CAN_I_DAMAGEABLE
ItemHitpointsUpdate = 2

// Speech block associated to players
SpeechSelf=spk_player

// Speech block associated to pets
SpeechPet=spk_pet

// Events related to all NPCs
//EventsPet=e_your_event

// Events related to all players
//EventsPlayer=e_your_event

// Events related to all regions
//EventsRegion=e_your_event

// Events related to all items
//EventsItem=ei_your_event

// When player skills/stats goes this times more than skillclass allowed, drop
// them to skillclass level. Setting this to 0 disables the action.
OverSkillMultiply=2

// Always see hidden player with Plevel < than you. This setting give possibility to see Plevel >= than you
// GM with same plevel can see each other = 0
// GM with same plevel dont see each other = 1
// Choose a Plevel where all Plevel Over can be see. Ex: 3 mean a plevel 3 gm can see a Plevel 7 = 2-7
CanSeeSamePLevel=0

// NPC AI settings
// NPC_AI_PATH				00001	Enable advanced NPC pathfinding engine (this can significantly increase server CPU usage)
// NPC_AI_FOOD				00002	Enable basic NPC food search (objects + grass) when hungry
// NPC_AI_EXTRA				00004	Make NPCs with humanoid brain equip/unequip weapons on combat or light sources at night (triggers @NPCAction)
// NPC_AI_ALWAYSINT			00008	Make NPC_AI_PATH consider all NPCs as smart as possible to find better paths (if INT < 30, they would be too dumb to find a good path)
// NPC_AI_INTFOOD			00010	Enable advanced NPC food search (more intelligent and trusworthy) when hungry
// NPC_AI_COMBAT			00040	Make NPCs cast good spells in his friends while in combat
// NPC_AI_LOOTING			00100	Make NPCs loot nearby items and corpses
// NPC_AI_MOVEOBSTACLES		00200	Make NPCs with CAN=mt_usehands able to move items blocking its way
// NPC_AI_PERSISTENTPATH	00400	Make NPCs try to follow its target even when it is unreachable instead give up
// NPC_AI_THREAT			00800	Make NPCs attack targets that have higher threat level in combat
//NPCAI=0

///////////////////////////////////////////////////////////////
//////// Crime/Murder/Karma/Fame/Guard Settings
///////////////////////////////////////////////////////////////
// Lowest karma level a character can achieve
MinKarma=-10000

// Highest karma level a character can achieve
MaxKarma=10000

// Highest fame level a character can achieve
MaxFame=10000

// Karma when player goes from good to neutral (from -10000 to 10000)
PlayerNeutral=-2000

// Karma when player goes from neutral to evil (from -10000 to 10000)
PlayerEvil=-8000

// How many minutes are criminals flagged for (0: never mark as criminal)
CriminalTimer=3

// Chance to get flagged criminal when using Snooping skill (0% - 100%)
SnoopCriminal=100

// Set if opening a container in a trade window needs to be open using Snooping skill or not (1=true,0=false)
TradeWindowSnooping=1

// Seconds time to decay a murder count (default 8*60*60 is 8 hours)
MurderDecayTime=8*60*60

// Amount of murders before we get title
MurderMinCount=1

// Looting or carving a blue player is a crime
LootingIsaCrime=1

// Attacking is considered a crime (even without hit)
AttackingIsaCrime=1

// Flag players criminal for helping criminals?
HelpingCriminalsIsaCrime=1

// How long do guards linger about in minutes
GuardLinger=3

// Will guards kill instantly or follow normal combat rules
GuardsInstantKill=1

// Will guards attack Murderers and Criminals (1) or criminals only (0)
GuardsOnMurderers=1

// Limits the MAXHITS/MAXMANA/MAXSTAM changes
// STAT_FLAG_NORMAL     00 // MAX* status allowed (default)
// STAT_FLAG_DENYMAX    01 // MAX* denied
// STAT_FLAG_DENYMAXP   02 //             .. for players
// STAT_FLAG_DENYMAXN   04 //             .. for npcs
StatsFlags=0

// Uses the new LoS algorithm
// ADVANCEDLOS_DISABLED   00 // Disabled, use the old method
// ADVANCEDLOS_PLAYER     01 // Enabled only for players
// ADVANCEDLOS_NPC        02 // Enabled only for NPCs
AdvancedLos=0

// Default color settings for characters names (notoriety)
//ColorNotoGood=059			// blue
//ColorNotoGoodNPC=059		// blue
//ColorNotoGuildSame=03f	// green (ally)
//ColorNotoNeutral=03b2		// grey (can be attacked)
//ColorNotoCriminal=03b2	// grey (criminal)
//ColorNotoGuildWar=090		// orange (enemy guild)
//ColorNotoEvil=022			// red
//ColorNotoInvul=035		// yellow
//ColorNotoInvulGameMaster=0b	// purple
//ColorNotoDefault=03b2		// grey (if not any other)

ColorInvisItem=1000		// 0 = default item color, 01 to 04001 = custom color, 1000 = invis Grey color (Define how the invis item are see by GM)

// When changing one of these 3 settings, the color set will appear on the anim of player AND on the paperdoll.
ColorInvis=0			// 04001 = transparent color, 0 = default (Gm invisibilily)
ColorInvisSpell=0		// 04001 = transparent color, 0 = default (This one is for s_invisibility spell, this includes the invis potion.)
ColorHidden=0			// 04001 = transparent color, 0 = default

// Which notoriety flags do pets inherit from their masters? (default 0)
// Set flags to indicate which notoriety statuses a pet can inherit from its owner.
//  NotoGood        001  // blue
//  NotoGuildSame   002  // green (ally)
//  NotoNeutral     004  // grey (can be attacked)
//  NotoCriminal    008  // grey (criminal)
//  NotoGuildWar    010  // orange (enemy guild)
//  NotoEvil        020  // red
//  NotoInvul       040  // yellow
// e.g. "07a" will show pets as criminal/warring/evil/allied/invul when their master has
//      one of these statuses, regardless of the pet's true notoriety.
PetsInheritNotoriety=0

// Time until Sphere removes a character from the notoriety list of another one.
NotoTimeOut=30

///////////////////////////////////////////////////////////////
//////// Server Mechanics
///////////////////////////////////////////////////////////////
// Set the Sphere process priority at startup (improves performance especially when running in background on Windows).
// This will fail on Linux if you aren't running Sphere as root, or if root didn't set for this process the s bit (chmod +x).
// On Linux, there are better ways to permanently set an higher process priority.
//	-1 = below normal
//	0  = normal
//	1  = above normal
//	2  = high
//AutoProcessPriority=0

// Secure mode attempts to ignore errors, protect from accidently shutdowns
Secure=1

// Experimental flags
// Flags for options that affect server behaviour and which might affect compatibility
// See the revisions.txt file for more details on this
// EF_NoDiagonalCheckLOS		00000001 // Disable LOS checks on diagonal directions
// EF_DynamicBackgroundsave		00000002 // This will enable, if necessary, if a backgroundsave tick is triggered to save more than only one Sector.
// EF_ItemStacking				00000004 // Enable item stacking feature when drop items on ground
// EF_ItemStackDrop				00000008 // The item stack will drop when an item got removed from the stack
// EF_FastWalkPrevention		00000010 // Use new client fastwalk (speedhack) prevention instead old WalkBuffer/WalkRegen checks. (Not work at the moment don't use)
// EF_Intrinsic_Locals			00000020 // Disables the needing of 'local.', 'tag.', etc. Be aware of not creating variables with the same name of already-existing functions
// EF_Item_Strict_Comparison	00000040 // Don't consider log/board and leather/hide as the same resource type
// EF_AllowTelnetPacketFilter	00000200 // Enable packet filtering for telnet connections as well
// EF_Script_Profiler			00000400 // Record all functions/triggers execution time statistics (it can be viewed pressing P on console)
// EF_DamageTools				00002000 // Damage tools (and fire @damage on them) while mining or lumberjacking
// EF_UsePingServer				00008000 // Enable the experimental Ping Server (for showing pings on the server list, uses UDP port 12000)
// EF_FixCanSeeInClosedConts	00020000 // Change CANSEE to return 0 for items inside containers that a client hasn't opened
// EF_WalkCheckHeightMounted	00040000 // Unlike the client does, assume an height increased by 4 in walkchecks if the char is mounted. Enabling this may prevent mounted characters to walk under places they could before.
Experimental=0

// Option flags 
// Flags for options that affect server behaviour but not compatibility
// See the revisions.txt file for more details on this
// OF_NoDClickTarget				00000001 // Weapons won't open a target in the cursor after DClicking them for equip.
// OF_NoSmoothSailing				00000002 // Deactivate Smooth Sailing for clients >= 7.0.8.13
// OF_ScaleDamageByDurability		00000004 // Weapons/armors will lose DAM/AR effect based on it's current durability
// OF_Command_Sysmsgs				00000008 // Shows status of hearall, allshow, allmove... commands after toggling them
// OF_PetSlots						00000010 // Enable AOS pet follower slots on chars. If enabled, all players must have MAXFOLLOWER property set (default=5)
// OF_OSIMultiSight					00000020 // Only send items inside multis when the player enter on the multi area
// OF_Items_AutoName				00000040 // Auto rename potions/scrolls to match its spell name
// OF_FileCommands					00000080 // Enable the usage of FILE commands
// OF_NoItemNaming					00000100 // Disable the DEFMSG."grandmaster_mark" in crafted items
// OF_NoHouseMuteSpeech				00000200 // Players outside multis won't hear what is told inside
// OF_NoContextMenuLOS				00000400 // Disable LOS check to use context menus on chars
// OF_MapBoundarySailing			00000800 // Boats will move to the other side of the map when reach map boundary
// OF_Flood_Protection				00001000 // Prevent the server send messages to client if its the same message as the last already sent
// OF_Buffs							00002000 // Enable the buff/debuff bar on ML clients >= 5.0.2b
// OF_NoPrefix						00004000 // Don't show "a" and "an" prefix on item names
// OF_DyeType						00008000 // Allow use i_dye on all items with t_dye_vat typedef instead only on i_dye_tub itemdef
// OF_DrinkIsFood					00010000 // Typedef t_drink will increase food level like t_food
// OF_NoDClickTurn					00020000 // Don't turn the player when DClick something
// OF_NoPaperdollTradeTitle			00040000 // Don't show the trade title on the paperdoll
// OF_NoTargTurn					00080000 // Don't turn the player when targetting something
// OF_StatAllowValOverMax			00100000 // Allow stats value above their maximum value (i.e. allow hits value > maxhits).
// OF_GuardOutsideGuardedArea		00200000 // Allow guards to walk in unguarded areas, instead of being teleported back to their home point.
// OF_OWNoDropCarriedItem			00400000 // When overweighted, don't drop items on ground when moving them (or using BOUNCE) and checking if you can carry them.
// OF_AllowContainerInsideContainer	00800000 // Allow containers inside other containers even if they are heavier than the container being inserted into.
// OF_VendorStockLimit              01000000 // Limits how much of an item a vendor can buy using the value set in the TEMPLATE. Format: BUY=ID,AMOUNT
OptionFlags=08|080|0200

// Area flags
// Flags for tuning the default behavior of regions, areas and rooms
// AREAF_RoomInheritsEvents			00000001 // ROOMDEFs inherit EVENTs from the parent AREADEF (if any)
// AREAF_RoomInheritsFlags			00000002 // ROOMDEFs inherit REGION FLAGS from the parent AREADEF (if any)
// AREAF_RoomInheritsTAGs			00000004 // ROOMDEFs inherit TAGs from the parent AREADEF (if any)
AreaFlags=02

// FeatureT2A, used to control T2A expansion features ( default 03 )
// FEATURE_T2A_UPDATE           01 // Monster and Lost lands
// FEATURE_T2A_CHAT             02 // In game chat
FeatureT2A = 01|02

// FeatureLBR, used to control LBR expansion features
// FEATURE_LBR_UPDATE           01 // Lbr Monsters
// FEATURE_LBR_SOUND            02 // MP3 instead of MIDI
FeatureLBR = 0

// FeatureAOS, used to control AOS expansion features
// FEATURE_AOS_UPDATE_A         01 // AOS Monsters, Map
// FEATURE_AOS_UPDATE_B         02 // Tooltip, Fightbook, Necro/paladin on creation, Single/Six char selection screen, Skills, Newer spellbook support
// FEATURE_AOS_POPUP            04 // PopUp Menus
// FEATURE_AOS_DAMAGE           08 // Show damage values above char head when deal/receive any damage
FeatureAOS = 0

// FeatureSE, used to control SE expansion features
// FEATURE_SE_UPDATE            01 // Basic SE features
// FEATURE_SE_NINJASAM          02 // Ninja and Samurai
FeatureSE = 0

// FeatureML, used to control ML expansion features
// FEATURE_ML_UPDATE            01 // Basic ML features
FeatureML = 0

// FeatureKR, used to control KR expansion features (still not complete but usable)
// FEATURE_KR_UPDATE            01 // Basic KR features
FeatureKR = 0

// FeatureSA, used to control SA expansion features
// FEATURE_SA_UPDATE            01 // Unlocks gargoyle character creation and housing items
// FEATURE_SA_MOVEMENT          02 // Activates new movement packets (not good)
FeatureSA = 0

// FeatureTOL, used to control TOL expansion features
// FEATURE_TOL_UPDATE           01 // Basic TOL features
// FEATURE_TOL_VIRTUALGOLD      02 // Use virtual gold/platinum currency instead default 'physical' gold
FeatureTOL = 0

// FeatureExtra, used to control misc expansion features
// FEATURE_EXTRA_CRYSTAL        001 // Unlocks ML crystal/shadow items on house design
// FEATURE_EXTRA_GOTHIC         002 // Unlocks SA gothic items on house design
// FEATURE_EXTRA_RUSTIC         004 // Unlocks SA rustic items on house design
// FEATURE_EXTRA_JUNGLE         008 // Unlocks TOL jungle items on house design
// FEATURE_EXTRA_SHADOWGUARD    010 // Unlocks TOL shadowguard items on house design
// FEATURE_EXTRA_ROLEPLAYFACES  020 // Unlocks extra roleplay face styles on character creation (enhanced clients only)
FeatureExtra = 0

// In game effects to turn on and off
// Messages echoed to the server console while in debug mode
// DEBUGF_NPC_EMOTE       00001
// DEBUGF_ADVANCE_STATS   00002
// DEBUGF_EXP             00200 // experience gain/loss
// DEBUGF_LEVEL           00400 // experience level changes
// DEBUGF_SCRIPTS         00800 // debug flag for scripts
// DEBUGF_LOS             01000 // debug flag for AdvancedLOS
// DEBUGF_WALK            02000 // debug flag for new walking check stuff
// DEBUGF_PACKETS         04000 // log packets to file
// DEBUGF_NETWORK         08000 // debug flags for networking
//DebugFlags=0800

// Bit Mask of the subjects you want to log when logging is on
// LOGM_ACCOUNTS       000100 // account login/operations
// LOGM_INIT           000200 // start up messages
// LOGM_SAVE           000400 // world save
// LOGM_CLIENTS_LOG    000800 // all clients as they log in and out
// LOGM_GM_PAGE        001000 // player gm pages
// LOGM_PLAYER_SPEAK   002000 // all that the players say
// LOGM_GM_CMDS        004000 // all gm commands
// LOGM_CHEAT          008000 // possible cheat attempts
// LOGM_KILLS          010000 // player combat results
// LOGM_HTTP           020000 // http protocol operations
//  0fff00 log everything
LogMask=0fff00

// Allow rapid Buy/Sell through Buy/Sell agent
AllowBuySellAgent=0

// Minutes after the last client left the sector to put that sector to sleep (to conserve resources). 0 disables Sleep (NOT recommended).
SectorSleep=10

// Amount of items in one sector to start showing "x items too complex"
MaxSectorComplexity=1024

// Max NPC chars for a sector to prevent lag
MaxComplexity=32

// Amount of items in one tile so start showing "too many items here"
MaxItemComplexity=25

// Length of the game world minute in real world in seconds
GameMinuteLength=20

// Amount of time to keep map data cached in sec
MapCacheTime=120

// Always force a full garbage collection on save
ForceGarbageCollect=1

// Time before restarting when server appears hung (in seconds)
FreezeRestartTime=60

// Limit the number of cycles the while/for loop can proceed. Setting this to
// zero disables the limitation
MaxLoopTimes=10000

// Amount of time to call f_onserver_timer (0 disables this, default)
TimerCall=0
TimerCallUnit=0     //TimerCall is in  minute = 0 or Second = 1 (Change unit require a reboot)

// Should sphere record the time it takes to do actions like treating npcs, scripts, clients and such?
// Can be viewed by right clicking the mouse on sphere screen.
Profile=0

///////////////////////////////////////////////////////////////
//////// Magic/Effects Settings
///////////////////////////////////////////////////////////////

// Allow casting while equipped
EquippedCast=1

// Words of power for player using magic
WOPPlayer=1

// Words of power for staff using magic
WOPStaff=0

// Words of power font
//WOPFont=3

// Words of power color (0 = inherit color from char SPEECHCOLOR value)
//WOPColor=03b2

// Mana lost if magic fail/Abort
ManaLossAbort=0		// When spell is abort during casting
ManaLossFail=0		// When spell fizzle because of lacking skill
ManaLossPercent=50	// Percent of mana lost if cast fail/abort (0-100)

// NPCs can fizzle the spell when hit in combat.
NPCCanFizzleOnHit=0

//This setting determines the amount of target hitpoints (in %) at which a NPC will try to heal by spell.
NPCHealThreshold = 30

// Reagents or tithing points lost if magic fails.
ReagentLossAbort=0	// When spell is abort during casting
ReagentLossFail=0	// When spell fizzle because of lacking skill


// Magic requires reagents or tithing points.
ReagentsRequired=0

// What % of hitpoints players will resurrect with. Note, that if you set this
// too low, people with little STR will have problems resurrecting.
HitPointPercentOnRez=10

// How many % of hits will the character loose when starving. 0 disables
//HitsHungerLoss=0

// Amount of skill of lock picking needed to unlock a magically locked door
MagicUnlockDoor=900

// Teleport effect for GMs and players. Setting 0 disables the effect
TeleportEffectNPC=0376a
TeleportEffectPlayers=03728
TeleportEffectStaff=03709
TeleportSoundNPC=01fe
TeleportSoundPlayers=01fe
TeleportSoundStaff=01f3

///////////////////////////////////////////////////////////////
//////// Experience and Level system
///////////////////////////////////////////////////////////////

// Enable experience system
//ExperienceSystem=0

// Experience system settings:
//  0001    gain experience in combat
//  0002    gain experience in crafts
//  0004    allow experience to go down
//  0008    limit experience decrease by a range witheen a current level
//  0010    auto-init EXP/LEVEL for NPCs if not set in @Create
//ExperienceMode=0

// If combat experience gain is allowed, use these percents for gaining exp in
// Player versus Monster and Player versus Player combats. Value 0 disables gain.
//ExperienceKoefPVM=100
//ExperienceKoefPVP=100

// Enable levels system (as a part of experience system)
//LevelSystem=0

// Level system settings:
//  linear = 0  (each NextLevelAt exp will give a level up)
//  double = 1  (you need (NextLevelAt * (level+1)) to get a level up)
//LevelMode=1

// Amount of experience to raise to the next level
//LevelNextAt=0

///////////////////////////////////////////////////////////////
//////// Network Behaviour
///////////////////////////////////////////////////////////////
// WARNING: These are advanced settings that should not normally be changed
//          from the recommended default values!

// Disconnect inactive socket in x min
DeadSocketTime=5

// Maximum number of packets to send per tick
MaxPacketsPerTick=1000

// Number of connections a client can make before being blocked
MaxPings=15

// Maximum number of packets before lowering packet priorities (0 for no limit)
MaxQueueSize=500

// Maximum number of bytes to send per tick (also governs maximum size of outgoing packets)
MaxSizePerTick=50000

// Maximum number of bytes a client can send to the server in 10 seconds before calling f_onclient_exceed_network_quota with ARGN1=1.
// 0 = disabled. Default behavior: disconnect.
MaxSizeClientOut=80000

// Maximum number of bytes a client can receive from the server in 10 seconds before calling f_onclient_exceed_network_quota with ARGN1=2.
// 0 = disabled. Default behavior: disconnect.
MaxSizeClientIn=10000

// Time to remember previous connection history (seconds)
NetTTL=300

// Number of network threads to create in order to split the network i/o workload
//  (0 for no additional threads: run all the code on the main thread)
// WARNING: values > 0 are still experimental and in development, and WILL cause server crash/instability.
//  If Sphere crashes, this is the first setting to revert!
NetworkThreads = 0

// Priority of each network thread (valid only if NetworkThreads >= 1)
//  1 = Normal   = tick 100ms
//  2 = High     = tick 50ms
//  3 = Highest  = tick 5ms
//  4 = RealTime = tick almost instantly	
NetworkThreadPriority = 1

// Use asynchronous data sends, valid for both single and multi threaded networking
// WARNING: changing this setting at runtime may produce unexpected behaviour!
//  0 = Off
//  1 = Always on (it may not work for older clients!)
//  2 = On for 4.0.0+ game clients only
UseAsyncNetwork=0

// Prioritise outgoing packets (provides a smoother experience in crowded areas)
UsePacketPriority=0

// Enables an additional buffer for outgoing data.
UseExtraBuffer=1

// Tooltip modes
//  0 = Always send full tooltip
//  1 = Wait for client to request full tooltip
TooltipMode=1

// Time to cache tooltip data for (seconds)
TooltipCache=30

// Limit of options in each Context Menu.
ContextMenuLimit=15

///////////////////////////////////////////////////////////////
//////// Third-Party Tools Support
///////////////////////////////////////////////////////////////

// Axis / TNG
// Path where STRIP console command will strip an index of all script templates to use with Axis / TNG
//  on Windows the path format is "\foo\bar\"
//  on Linux the path format is "/foo/bar/"
StripPath=scripts/web/

// ConnectUO
// Enable or disable the response to ConnectUO pings
// If enabled, it returns: Items, Chars, Clients and Memory
CUOStatus=1

// UOGateway
// Enable or disable the response to UOGateway pings
// If enabled, it returns: Name, Age, Clients, Items, Chars and Memory
UOGStatus=1

// Add these Resource Sections to the defname list, so that they can be accessible via DEFLIST.*
[RESOURCELIST]
ITEMDEF
CHARDEF

///////////////////////////////////////////////////////////////
//////// Webpage Settings
///////////////////////////////////////////////////////////////

// Note, that you can catch error codes by creating sphere404.htm and so on
// for all HTTP error codes sphere support.

[WEBPAGE 1]
// Determines what html file is used as base for the status page
WebPageSrc=scripts/web/spherestatusbase.htm
// Determines where the status page is saved
WebPageFile=scripts/web/spherestatus.htm
// In seconds, how often the status file is updated
WebPageUpdate=60
// Required PLevel to view this page (0 = anyone, 6 = admins only)
PLevel=0

///////////////////////////////////////////////////////////////
//////// Abuse Control
///////////////////////////////////////////////////////////////

// Block these ips from the server
// 255 is a wildcard, so 255.255.255.255 disables anyone connecting.
[BlockIP]
//123.34.45.56
//123.45.56.78

///////////////////////////////////////////////////////////////
//////// Connection Information
///////////////////////////////////////////////////////////////

//First line should be the name of your shard (this is what people see when they connect)
//Second line should be the IP of your shard (this is almost always 127.0.0.1)
//Third line should be the port of your shard (this should be whatever ServPort is set to)

//Uncomment next 3 lines below this if you have a router
//First line should be a name different than your shard name above this
//Second line should be your real/external IP (www.whatismyip.com)
//Third line should be the shard port (this should be whatever ServPort is set to)
[SERVERS]
MyShard
127.0.0.1
2593

//External
//my.ip.goes.here
//2593

[EOF]
