• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

I can not find out the version of TFS

Gubailovo

Well-Known Member
Joined
Dec 19, 2013
Messages
407
Solutions
2
Reaction score
62
I use a custom server, and there is no mention of the version of TFS.
Can you help me determine the version? By scripts or by some files.
7.6
 
[QUOTE = "Злой Панкер, должность: 2592273, участник: 43598"]
Бьюсь об заклад, что это даже не TFS :(, опубликовать скриншот загрузки консоли и опубликовать config.lua в pastebin.com
[/ QUOTE]
3.png
Lua:
---------------------------- Configuration ------------------------------

-- datadir
datadir = "data/"

-- map
-- sets what map to load, if sql, determines the sql map
map = "data/world/map.otbm"
mapstore = "data/world/map-mapstore.xml"
housestore = "data/world/map-housestore.xml"
houserentperiod = "monthly"

-- sets what map to load
-- map =

-- OTBM for binary, SQL for SQL map, XML for OTX maps
mapkind = "OTBM"

-- SQL for acc/player info from SQL, XML for acc/player info from XML
sourcedata = "SQL"

-- bans
banIdentifier = "data/bans.xml"

-- the message the player gets when he logs in
loginmsg = "Welcome to Darkonia RPG."

-- Tips
Mess_1 = "Любую информацию по игре можно найти в нашей библиотеке: http://www.chronicles.darkoniarpg.ru/"
Mess_2 = "Последнее обновление от 27 ноября 2006 года, о нем можно прочитать в новостях : http://darkoniarpg.ru/home.php?page=news"
Mess_3 = "Последний багфикс от 13.11.2006 о нем можно прочитать в новостях : http://darkoniarpg.ru/phpbb/viewtopic.php?t=1095"

-- the port otserv listens on
port = "7171"

-- name of our server
servername = "Darkonia RPG"

-- name of the owner of our server
ownername = "Torian Kel"

-- email of the owner of our server
owneremail = "[email protected]"

-- the url for more server info
url = "http://darkoniarpg.ru/"

-- the location of the server
location = "Russia"

-- the ip the server should redirect too
ip = "192.168.43.12"

-- The messagebox you sometimes get before you choose characters
motd = "Welcome to the Darkonia RPG!"
motdnum="0"

-- use md5 passwords for accounts, yes/no
md5passwords = "no"

-- world type. options: pvp, no-pvp, pvp-enforced
worldtype = "pvp"

-- max number of players allowed
maxplayers = "500"

-- exhausted time in ms (1000 = 1sec)
exhausted = 1000

-- exhaustion time for healing spells (1000 = 1sec)
exhaustedheal = 1000

-- how many ms to add if the player is already exhausted and tries to cast a spell (1000 = 1sec)
exhaustedadd = 500

-- how long does the player has to stay out of fight to get pz unlocked in ms (1000 = 1sec)
pzlocked = 30*1000

-- allow multiple logins of the same char
allowclones = 0

-- vocation names
vocations = {"маг", "друид", "рейнджер", "рыцарь", "лич", "мастер заклинаний", "оборотень", "жрец", "жулик", "меткий стрелок", "вампир", "паладин"}
promoted_vocations = {"мастер магии", "старший друид", "королевский рейнджер", "элитный рыцарь", "повелитель мертвых", "мастер рун", "меняющийся", "верховный жрец", "вор", "снайпер", "носферату", "чемпион"}

--- SQL part
sql_host = "localhost"
sql_user = "root"
sql_pass = ""
sql_db   = "darkonia_db2"


--- SQL MAP part
sqlmap = "test_map"
map_host = "localhost"
map_user = "root"
map_pass = ""
map_db   = ""

---------------------------- Save configuration ------------------------------
-- how often do server saves it's state complete (0 = off, 5 = 5min, 60 = hour)
serversave = 180

-------------------------Darkonia RPG configuration-----------------------
--referal system
refpercent = 10
referercoins = 10000

--
lootkoeff = 1

----
buy_sc = 2000000
sell_sc = 3000000

-- resetlvl
-- Reset the player when he gots this lvl(Max lvl is 634)
resetlvl = "630"

-- name of your world (seen on the character list when logging in)
worldname = "Darkonia RPG"

-- do you want to enable cap system (yes/no)
capsystem = "yes"

-- do you want players to learn spells before they can use them (yes/no)
learnspells = "yes"

-- how many summons player can have
maxsummons = 2

-- maximum number of items on a house tile (including those in containers)
maxhousetileitems = 50

-- do you want to give summons for all vocations (yes/no)
summonsallvoc = "no"

-- chance of losing a spear when shot (0 - none lost, 100000 - all lost)
spearlosechance = 5000

-- anti-afk - maximum idle time to kick player (1 = 1min)
kicktime = 10

--Mc = 0 You cant use Mc. Mc = 1 You can use MC.
mc = "0"

--Уровень для чата
chatlevel = 8

--Разделение экспы
p_distance = 30
p_height = 1
p_formula = 1

-- максимум имен в деадлисте

maxdeathentries = 50

---------------------- Soul System configuration ----------------------
-- how many soul pointss you gain when kill a monster
soulup = "2"

-------------------------House configuration---------------------------
-- house price for 1 sqm
priceforsqm = 6000

-- max houses for player
maxhouses = 2

-- Do you want to enable !buyhouse(yes/no)
buyhouseable = "no"
-------------------------Deaths configuration---------------------------
-- how much % of exp/skills/stuff do you lose when dying if you dont have blessings and you dont have promotion
diepercent = 10
diebless0 = 10

-- how much % of exp/skills/stuff do you lose when dying if you dont have blessings and you have promotion
diebless0promo = 7

-- how much % of exp/skills/stuff do you lose when dying if you have 1 blessing and you dont have promotion
diebless1 = 9

-- how much % of exp/skills/stuff do you lose when dying if you have 2 blessings and you dont have promotion
diebless2 = 8

-- how much % of exp/skills/stuff do you lose when dying if you have 3 blessings and you dont have promotion
diebless3 = 7

-- how much % of exp/skills/stuff do you lose when dying if you have 4 blessings and you dont have promotion
diebless4 = 6

-- how much % of exp/skills/stuff do you lose when dying if you have 5 blessings and you dont have promotion
diebless5 = 5

-- how much % of exp/skills/stuff do you lose when dying if you have 1 blessing and you have promotion
diebless1promo = 6

-- how much % of exp/skills/stuff do you lose when dying if you have 2 blessings and you have promotion
diebless2promo = 5

-- how much % of exp/skills/stuff do you lose when dying if you have 3 blessings and you have promotion
diebless3promo = 4

-- how much % of exp/skills/stuff do you lose when dying if you have 4 blessings and you have promotion
diebless4promo = 3

-- how much % of exp/skills/stuff do you lose when dying if you have 5 blessings and you have promotion
diebless5promo = 2

--------------------------- Multipliers and gains ------------------------------

-- mana consumend by {snakebite, moonlight, volcanic, quagmire, tempest} rod
rodmana = {"2", "2", "3", "4", "5"}

-- mana consumed by wand of {vortex, dragonbreath, plague, cosmic energy, inferno}
wandmana = {"2", "2", "3", "4", "5"}

-- shooting range of {snakebite, moonlight, volcanic, quagmire, tempest} rod
rodrange = {"4", "3", "3", "3", "3"}

-- shooting range of  wand of {vortex, dragonbreath, plague, cosmic energy, inferno}
wandrange = {"4", "3", "3", "3", "3"}

-- experience multiplier (how much faster you got exp from monsters)
expmul = 1

-- experience multiplier for pvp-enforced (how much faster you got exp from players)
expmulpvp = 2

-- skill multipliers: 1 - rl tibia, 10 - ten times faster etc. {no-voc, sorcerer, druid, paladin, knight}
weaponmul = {"1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"}
distmul = {"1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"}
shieldmul = {"1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"}
manamul = {"1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"}

-- how much points of life,mana,cap do you get when advancing {no-voc, sorcerer, druid, paladin, knight}
capgain = {"10", "10", "10", "20", "25", "15", "15", "15", "15", "25", "25", "30", "30"}
managain = {"5", "30", "30", "15", "5", "40", "40", "40", "40", "20", "20", "10", "10"}
hpgain = {"5", "5", "5", "10", "15", "10", "10", "10", "10", "15", "15", "25", "25"}

-- how much faster do you recovery life,mana after eating food (1 - rl tibia)
healthtickmul = 2
manatickmul = 2

-- damage of burst arrows blast
-- default is from (1*lvl+5*mlvl)*0.24 to (1*lvl+5*mlvl)*0.55
burstarrowdmg = {"1.0", "5.0", "0.24", "0.55"}

-- How long work the utana vid in seconds
utanavidtime = 3*60+20

--How many people can have in the vip list
maxviplist = "50"

--Distance away from spawn to remove a monster - The Chaos
dist = "40"

-- How many poison hits from the poison arrow
poisonarrowhits = 5

-- Max poison hit damage from the poison arrow
poisonarrowdamage = 10

-- Minimun level for player can yell
minlvltoyell = 3

-- Muted System by Rex
mutedsystem = "yes"
mutedtime = "20"

-- How many % increase magic damage when u have blue robe?
bluerobe = 15

--How many Hp/Mana you recover while Sleeping per second (60 seconds = [life +1 and mana +1])
bedregain = 10

-- how much % of {exp, mana, skill, eq, bp} do you lose when dying
diepercent = {"7", "7", "7", "7", "100"}

-- speed of attack in seconds (no-voc, sorc, druid, pally, knight)
speed = {"2.0", "1.5", "1.5", "1.1", "0.9", "1.7", "1.7", "1.7", "1.7", "0.7", "0.7", "0.5", "0.7"}

RoHHealth = 5
RoHMana = 5
LifeRingHealth = 5
LifeRingMana = 5


-------------------------------- Skull system ----------------------------------
-- how many unjustified kills to get a red skull
redunjust = 3

-- how many unjustified kills to get banned
banunjust = 6

-- how long do you have white skull after attacking player (1 = 1min)
hittime = 1

-- how long do you have white skull after killing player (1 = 1min)
whitetime = 15

-- how long do you have red skull (1 = 1min)
redtime = 6*60

-- how long do you have to wait to lose 1 unjustified kill (1 = 1min)
fragtime = 12*60
------------------------------ GM System--------------------------------
-- access to ignore damage, exhaustion, cap limit and be ignored by monsters
accessprotect = 2

-- access to walk into houses and open house doors
accesshouse = 3

-- access to broadcast messages and talk in colors (#c blabla - in public channels)
accesstalk = 2

-- access to move distant items from/to distant locations
accessremote = 3

-- access to see id and position of the item you are looking at
accesslook = 2

-- access for report bugs with Ctrl+Z
accessbugreport = 1

-- access for talk orange in Help Channel
accessorange = 1

-- access for use ban window(aka ctrl+y)
accessctrly = 2

-- access for answer reports with Ctrl+R
accessreport = 2

- только гейммастер может использовать mc систему голени?
antigmmc = "да"

- Gamemaster не может атаковать игроков в ближнем бою или используя руны? Да нет
gmprotected = "да"
---------------------------- Премиум-конфигурация -------------------- ----------
- Вы хотите, чтобы премиум-игроки ждали в очереди, как и другие? (да нет)
queuepremmy = "нет"



- Сколько премьерных дней игрок получает, когда говорят!
manypremmydays = 1

- Сколько игрок платит, когда говорят! Buypremmy
prricepremmy = 1000000000



- Сколько дней игрок потерял, когда говорят / пол (для смены пола)
sexpremmydays = 5

- Max Depot предметов для премиум аккаунтов
maxdepotpremmy = 2000

- Max Depot предметов для бесплатных аккаунтов
maxdepotfree = 1000



[/КОД]
 
maybe someone will say that this is in the lib?
Lua:
--##################################################################################
--сторейджи
EXHAUST_ONUSE            = 6500
EXHAUST_DARKON_HELM        = 6504
EXHAUST_QCONTROL        = 6502

--квестовые сторейджи
QUEST_WAVE                = 2016
QUEST_11_NATURE_FORCE    = 2011

--c 5000 до 6000 - квестовые сторейджи, не использовать
QUEST_ARC1_CURRENT        = 5001
QUEST_ARC1_Q_HINT        = 5002
QUEST_CURRENT_Q_STAGE    = 5003

--сторейдж сокровищ
TREASURE_CHANCE            = 7500
TREASURE_TILE_1            = 7501
TREASURE_TILE_2            = 7502
TREASURE_TILE_3            = 7503
TREASURE_TILE_4            = 7504
TREASURE_TILE_5            = 7505
TREASURE_TILE_6            = 7506
TREASURE_TILE_7            = 7507
TREASURE_TILE_8            = 7508
TREASURE_TILE_9            = 7509
TREASURE_TILE_10        = 7510
TREASURE_TMP            = 7511

-- сторейджи для стройки
H_TILES_COUNT            = 7512
H_TILES_NOOWNER            = 7513
H_TILES_NOFIX            = 7514

NM_ME_DRAW_BLOOD = 0
NM_ME_LOOSE_ENERGY = 1
NM_ME_PUFF = 2
NM_ME_BLOCKHIT = 3
NM_ME_EXPLOSION_AREA = 4
NM_ME_EXPLOSION_DAMAGE = 5
NM_ME_FIRE_AREA = 6
NM_ME_YELLOW_RINGS = 7
NM_ME_POISEN_RINGS = 8
NM_ME_HIT_AREA = 9
NM_ME_ENERGY_AREA = 10
NM_ME_ENERGY_DAMAGE = 11
NM_ME_MAGIC_ENERGIE = 12
NM_ME_MAGIC_BLOOD = 13
NM_ME_MAGIC_POISEN = 14
NM_ME_HITBY_FIRE = 15
NM_ME_POISEN = 16
NM_ME_MORT_AREA = 17
NM_ME_SOUND = 18
NM_ME_SOUND_GREEN = 18
NM_ME_SOUND_RED = 19
NM_ME_POISONCLOUD = 20
NM_ME_SOUND_YELLOW = 21
NM_ME_SOUND_PURPLE = 22
NM_ME_SOUND_BLUE = 23
--NM_ME_BOMB = 24 
NM_ME_BOMB = 25
NM_ME_ICE_ENERGY = 26
NM_ME_SMILE = 27               
NM_ME_SMILE_ANGEL = 28
NM_ME_SMILE_TONGUE = 29
NM_ME_SMILE_EVIL = 30                 
NM_ME_BUBBLES = 31
NM_ME_WAV = 32
NM_ME_DICE = 33
NM_ME_DARK_STAR = 34
NM_ME_GRAY_STAR = 35
NM_ME_HEAD_BOMB = 36
NM_ME_CROSS = 37
NM_ME_VORTEX = 38
NM_ME_QUERY = 39
NM_ME_FIRE_STAR = 40
NM_ME_HYPNOSIS = 41
NM_ME_FIRE_BOWL = 42
NM_ME_CLOVER = 43
NM_ME_KEY = 44
NM_ME_BOOK = 45
NM_ME_OPEN_BOOK = 46
NM_ME_COMPASS = 47
NM_ME_HEAD_BLOOD = 48
NM_ME_THUNDERCLOUD = 49
NM_ME_BAT = 50
--NM_ME_BAT = 51
NM_ME_DIGGING = 52
--NM_ME_STARS = 53
--NM_ME_ICE = 54
NM_ME_HEARTS = 55
--NM_ME_EXPLOSION_AREA = 56
NM_ME_SCULL = 57
NM_ME_FIRESCULL = 58
NM_ME_OTHER_SCULL = 59
--NM_ME_BIG_ICE_ENERGY = 60
NM_ME_BIG_ICE_ENERGY = 61
NM_ME_SHIELDS = 62
NM_ME_ENERGY = 10
-- only for internal use, dont send to client
NM_ME_NONE = 255

NM_ANI_NONE = 0
NM_ANI_OLDBOLT = 1
NM_ANI_ARROW = 2
NM_ANI_FIRE = 3
NM_ANI_INFERNAL_BOLT = 4
NM_ANI_POISON_ARROW = 5
NM_ANI_BURST_ARROW = 6
NM_ANI_THROWING_STAR = 7
NM_ANI_THROWING_KNIFE = 8
NM_ANI_SMALL_STONE = 9
NM_ANI_SUDDENDEATH = 10
NM_ANI_LARGEROCK = 11
NM_ANI_SNOWBALL = 12
NM_ANI_POISON = 13
NM_ANI_HOLY = 14              --NM_ANI_POISON
NM_ANI_ENERGY = 15
NM_ANI_ICE_ENERGY = 16
NM_ANI_ICICLE = 17
NM_ANI_BOLT = 18
NM_ANI_POWER_BOLT = 19
NM_ANI_WAVE = 20             --NM_ANI_BOLT

GREEN        = 30
RED       = 180
DARK_BLUE = 2
LIGHT_BLUE = 71
BLACK_WHITE = 86
ORANGE = 193
ENERGY    = 35
FIRE      = 198
GREY      = 86
BLUE      = -246
PURPLE    = 190
YELLOW    = 79
BLACK     = 255

ATTACK_NONE          = 0
ATTACK_ENERGY        = 1
ATTACK_ICE             = 2
ATTACK_FIRE          = 3
ATTACK_PHYSICAL      = 4
ATTACK_EARTH        = 5
ATTACK_PARALYZE      = 6
ATTACK_DEATH         = 7
ATTACK_LIFEDRAIN     = 8
ATTACK_MANADRAIN     = 9
ATTACK_HOLY          = 10

PROFA_WERWOLF        = 7
PROFA_MARKSMAN        = 10
PROFA_VAMPIRE        = 11

FLUID_WATER            = 1
FLUID_BLOOD            = 2
FLUID_BEER            = 3
FLUID_SLIME            = 4
FLUID_LEMONADE        = 5
FLUID_MILK            = 6
FLUID_MANA            = 7
FLUID_HEALTH        = 10
FLUID_OIL            = 11
FLUID_URINE            = 13
FLUID_WINE            = 15
FLUID_MUD            = 19
FLUID_HOTWATER        = 26
FLUID_DIRTWATER        = 28
FLUID_REPAIR1        = 29
FLUID_REPAIR2        = 30
FLUID_REPAIR5        = 31
FLUID_REPAIR10        = 32
FLUID_SHARPOIL        = 33
FLUID_FIREOIL        = 34
FLUID_CLEANOIL        = 35

CRAFT_MINING        = 0
CRAFT_GUNSMITH        = 1
CRAFT_ALCHEMY        = 2
CRAFT_LOGMAN        = 3
CRAFT_ARMORSMITH    = 4
CRAFT_GOLDSMITH        = 5
CRAFT_COOKERY        = 6
CRAFT_BALLISTICS    = 7
CRAFT_BUILDER        = 8
CRAFT_FARMER        = 9
CRAFT_HUNTER        = 10

SKILL_FIRST         = 0
SKILL_FIST             = SKILL_FIRST
SKILL_CLUB             = 1
SKILL_SWORD         = 2
SKILL_AXE             = 3
SKILL_DIST             = 4
SKILL_SHIELD         = 5
SKILL_FISH             = 6
SKILL_LAST             = SKILL_FISH

SLOT_WHEREEVER         = 0
SLOT_FIRST             = 1
SLOT_HEAD             = SLOT_FIRST
SLOT_NECKLACE         = 2
SLOT_BACKPACK         = 3
SLOT_ARMOR             = 4
SLOT_RIGHT             = 5
SLOT_LEFT             = 6
SLOT_LEGS             = 7
SLOT_FEET             = 8
SLOT_RING             = 9
SLOT_AMMO             = 10
SLOT_DEPOT             = 11
SLOT_LAST             = SLOT_DEPOT

MSG_STATUS_WARNING             = 18 --Red message in game window and in the console
MSG_EVENT_ADVANCE             = 19 --White message in game window and in the console
MSG_EVENT_DEFAULT             = 20 --White message at the bottom of the game window and in the console
MSG_STATUS_DEFAULT             = 21 --White message at the bottom of the game window and in the console
MSG_INFO_DESCR                 = 22 --Green message in game window and in the console
MSG_STATUS_SMALL             = 23 --White message at the bottom of the game window"
MSG_STATUS_CONSOLE_BLUE     = 24 --Blue message in the console
MSG_STATUS_CONSOLE_RED         = 25 --Red message in the console

ID_MASTER_AMU         = 6528
ID_TOOLS_RING        = 6921
ID_NOTE_IN_BOTTLE    = 2241
ID_MAP_PART_1        = 6403
ID_MAP_PART_2        = 6404
ID_MAP_PART_3        = 6405
ID_TREASURE_MAP        = 1957
ID_WOODEN_SHOVEL    = 7222
ID_TREASURE_CHEST    = 8339
ID_BIG_RUBIN        = 2156
ID_BIG_EMERALD        = 2155
ID_DARKON_HELM        = 2342
ID_DARKON_HELM_S    = 2343
ID_AMMO_BULLET         = 8332
ID_AMMO_STONE         = 1294
ID_BUILD_BOX_INT    = 5086
ID_BUILD_BOX_WAL    = 5087
ID_BUILD_BOX_FLR    = 5088
ID_ANVIL             = 2555

MAX_SHARP = 10

-- проверка завершенности контура дома
-- tiles_count = 0

function checkHouseOutline(cid, startpos)
    --чекаем тайлы, если тайлов больше 400 - дом слишком большой или у него нет одной из стен
    checkTile(cid, startpos)
    
    tiles_count = getPlayerStorageValue(cid, H_TILES_COUNT)
    
    if tiles_count > 400 then
        setPlayerStorageValue(cid, H_TILES_COUNT, 0)
        return 1
    end
    
    --проверяем кому принадлежат стены, если хоть одна стена не принадлежит игроку - заливать этот участок нельзя
    if getPlayerStorageValue(cid, H_TILES_NOOWNER) == 1 then
        setPlayerStorageValue(cid, H_TILES_NOOWNER, 0)
        return 2
    end
    
    if getPlayerStorageValue(cid, H_TILES_NOFIX) == 1 then
        setPlayerStorageValue(cid, H_TILES_NOFIX, 0)
        return 3
    end
    
    --проверяем закреплены ли стены
    
    setPlayerStorageValue(cid, H_TILES_COUNT, 0)
    return 0
end

function checkTile(cid, tilepos)
    tileitem = getThingfromPos(tilepos)
    tiles_count = getPlayerStorageValue(cid, H_TILES_COUNT)
    
    if tiles_count > 400 then
        return false
    end
    
    if isWall(tileitem.itemid) then -- (было !isWall)
        tiles_count = tiles_count + 1
        setPlayerStorageValue(cid, H_TILES_COUNT, tiles_count)
        
        pos = tilepos
        
        pos.x = pos.x + 1
        checkTile(pos)
        
        pos.x = pos.x - 1
        checkTile(pos)
        
        pos.y = pos.y + 1
        checkTile(pos)
        
        pos.y = pos.y - 1
        checkTile(pos)
    else
        if isItemOwner(cid, tileitem.uid) ~= 1 then
            setPlayerStorageValue(cid, H_TILES_NOOWNER, 1)
        end
        
        if doGetItemActionId(tileitem.uid) == 2001 then
            setPlayerStorageValue(cid, H_TILES_NOFIX, 1)
        end
    end
    
    return true
end

-- Recursive 4-way floodfill, crashes if recursion stack is full
-- void floodFill4(int x, int y, int newColor, int oldColor)
-- {
  -- if(x >= 0 && x < w && y >= 0 && y < h && screenBuffer[x][y] == oldColor && screenBuffer[x][y] != newColor)
  -- {
    -- screenBuffer[x][y] = newColor; //set color before starting recursion
    
    -- floodFill4(x + 1, y,   newColor, oldColor);
    -- floodFill4(x - 1, y,   newColor, oldColor);
    -- floodFill4(x,   y + 1, newColor, oldColor);
    -- floodFill4(x,   y - 1, newColor, oldColor);
  -- }   
-- }

-- заливка контура дома тайлом
-- для дополнительной защиты от невнимательности добавляем ограничение в тайлах
function fillGroundTiles(cid, startpos, groundid)
    fillTile(cid, startpos, groundid)
    
    tiles_count = getPlayerStorageValue(cid, H_TILES_COUNT)
    
    if tiles_count > 400 then
        setPlayerStorageValue(cid, H_TILES_COUNT, 0)
        return false
    end
    
    setPlayerStorageValue(cid, H_TILES_COUNT, 0)
    return true
end

function fillTile(cid, pos, groundid)
    tileitem = getThingfromPos(pos)
    tiles_count = getPlayerStorageValue(cid, H_TILES_COUNT)
    
    if tiles_count > 400 then
        return false
    end

    if isWall(tileitem.itemid) and tileitem.itemid ~= groundid then -- (было !isWall)
        doTransformItem(tileitem.uid, groundid)
        doPlaceHousePart(cid, itemid)
        
        tiles_count = tiles_count + 1
        setPlayerStorageValue(cid, H_TILES_COUNT, tiles_count)
        
        newpos = pos
        
        newpos.x = newpos.x + 1
        fillTile(pos, groundid)
        
        newpos.x = newpos.x - 1
        fillTile(pos, groundid)
        
        newpos.y = newpos.y + 1
        fillTile(pos, groundid)
        
        newpos.y = newpos.y - 1
        fillTile(pos, groundid)
    end
    
    return true
end

-- стройка - известные типы стен/дверей
-- если понадобится - разрелить на отдельные функции isWall, isDoor, isWindow
function isInterior(itemid)
    if itemid >= 2601 and itemid <= 2605 then
        return true
    elseif itemid >= 2610 and itemid <= 2623 then
        return true
    elseif itemid >= 1481 and itemid <= 1486 then
        return true
    elseif itemid >= 1448 and itemid <= 1459 then
        return true
    elseif itemid >= 1776 and itemid <= 1793 then
        return true
    elseif itemid >= 1771 and itemid <= 1773 then
        return true
    elseif itemid >= 1754 and itemid <= 1769 then
        return true
    elseif itemid >= 1718 and itemid <= 1723 then
        return true
    elseif itemid >= 1694 and itemid <= 1713 then
        return true
    elseif itemid >= 1620 and itemid <= 1645 then
        return true
    elseif itemid >= 1602 and itemid <= 1613 then
        return true
    elseif itemid >= 3943 and itemid <= 3950 then
        return true
    elseif itemid >= 2037 and itemid <= 2069 then
        return true
    elseif itemid >= 1809 and itemid <= 1844 then
        return true
    elseif itemid >= 1873 and itemid <= 1876 then
        return true
    elseif itemid >= 1882 and itemid <= 1899 then
        return true
    elseif itemid >= 3689 and itemid <= 3710 then
        return true
    elseif itemid >= 3737 and itemid <= 3742 then
        return true
    elseif itemid >= 3822 and itemid <= 3847 then
        return true
    elseif itemid >= 3867 and itemid <= 3870 then
        return true
    elseif itemid >= 5016 and itemid <= 5019 then
        return true
    elseif itemid >= 5317 and itemid <= 5319 then
        return true
    elseif itemid >= 5544 and itemid <= 5547 then
        return true
    elseif itemid >= 5598 and itemid <= 5600 then
        return true
    elseif itemid >= 5612 and itemid <= 5619 then
        return true
    elseif itemid >= 5718 and itemid <= 5721 then
        return true
    elseif itemid == 2334 or itemid == 2555 or itemid == 1444 or itemid == 1445 or itemid == 1618 or itemid == 1617 or itemid == 5020 or itemid == 5021 or itemid == 3898 or itemid == 3899 or itemid == 1514 or itemid == 1515 or itemid == 1549 or itemid == 1550 or itemid == 463 or itemid == 1846 or itemid == 1847 or itemid == 1846 or itemid == 1847 or itemid == 1849 or itemid == 1850 or itemid == 1855 or itemid == 1856 or itemid == 1858 or itemid == 1859 or itemid == 1861 or itemid == 1862 or itemid == 1864 or itemid == 1865 or itemid == 1867 or itemid == 1868 or itemid == 1870 or itemid == 1871 or itemid == 1878 or itemid == 1879 or itemid == 3766 or itemid == 3896 or itemid == 3897 or itemid == 4859 or itemid == 4996 or itemid == 5074 or itemid == 5075 or itemid == 5309 or itemid == 5310 or itemid == 5321 or itemid == 5322 or itemid == 5338 or itemid == 5339 or itemid == 5342 or itemid == 5348 or itemid == 5349 or itemid == 5369 or itemid == 5370 or itemid == 5375 or itemid == 5376 or itemid == 5396 or itemid == 5397 or itemid == 5461 or itemid == 5465 or itemid == 5466 or itemid == 5488 or itemid == 5489 or itemid == 5490 or itemid == 5505 or itemid == 5517 or itemid == 5561 or itemid == 5562 or itemid == 5593 or itemid == 5594 or itemid == 5674 or itemid == 5715 or itemid == 8392 or itemid == 8393 then
        return 1
    end
    
    return false
end

function isWall(itemid)
    if itemid >= 1025 and itemid <= 1071 then
        return true
    elseif itemid >= 1081 and itemid <= 1119 then
        return true
    elseif itemid >= 1128 and itemid <= 1157 then
        return true
    elseif itemid >= 1164 and itemid <= 1204 then
        return true
    elseif itemid >= 1209 and itemid <= 1214 then
        return true
    elseif itemid >= 1219 and itemid <= 1276 then
        return true
    elseif itemid >= 1524 and itemid <= 1547 then
        return true
    elseif itemid >= 1562 and itemid <= 1601 then
        return true
    elseif itemid >= 3361 and itemid <= 3392 then
        return true
    elseif itemid >= 3397 and itemid <= 3438 then
        return true
    elseif itemid >= 3447 and itemid <= 3467 then
        return true
    elseif itemid >= 3469 and itemid <= 3471 then
        return true
    elseif itemid >= 3473 and itemid <= 3475 then
        return true
    elseif itemid >= 3480 and itemid <= 3503 then
        return true
    elseif itemid >= 3508 and itemid <= 3552 then
        return true
    elseif itemid >= 3792 and itemid <= 3801 then
        return true
    elseif itemid >= 5009 and itemid <= 5013 then
        return true
    elseif itemid >= 5071 and itemid <= 5073 then
        return true
    elseif itemid >= 5312 and itemid <= 5316 then
        return true
    elseif itemid >= 5355 and itemid <= 5358 then
        return true
    elseif itemid >= 5365 and itemid <= 5368 then
        return true
    elseif itemid >= 5476 and itemid <= 5479 then
        return true
    end
    
    return false
end

function isFloor(itemid)
    if itemid >= 405 and itemid <= 407 then
        return 1
    elseif itemid >= 412 and itemid <= 422 then
        return 1
    elseif itemid >= 424 and itemid <= 426 then
        return 1
    elseif itemid >= 446 and itemid <= 458 then
        return 1
    elseif itemid >= 777 and itemid <= 790 then
        return 1
    elseif itemid >= 965 and itemid <= 1024 then
        return 1
    elseif itemid >= 3152 and itemid <= 3217 then
        return 1
    elseif itemid >= 5651 and itemid <= 5660 then
        return 1
    elseif itemid == 431 or itemid == 465 or itemid == 467 or itemid == 1284 or itemid == 3139 or itemid == 5102 or itemid == 5105 or itemid == 5121 or itemid == 5170 or itemid == 5242 or itemid == 5247 or itemid == 5272 or itemid == 5275 or itemid == 5285 or itemid == 5395 or itemid == 5564 or itemid == 5630 or itemid == 5646 or itemid == 5647 or itemid == 5649 or itemid == 5670 or itemid == 5671 then
        return 1
    end
end

function isRoof(itemid)
    if itemid >= 926 and itemid <= 958 then
        return 1
    elseif itemid >= 5957 and itemid <= 5960 then
        return 1
    elseif itemid == 920 or itemid == 465 or itemid == 467 or itemid == 5942 or itemid == 5943 or itemid == 3348  then
        return 1
    end
end

-- Апгрейды оружия, проверка на тип
function isMelee(itemid)
    if itemid >= 2376 and itemid <= 2388 then
        return 1
    elseif itemid >= 2376 and itemid <= 2388 then
        return 1
    elseif itemid >= 2390 and itemid <= 2398 then
        return 1
    elseif itemid >= 2400 and itemid <= 2402 then
        return 1
    elseif itemid >= 2404 and itemid <= 2409 then
        return 1
    elseif itemid >= 2411 and itemid <= 2413 then
        return 1
    elseif itemid >= 2415 and itemid <= 2424 then
        return 1
    elseif itemid >= 2426 and itemid <= 2432 then
        return 1
    elseif itemid >= 2434 and itemid <= 2435 then
        return 1
    elseif itemid >= 2437 and itemid <= 2452 then
        return 1
    elseif itemid == 2454 then
        return 1
    elseif itemid >= 3962 and itemid <= 3963 then
        return 1
    elseif itemid == 5327 or itemid == 2321 or itemid == 4846 or itemid == 5091 or itemid == 5095 or itemid == 5104 then
        return 1
    elseif itemid >= 5112 and itemid <= 5119 then
        return 1
    elseif itemid == 5122 or itemid == 5124 then
        return 1
    elseif itemid >= 5126 and itemid <= 5128 then
        return 1
    elseif itemid == 5134 or itemid == 5140 or itemid == 5149 or itemid == 5150 or itemid == 5156 or itemid == 5157 or itemid == 5160 or itemid == 5164 or itemid == 5165 or itemid == 5175 or itemid == 5180 or itemid == 5187 or itemid == 5188 or itemid == 5192 or itemid == 5193 or itemid == 5200 or itemid == 5204 or itemid == 5205 or itemid == 5220 or itemid == 5221 or itemid == 5232 or itemid == 5233 or itemid == 5240 or itemid == 5250 or itemid == 5252 or itemid == 5254 or itemid == 5261 or itemid == 5268 or itemid == 5270 or itemid == 5271 or itemid == 5274 or itemid == 5276 or itemid == 5288 or itemid == 5296 or itemid == 5308 or itemid == 5403 then
        return 1
    elseif itemid == 5404 or itemid == 5408 or itemid == 5453 or itemid == 5460 or itemid == 5493 or itemid == 5550 or itemid == 5596 or itemid == 5597 or itemid == 5643 or itemid == 5645 or itemid == 5692 or itemid == 5716 or itemid == 5717 or itemid == 5976 or itemid == 6021 or itemid == 6076 or itemid == 6084 or itemid == 6085 or itemid == 6171 or itemid == 6438 or itemid == 6456 or itemid == 7080 or itemid == 7457 or itemid == 7612 or itemid == 7869 or itemid == 7882 or itemid == 7884 or itemid == 7885 or itemid == 8104 or itemid == 8119 or itemid == 8163 or itemid == 8229 or itemid == 8240 or itemid == 8241 or itemid == 8260 or itemid == 8261 or itemid == 8263 or itemid == 8320 then
        return 1
    elseif itemid >= 5169 and itemid <= 5172 then
        return 1
    elseif itemid >= 5183 and itemid <= 5185 then
        return 1
    elseif itemid >= 5214 and itemid <= 5217 then
        return 1
    elseif itemid >= 6087 and itemid <= 6089 then
        return 1
    elseif itemid >= 6091 and itemid <= 6093 then
        return 1
    elseif itemid >= 6104 and itemid <= 6108 then
        return 1
    elseif itemid >= 6119 and itemid <= 6122 then
        return 1
    elseif itemid >= 6363 and itemid <= 6366 then
        return 1
    elseif itemid >= 6378 and itemid <= 6380 then
        return 1
    elseif itemid >= 6383 and itemid <= 6385 then
        return 1
    elseif itemid >= 6445 and itemid <= 6451 then
        return 1
    elseif itemid >= 6916 and itemid <= 6918 then
        return 1
    elseif itemid >= 7000 and itemid <= 7002 then
        return 1
    elseif itemid >= 7217 and itemid <= 7221 then
        return 1
    elseif itemid >= 7240 and itemid <= 7242 then
        return 1
    elseif itemid >= 7252 and itemid <= 7281 then
        return 1
    elseif itemid >= 7310 and itemid <= 7313 then
        return 1
    elseif itemid >= 7426 and itemid <= 7452 then
        return 1
    elseif itemid >= 7683 and itemid <= 7692 then
        return 1
    elseif itemid >= 7784 and itemid <= 7793 then
        return 1
    elseif itemid >= 7862 and itemid <= 7867 then
        return 1
    elseif itemid >= 7902 and itemid <= 7906 then
        return 1
    elseif itemid >= 7917 and itemid <= 7919 then
        return 1
    elseif itemid >= 7961 and itemid <= 8018 then
        return 1
    elseif itemid >= 8024 and itemid <= 8028 then
        return 1
    elseif itemid >= 8064 and itemid <= 8073 then
        return 1
    elseif itemid >= 8327 and itemid <= 8329 then
        return 1
    end
    
    return 0
end

function isDistance(itemid)
    if itemid >= 6094 and itemid <= 6103 then
        return 1
    elseif itemid >= 6207 and itemid <= 6216 then
        return 1
    elseif itemid >= 6223 and itemid <= 6272 then
        return 1
    elseif itemid >= 6368 and itemid <= 6377 then
        return 1
    elseif itemid >= 6410 and itemid <= 6419 then
        return 1
    elseif itemid >= 6811 and itemid <= 6870 then
        return 1
    elseif itemid >= 6978 and itemid <= 6997 then
        return 1
    elseif itemid >= 7174 and itemid <= 7183 then
        return 1
    elseif itemid >= 7413 and itemid <= 7422 then
        return 1
    elseif itemid >= 7453 and itemid <= 7455 then
        return 1
    elseif itemid >= 7458 and itemid <= 7557 then
        return 1
    elseif itemid >= 8109 and itemid <= 8118 then
        return 1
    elseif itemid >= 8120 and itemid <= 8129 then
        return 1
    elseif itemid >= 8132 and itemid <= 8162 then
        return 1
    elseif itemid >= 8164 and itemid <= 8228 then
        return 1
    elseif itemid >= 8230 and itemid <= 8239 then
        return 1
    elseif itemid == 2403 or itemid == 5129 or itemid == 5137 or itemid == 5162 or itemid == 5191 or itemid == 5229 or itemid == 5492 then
        return 1
    end

    return 0
end

function isMagic(itemid)
    if itemid >= 5280 and itemid <= 5283 then
        return 1
    elseif itemid >= 5675 and itemid <= 5678 then
        return 1
    elseif itemid >= 6051 and itemid <= 6053 then
        return 1
    elseif itemid >= 7633 and itemid <= 7642 then
        return 1
    elseif itemid >= 7734 and itemid <= 7743 then
        return 1
    elseif itemid >= 8105 and itemid <= 8108 then
        return 1
    elseif itemid == 2433 or itemid == 2436 or itemid == 2453 or itemid == 3961 or itemid == 3966 or itemid == 5097 or itemid == 5179 or itemid == 5198 or itemid == 5249 or itemid == 5259 or itemid == 5277 or itemid == 5295 or itemid == 5475 or itemid == 5981 or itemid == 6149 or itemid == 6381 or itemid == 6382 or itemid == 6453 or itemid == 6454 or itemid == 7320 or itemid == 7321 or itemid == 7456 or itemid == 7920 or itemid == 8130 or itemid == 8131 or itemid == 8242 then
        return 1
    end

    return 0
end

-- Крафты: подсчет количества попыток на след. уровень
function calcNeedRecipeTries(level)
    nextLevel = level + 1
    tries = 20 * math.pow(2, nextLevel)
    --tries = 60 * math.pow(3.5, nextLevel)
    
    return tries
end

function calcNeedTries(level)
    nextLevel = level + 1
    tries = 1000 * math.pow(2, nextLevel)
    --tries = 60 * math.pow(3.5, nextLevel)
    
    return tries
end

function getCraftName(craftid)
    ret = "";
    
    if craftid == CRAFT_MINING then
        ret = " шахтерское ремесло"
    elseif craftid == CRAFT_GUNSMITH then
        ret = " оружейное ремесло"
    elseif craftid == CRAFT_ALCHEMY then
        ret = " алхимию"
    elseif craftid == CRAFT_LOGMAN then
        ret = " ремесло лесоруба"
    elseif craftid == CRAFT_ARMORSMITH then
        ret = " ремесло бронника"
    elseif craftid == CRAFT_GOLDSMITH then
        ret = " ремесло ювелира"
    elseif craftid == CRAFT_COOKERY then
        ret = " кулинарию"
    elseif craftid == CRAFT_BALLISTICS then
        ret = " баллистику"
    elseif craftid == CRAFT_BUILDER then
        ret = " ремесло строителя"
    elseif craftid == CRAFT_FARMER then
        ret = " фермерское дело"
    elseif craftid == CRAFT_HUNTER then
        ret = " ремесло охотника"
    end
    
    return ret
end

function MagicDamageObject(iattackType, ianimationEffect, ihitEffect, idamageEffect, ianimationColor, ioffensive, idrawblood, iminDmg, imaxDmg)
    local self = {
        attackType = iattackType,
        animationEffect = ianimationEffect,
        hitEffect = ihitEffect,
        damageEffect = idamageEffect,
        animationColor = ianimationColor,
        offensive = ioffensive,
        drawblood = idrawblood,
        minDmg = iminDmg,
        maxDmg = imaxDmg
    }

    function self:ordered()
        --print('ordered()')
        return {self.attackType, self.animationEffect, self.hitEffect, self.damageEffect, self.animationColor, self.offensive, self.drawblood, self.minDmg, self.maxDmg}
    end

    return self
end

function inBattle(cid)
    if playerIsInFight(cid) ~= 0 then
        doPlayerSendCancel(cid, "Нельзя пользоваться порталом во время или сразу после битвы.")
        return 0
    end

    return 1
end
 
[QUOTE = "Sparkles, сообщение: 2593726, участник: 32397"]
Выглядит как сильно отредактированная версия Avesta или Devland 🤔
[/ QUOTE]
Now I dig deeper (year to 2007) in my opinion was the name of the old server
Post automatically merged:

Since it says "Darkonia RPG" somewhere in those files, maybe @GhostX; could help us
Yes, a lot of similar sprites and scripts. most likely the server was created using OTLand
Post automatically merged:

17.12.206


1.png

Lua:
-- getKraftSkillLevel(cid,skillID); Возвращает уровень скила по его ID

function getKraftSkillLevel(cid,skillID)
      storage = 8000 + skillID+((skillID-1)*2)
      return getPlayerStorageValue(cid,storage)
end


-- doAddKraftSkillTry(cid,skillID,trys)  Прибавляет траи к скилу крафта, возвращает 1 - если скил вырос,  0 - если нет

function doAddKraftSkillTry(cid,skillID,trys)
       storage = (8000 + skillID+((skillID-1)*2)) + 1
       skill_storage = 8000 + skillID+((skillID-1)*2)
       nextrystorage = (8000 + skillID+((skillID-1)*2)) + 2

       tryTo = getPlayerStorageValue(cid,storage)
       nexttry = getPlayerStorageValue(cid,nextrystorage)
       skill_level = getPlayerStorageValue(cid,skill_storage)

       setPlayerStorageValue(cid,storage,tryTo+trys)
       if tryTo+1 >= nexttry then
            NextTry = 40 * math.pow(3.5,skill_level)
            setPlayerStorageValue(cid,nextrystorage,NextTry)
            setPlayerStorageValue(cid,skill_storage,skill_level+1)
            return 1
       end
       return 0
end

function addMasterLvl(cid,skillID)
    storage = 7000 + skillID+((skillID-1)*2)
    mlvl = getPlayerStorageValue(cid,storage)
    if mlvl > 0 then
        setPlayerStorageValue(cid,storage,mlvl+1)
        return 1
    else
        setPlayerStorageValue(cid,storage,1)
        return 1
    end
    return 0
end
 
function getMasterLvl(cid,skillID)
      storage = 7000 + skillID+((skillID-1)*2)
      return getPlayerStorageValue(cid,storage)
end
 
function exhaust(cid, storevalue, exhausttime)
-- Returns 1 if not exhausted and 0 if exhausted
    
    newExhaust = os.time()
    oldExhaust = getPlayerStorageValue(cid, storevalue)
    if (lastexhaust == nil or lastexhaust < 0) then
        lastexhaust = 0
    end
    if (exhausttime == nil or exhausttime < 0) then
        exhausttime = 1
    end
    diffTime = os.difftime(newExhaust, oldExhaust)
    if (diffTime >= exhausttime) then
        setPlayerStorageValue(cid, storevalue, newExhaust)
        return 1
    else
        return 0
    end
end

function doSendMagicEffectArea(pos, radius, effect)
-- Создает эффект с радиусом radius
    doSendMagicEffect(pos,effect)
    for areax = -radius,radius do
        for areay = -radius,radius do
            areapos = {x=pos.x+areax, y=pos.y+areay, z=pos.z}
            doSendMagicEffect(areapos,effect)
        end
    end

end


function doCreatureAddHealthArea(cid, pos, radius, hp, effect)
-- Наносит урон(или лечит) кричуру в зоне с радиусом radius, cid - игрок использующий вещь
    for areax = -radius,radius do
        for areay = -radius,radius do
            areapos = {x=pos.x+areax, y=pos.y+areay, z=pos.z, stackpos=253}
            areacreature = getThingfromPos(areapos)
            if (areacreature.itemid > 0 and areacreature.uid ~= cid) then
                doCreatureAddHealth(areacreature.uid,hp)
                doSendMagicEffect(areapos,effect)
            end
        end
    end

end

function doCreatureChangeSpeedArea(cid, pos, radius, speed)
    
    for areax = -radius,radius do
        for areay = -radius,radius do
            areapos = {x=pos.x+areax, y=pos.y+areay, z=pos.z, stackpos=253}
            areacreature = getThingfromPos(areapos)
            if (areacreature.itemid > 0 and areacreature.uid ~= cid) then
                if (getSlotItem(areacreature.uid,1) ~= 5190) then  --Волшебный шлем
                    doCreatureChangeSpeed(areacreature.uid,speed,3*60)
                    doSendMagicEffect(areapos,13)
                end
            end
        end
    end
    
end

function UpdateSkillPoint(cid)

    Lvl = getPlayerLevel(cid);
    SP = (Lvl/15);
    
    if setPlayerStorageValue(cid, 7999, SP) == 0 then
        return 1
    else
        return 0
    end
end



function remSkillPoint(cid,skillpoints)

    SP = getPlayerStorageValue(cid,7998)
    
    if setPlayerStorageValue(cid, 7998, SP+skillpoints) == 0 then
        return 1
    else
        return 0
    end
end



function getSkillPoint(cid)
    return getPlayerStorageValue(cid,7999) - getPlayerStorageValue(cid,7998)
end


function getVocNamebyId(vid,promo)
    if(promo == 0)then
        if(vid == 1)then
            ret = "Маг"
        elseif(vid == 2)then
            ret = "Друид"
        elseif(vid == 3)then
            ret = "Рейнджер"
        elseif(vid == 4)then
            ret = "Рыцарь"
        elseif(vid == 5)then
            ret = "Лич"
        elseif(vid == 6)then
            ret = "Мастер заклинаний"
        elseif(vid == 7)then
            ret = "Оборотень"
        elseif(vid == 8)then
            ret = "Священик"
        elseif(vid == 9)then
            ret = "Мошенник"
        elseif(vid == 10)then
            ret = "Меткий стрелок"
        elseif(vid == 11)then
            ret = "Вампир"
        elseif(vid == 12)then
            ret = "Паладин"
        elseif(vid == 13)then
            ret = "Шахтер"   
        elseif(vid == 14)then
            ret = "Инженер"   
        elseif(vid == 14)then
            ret = "Ремесленник"           
        end
    else
        if(vid == 1)then
            ret = "Мастер магии"
        elseif(vid == 2)then
            ret = "Верховный друид"
        elseif(vid == 3)then
            ret = "Королевский рейнджер"
        elseif(vid == 4)then
            ret = "Элитный рыцарь"
        elseif(vid == 5)then
            ret = "Повелитель мертвых"
        elseif(vid == 6)then
            ret = "Мастер рун"
        elseif(vid == 7)then
            ret = "Меняющийся"
        elseif(vid == 8)then
            ret = "Верховный жрец"
        elseif(vid == 9)then
            ret = "Вор"
        elseif(vid == 10)then
            ret = "Снайпер"
        elseif(vid == 11)then
            ret = "Носферату"
        elseif(vid == 12)then
            ret = "Чемпион"
        elseif(vid == 13)then
            ret = "Хранитель Гор"
        elseif(vid == 14)then
            ret = "Изобретатель"
        elseif(vid == 15)then
            ret = "Мастер Ремесел"           
        end
    end   
    return ret
end

function doPlayerRemoveItembyRecipe(cid,recipe)
    -- делаем в 2 прохода, первый - проверка на существование, второй - изъятие
    pos1 = 1
    pos2 = 1
    check = true
    while (pos2 ~= nil) do
        pred_pos2 = pos2
        pos1 = string.find(recipe,'-',pos2,1)
        pos2 = string.find(recipe,'|',pos2+1,1)
        
        if (pos1 ~= nil) and (pos2 ~= nil) then
            if pred_pos2 == 1 then
                count = tonumber(string.sub(recipe, pred_pos2, pos1-1))
            else
                count = tonumber(string.sub(recipe, pred_pos2+1, pos1-1))
            end
            item = tonumber(string.sub(recipe, pos1+1, pos2-1))
            
            if checkItem(cid,item,count) ~= 1 then
                check = false
                return 0
            end
        end
    end
    
    if(check)then
        pos1 = 1
        pos2 = 1
        while (pos2 ~= nil) do
            pred_pos2 = pos2
            pos1 = string.find(recipe,'-',pos2,1)
            pos2 = string.find(recipe,'|',pos2+1,1)
            
            if (pos1 ~= nil) and (pos2 ~= nil) then
                if pred_pos2 == 1 then
                    count = tonumber(string.sub(recipe, pred_pos2, pos1-1))
                else
                    count = tonumber(string.sub(recipe, pred_pos2+1, pos1-1))
                end
                item = tonumber(string.sub(recipe, pos1+1, pos2-1))
                
                doPlayerRemoveItem(cid,item,count)
            end
        end
    end
    
    return 1
end

function getLvlName(MasterLvl)
    if MasterLvl < 0 then
        ret = "Не владеет"
    elseif MasterLvl <= 1 then
        ret = "Новичок"
    elseif MasterLvl == 2 then
        ret = "Ученик"
    elseif MasterLvl == 3 then
        ret = "Подмастерье"
    elseif MasterLvl == 4 then
        ret = "Младший мастер"
    elseif MasterLvl == 5 then
        ret = "Мастер"
    elseif MasterLvl == 6 then
        ret = "Эксперт"
    elseif MasterLvl == 7 then
        ret = "Грандмастер"
    else
        ret = "Грандмастер"
    end
    
    return ret
end

function addLifeDrain(cid,cid2,damage,percent)
    if (getSlotItem(cid2,1) ~= 5190) then  --Волшебный шлем
        doPlayerAddHealth(cid,math.floor((damage/100)*percent))
    end
    return 1
end

function addManaDrain(cid,cid2,damage,percent)
    if (damage > 0 and (getSlotItem(cid2,1) ~= 5190)) then  --Волшебный шлем
        --doPlayerAddMana(cid,math.floor((damage/100)*percent))
        if isPlayer(cid2)==1 then
            doPlayerAddMana(cid2,-1*math.floor((damage/100)*percent))
        end
        doPlayerAddMana(cid,math.floor((damage/100)*percent))
        -- doSendMagicEffect(frompos,14)
        -- doSendMagicEffect(topos,26)
    end
    return 1
end

function xDamage(cid2,damage)
    dam = (damage*2) + damage
    if dam > 0 and isPlayer(cid2)==0 then
        if dam > 2000 then
            dam = 2000
        end
        doCreatureAddHealth(cid2,-1*dam)
        doSendMagicEffect(topos,6)
        doSendAnimatedText(topos,dam+damage,193)
        
    end
    
    return 1
end

function addFireDamage(cid,cid2,damage,topos)
    level = getPlayerLevel(cid)   
    if damage > 0 then
        doCreatureAddHealth(cid2,-(2*level))
        doSendAnimatedText(topos, (damage+2*level), 180);
        doSendMagicEffect(topos,6)
    end
    return 1

end

function addMagLevDamage(cid,cid2,damage)
    MagLevel = getPlayerMagLevel(cid)
    voc = getPlayerVocation(cid)
    
    if damage > 0 then
        doCreatureAddHealth(cid2,-(5*MagLevel))
        doSendAnimatedText(topos, (damage+5*MagLevel), 180);
        doSendMagicEffect(topos,11)
    end
    return 1
end

function addMagRaitDamage(cid,cid2,damage,reit)
    MagLevel = getPlayerMagLevel(cid)
    doCreatureAddHealth(cid2,-(reit*MagLevel))
    doSendAnimatedText(topos, (damage+reit*MagLevel), 180);
    doSendMagicEffect(topos,11)
    return 1
end

function sendCritical(cid, cid2, frompos, topos, damage, critlevel)
    if(damage > 0) then
        random_number = math.random(1,700)
        
        if ((random_number >= 20) and (random_number <= 50)) then
            doCreatureAddHealth(cid2,math.floor(-damage))
            doSendAnimatedText(frompos, "урон x2!!", 179)
            doSendAnimatedText(topos,damage*2,193)
        elseif ((random_number >= 190) and (random_number <= 200) and (critlevel >= 2)) then
            doCreatureAddHealth(cid2,math.floor(-damage*2))
            doSendAnimatedText(frompos, "урон x4!!", 179)
            doSendAnimatedText(topos,damage*3,193)           
        elseif ((random_number >= 450) and (random_number <= 455) and (critlevel >= 3)) then
            doCreatureAddHealth(cid2,math.floor(-damage))
            doSendAnimatedText(frompos, "урон x8", 179)
            doSendAnimatedText(topos,damage*4,193)   
            
            doSendMagicEffectArea(topos, 3, 60)
            doCreatureAddHealthArea(cid, topos, 3, -damage*2, 11)           
        end
    end
end

function getCurrentMission(cid)
    return getPlayerStorageValue(cid,2006)
end

function getGlory(cid)
    return getPlayerStorageValue(cid,2008)
end

monsters = {[1]="Amazon", [2]="Ancient Scarab", [3]="Assasin", [4]="Badger", [5]="Bandit", [6]="Banshee", [7] = "Bat", [8]="Bear",
[9]="Behemoth", [10]="Beholder", [11]="Black Knight", [12]="Wild boar", [13]="Blue Djinn", [14]="Bone Beast", [15]="Bug", [16]="Pink Butterfly",
[17]="Blue Butterfly",[18]="Kat" ,[19]="Red Butterfly", [20]="Carniphila", [21]="Cave Rat", [22]="Centipede", [23]="Chicken", [24]="Cobra", [25]="Crab",
[26]="Crocodile", [27]="Crypt Shambler", [28]="Cyclops", [29]="Dark Monk", [30]="Deer", [31]="Demon", [32]="Demon Skeleton", [33]="Dog",
[34]="Dragon", [35]="Dragon Lord", [36]="Dwarf", [37]="Dwarf Geomancer", [38]="Dwarf Guard", [39]="Dwarf Soldier", [40]="Dworc Fleshhunter",
[41]="Dworc Venomsniper", [42]="Dworc Voodoomaster", [43]="Efreet", [44]="Elder Beholder", [45]="Elephant", [46]="Elf", [47]="Elf Arcanist",
[48]="Elf Scout", [49]="Fire Devil", [50]="Fire Elemental", [51]="Flamingo", [52]="Frost Troll", [53]="Gargoyle", [54]="Gazer", [55]="Ghost",
[56]="Ghoul", [57]="Giant Spider", [58]="Goblin", [59]="Green Djinn", [60]="Hero", [61]="Hunter", [62]="Hyaena", [63]="Hydra", [64]="Kongra",
[65]="Larva", [66]="Lich", [67]="Lion", [68]="Lizard Sentinel", [69]="Lizard Snakecharmer", [70]="Lizard Templar", [71]="Marid", [72]="Merlkin",
[73]="Mimic", [74]="Minotaur", [75]="Minotaur Archer", [76]="Minotaur Guard", [77]="Minotaur Mage", [78]="Monk", [79]="Mummy", [80]="Necromancer",
[81] = "Orc", [82] = "Orc Berserker", [83] = "Лидер Орков", [84] = "Orc Rider", [85] = "Orc Shaman", [86] = "Orc Копейщик ", [87] =" Военачальник Орков ",
[88] = "Воин Орков", [89] = "Панда", [90] = "Попугай", [91] = "Пират", [92] = "Паук Ядовитый", [93] = "Лексард", [94] = "Жрица", [95] = "Кролик", [96] = "Крыса",
[97] = "Rotworm", [98] = "Scarab", [99] = "Scorpion", [100] = "Sheep", [101] = "Sibang", [102] = "Skeleton", [103 ] = "Скунс", [104] = "Слизь",
[105] = "Призыв слизи", [106] = "Контрабандист", [107] = "Змея", [108] = "Паук", [109] = "Крапива косы", [110] = "Сталкер", [111] = "Каменный Голем",
[112] = "Болотный тролль», [113] = «Тарантул», [114] = «Птица ужаса», [115] = «Тигр», [116] = «Тролль», [117] = «Валькирия», [118] = "Вампир", [119] = "Боевой волк",
[120] = "Чернокнижник", [121] = "Оса", [122] = "Дикий воин", [123] = "Зимний волк", [124] = "Ведьма", [125] = "Волк", [126] = "Арахнид", [127] = "Арахнид Квин",
[128] = "Skeleton Archer", [129] = "Skeleton Warior", [130] = "Skeleton Sorcer", [131] = "Zombi", [132] = "Train monk", [133] = "Omruc ", [134] =" Моргути ",
[135] = "Thalas", [136] = "Dipthrah", [137] = "Ashmunrah", [138] = "Mahrdis", [139] = "Vashresamun", [140] = "Rahemos", [141 ] = "Леди Лорана",
[142] = "Генерал Джоди", [143] = "Генерал Джули", [144] = "Элорвин", [145] = "Драгодор", [146] = "Отравитель", [147] = "Волшебник",
[148] = "Plaguethrower", [149] = "Flamethrower", [150] = "Deathslicer", [151] = "Demon Summon", [152] = "Yeti", [153] = "Gluk", [ 154] = "Генерал Муриус",
[155] = "Даралион", [156] = "Демодрас", [157] = "Грорлам", [158] = "Фернфанг", [159] = "Рогатый лис", [160] = "Старая вдова ", [161] =" Некрофарус ",
[162] = "Дурной глаз", [162] = "Гейша", [163] = "Храмовник-судья", [164] = "Судья-судья", [165] = "Черный дракон", [166] = " Леприкон ", [167] =" Йоши ",
[168] = "Феникс", [169] = "Каменная птица", [170] = "Судья", [171] = "Огр", [172] = "Самурай", [173] = "Воин Троллей", [174] = "Скелетный пленник",
[175] = "Черепаха", [176] = "Глюк", [177] = "Глюк", [178] = "Глюк", [179] = "Банни", [180] = "Пантера", [181 ] = "Дроу", [182] = "Дроу Рейдер",
[183] = "Водитель", [184] = "Убийца дроу", [185] = "Жрица Дроу", [186] = "Виверна", [187] = "Корсар", [188] = "Армадил", [189] = "Военный попугай"}

items_collect = {[1] = "2128", [2] = "2195", [3] = "2127", [4] = "2457", [5] = "2458", [6] = "2459" , [7] = "2460", [8] = "2461", [9] = "2462", [10] = "2463", [11] = "2464", [12] = "2465", [ 13] = "2466", [14] = "2468", [15] = "2469", [16] = "2470", [17] = "2471", [18] = "2473", [19] = "2474", [20] = "2475", [21] = "2476", [22] = "2477", [23] = "2478", [24] = "2479", [25] = " 2480 ", [26] =" 2481 ", [27] =" 2482 ", [28] =" 2483 ", [29] =" 2484 ", [30] =" 2485 ", [31] =" 2486 " , [32] = "2487", [33] = "2488", [34] = "2489", [35] = "2490", [36] = "2491", [37] = "2492",[38] = "2493", [39] = "2494", [40] = "2495", [41] = "2496", [42] = "2467", [43] = "2497", [44 ] = "2498", [45] = "2499", [46] = "2500", [47] = "2501", [48] = "2502", [49] = "2503", [50] = «2504», [51] = «2505», [52] = «2506», [53] = «2507», [54] = «2508», [55] = «2509», [56] = «2510 ", [57] =" 2511 ", [58] =" 2512 ", [59] =" 2513 ", [60] =" 2515 ", [61] =" 2516 ", [62] =" 2517 ", [63] = "2518", [64] = "2519", [65] = "2520", [66] = "2521", [67] = "2524", [68] = "2525", [69 ] = "2526", [70] = "2527", [71] = "2528", [72] = "2529", [73] = "2530", [74] = "2531",[75] = "2532", [76] = "2533", [77] = "2534", [78] = "2535", [79] = "2536", [80] = "2538", [81 ] = "2539", [82] = "2540", [83] = "2541", [84] = "2641", [85] = "2642", [86] = "2643", [87] = "2644", [88] = "2645", [89] = "2646", [90] = "2647", [91] = "2648", [92] = "2649", [93] = "2650 ", [94] =" 2651 ", [95] =" 2652 ", [96] =" 2653 ", [97] =" 2654 ", [98] =" 2655 ", [99] =" 2656 ", [100] = "2657", [101] = "2658", [102] = "2659", [103] = "2660", [104] = "2661", [105] = "2663", [106 ] = "2967", [107] = "2968", [108] = "2969", [109] = "2870", [110] = "2971", [111] = "2972 ", [112] =" 2973 ", [113] =" 2974 ", [114] =" 2975 ", [115] =" 2982 ", [116] =" 2376 ", [117] =" 2377 " , [118] = "2378", [119] = "2379", [120] = "2381", [121] = "2383", [122] = "2391", [123] = "2387", [ 124] = "2407", [125] = "2409", [126] = "2402", [127] = "2413", [128] = "2414", [129] = "2424", [130] = "2426"} [/ CODE]2413 ", [128] =" 2414 ", [129] =" 2424 ", [130] =" 2426 "} [/ CODE]2413 ", [128] =" 2414 ", [129] =" 2424 ", [130] =" 2426 "} [/ CODE]
Post automatically merged:

Lua:
---------------------------- Configuration ------------------------------

-- datadir
datadir = "data/"

-- map
-- sets what map to load, if sql, determines the sql map
map = "data/world/map.otbm"
mapstore = "data/world/map-mapstore.xml"
housestore = "data/world/map-housestore.xml"
houserentperiod = "monthly"

-- sets what map to load
-- map =

-- OTBM for binary, SQL for SQL map, XML for OTX maps
mapkind = "OTBM"

-- SQL for acc/player info from SQL, XML for acc/player info from XML
sourcedata = "SQL"

-- bans
banIdentifier = "data/bans.xml"

-- the message the player gets when he logs in
loginmsg = "Welcome to Darkonia RPG."

-- Tips
Mess_1 = "Любую информацию по игре можно найти в нашей библиотеке: http://www.chronicles.darkoniarpg.ru/"
Mess_2 = "Последнее обновление от 27 ноября 2006 года, о нем можно прочитать в новостях : http://darkoniarpg.ru/home.php?page=news"
Mess_3 = "Последний багфикс от 13.11.2006 о нем можно прочитать в новостях : http://darkoniarpg.ru/phpbb/viewtopic.php?t=1095"

-- the port otserv listens on
port = "7171"

-- name of our server
servername = "Darkonia RPG"

-- name of the owner of our server
ownername = "Torian Kel"

-- email of the owner of our server
owneremail = "[email protected]"

-- the url for more server info
url = "http://darkoniarpg.ru/"

-- the location of the server
location = "Russia"

-- the ip the server should redirect too
ip = "192.168.43.12"

-- The messagebox you sometimes get before you choose characters
motd = "Welcome to the Darkonia RPG!"
motdnum="0"

-- use md5 passwords for accounts, yes/no
md5passwords = "no"

-- world type. options: pvp, no-pvp, pvp-enforced
worldtype = "pvp"

-- max number of players allowed
maxplayers = "500"

-- exhausted time in ms (1000 = 1sec)
exhausted = 1000

-- exhaustion time for healing spells (1000 = 1sec)
exhaustedheal = 1000

-- how many ms to add if the player is already exhausted and tries to cast a spell (1000 = 1sec)
exhaustedadd = 500

-- how long does the player has to stay out of fight to get pz unlocked in ms (1000 = 1sec)
pzlocked = 30*1000

-- allow multiple logins of the same char
allowclones = 0

-- vocation names
vocations = {"маг", "друид", "рейнджер", "рыцарь", "лич", "мастер заклинаний", "оборотень", "жрец", "жулик", "меткий стрелок", "вампир", "паладин"}
promoted_vocations = {"мастер магии", "старший друид", "королевский рейнджер", "элитный рыцарь", "повелитель мертвых", "мастер рун", "меняющийся", "верховный жрец", "вор", "снайпер", "носферату", "чемпион"}

--- SQL part
sql_host = "127.0.0.1"
sql_user = "root"
sql_pass = ""
sql_db   = "darkonia_db2"


--- SQL MAP part
sqlmap = "test_map"
map_host = "localhost"
map_user = "root"
map_pass = ""
map_db   = ""

---------------------------- Save configuration ------------------------------
-- how often do server saves it's state complete (0 = off, 5 = 5min, 60 = hour)
serversave = 180

-------------------------Darkonia RPG configuration-----------------------
--referal system
refpercent = 10
referercoins = 10000

--
lootkoeff = 1

----
buy_sc = 2000000
sell_sc = 3000000

-- resetlvl
-- Reset the player when he gots this lvl(Max lvl is 634)
resetlvl = "630"

-- name of your world (seen on the character list when logging in)
worldname = "Darkonia RPG"

-- do you want to enable cap system (yes/no)
capsystem = "yes"

-- do you want players to learn spells before they can use them (yes/no)
learnspells = "yes"

-- how many summons player can have
maxsummons = 2

-- maximum number of items on a house tile (including those in containers)
maxhousetileitems = 50

-- do you want to give summons for all vocations (yes/no)
summonsallvoc = "no"

-- chance of losing a spear when shot (0 - none lost, 100000 - all lost)
spearlosechance = 5000

-- anti-afk - maximum idle time to kick player (1 = 1min)
kicktime = 10

--Mc = 0 You cant use Mc. Mc = 1 You can use MC.
mc = "0"

--Уровень для чата
chatlevel = 8

--Разделение экспы
p_distance = 30
p_height = 1
p_formula = 1

-- максимум имен в деадлисте

maxdeathentries = 50

---------------------- Soul System configuration ----------------------
-- how many soul pointss you gain when kill a monster
soulup = "2"

-------------------------House configuration---------------------------
-- house price for 1 sqm
priceforsqm = 6000

-- max houses for player
maxhouses = 2

-- Do you want to enable !buyhouse(yes/no)
buyhouseable = "no"
-------------------------Deaths configuration---------------------------
-- how much % of exp/skills/stuff do you lose when dying if you dont have blessings and you dont have promotion
diepercent = 10
diebless0 = 10

-- how much % of exp/skills/stuff do you lose when dying if you dont have blessings and you have promotion
diebless0promo = 7

-- how much % of exp/skills/stuff do you lose when dying if you have 1 blessing and you dont have promotion
diebless1 = 9

-- how much % of exp/skills/stuff do you lose when dying if you have 2 blessings and you dont have promotion
diebless2 = 8

-- how much % of exp/skills/stuff do you lose when dying if you have 3 blessings and you dont have promotion
diebless3 = 7

-- how much % of exp/skills/stuff do you lose when dying if you have 4 blessings and you dont have promotion
diebless4 = 6

-- how much % of exp/skills/stuff do you lose when dying if you have 5 blessings and you dont have promotion
diebless5 = 5

-- how much % of exp/skills/stuff do you lose when dying if you have 1 blessing and you have promotion
diebless1promo = 6

-- how much % of exp/skills/stuff do you lose when dying if you have 2 blessings and you have promotion
diebless2promo = 5

-- how much % of exp/skills/stuff do you lose when dying if you have 3 blessings and you have promotion
diebless3promo = 4

-- how much % of exp/skills/stuff do you lose when dying if you have 4 blessings and you have promotion
diebless4promo = 3

-- how much % of exp/skills/stuff do you lose when dying if you have 5 blessings and you have promotion
diebless5promo = 2
 
Last edited:
Back
Top