[OTClient] The Forgotten Tibia Server 0.8

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
The Forgotten Tibia Server
The Forgotten Tibia Server is a free and open-source MMORPG server emulator written in C++.
It is a fork of the The Forgotten Server 1.3 project.
To connect to the server, you will need The Forgotten Tibia Client (a custom client forked from OTClient and edited by me - vc_redist.x86.exe required) that you can download at the bottom of this page.

What makes it different from The Forgotten Server 1.3? (you can see the diff analysis here)
  • There are no vocations:
    Everyone starts as a normal human being with some points to be distributed among the skills.
  • There is no skill training:
    It uses a system to advance skills by distributing points.
  • All clubs, swords and axes damage are based on strenght.
  • Distance weapons damage are based on strenght and/or dexterity.
  • Two-handed melee weapons gives critical hit chance and critical hit damage.
  • The more levels you get, less points you receive.
Skills (some stats may be working a little different, check images)
  • Magic (+ spell power, + rune power, + mana)
  • Vitality (+ health)
  • Strenght (+ physical damage)
  • Dexterity (+ distance damage, + walk speed, + attack speed)
  • Faith (+ support spells, + rod max damage, + mana)
  • Intelligence (+ attack spells, + wand max damage, + mana)
  • Defence (+ physical defence)
  • Endurance (+ capacity, + health)
Custom Systems (values may be different)
  • Dual Wield:
    The player can use 2 weapons (for example: club and sword, axe and spear, sword and throwing knife). The attack speed will be fixed in 200% but the damage will drop to 75%. Each combat turn the player will use one hand to defend and the other to attack.
  • Two Handed Melee Weapons:
    All two-handed melee weapons give +25% of critical hit chance and +100% of critical hit amount. Also, they have a chance of giving a bleeding effect to the target.
  • Auto Loot Gold:
    The money dropped from monsters goes directly to the player.
  • Quiver:
    Distance weapons are loading ammo from container item in the arrow slot and there is a new container item called "quiver".
  • Wands and Rods varying with skills:
    Intelligence and faith raises the wands/rods maximum damage.
  • Spells based on Faith and Intelligence:
    There is no level and vocation requirement for spells. The more you raise faith and intelligence, more spells you get.
  • Screen with one more tile:
    It was added one more square meter to the screen.
  • Title:
    After you reach a certain minimum value of magic, strenght or dexterity, you can choose a title to display when people look at your character.
  • Spacebar Attack:
    When you use that feature from the client with autoloot gold and addons you can almost hunt without your mouse.
Things You Need To Know
  • I stopped working on this server suddenly, 4 months ago, to focus on my graduation and study other things like making games on Unity or penetration tests with Linux, also because I think you need a lot of passion and money to spend on publicity to make players enter and stay. The last thing I remember I was developing was a War System that should work integrated with the normal server, so people would play a for-fun server or a serious-rpg-server. You may want to disable the system in data files. I don't remember which files are used for this.
  • I've made a correction recommended by Mark Saman on monster's AI system (this solves the laggy movement from fast monsters), but that change can make the server lag if there is too much players online interacting with monsters).
  • Same as Capture The Flag system, I don't know if it's working perfectly. You may want to disable it in data files and I don't remember which files are used.
  • I don't know if the schema.sql file available in my repository works for this server. I still have to remove passwords and accounts from the one I was using to make it available for public.
  • The map is a mix of Svargrond, Yalahar, YurOTS, The Forgotten Server's official map and many hunting places and quests from global map.
  • There are NPCs for tasks, blessings, bank and mount systems.
  • The OTClient version used for this project is much more outdated then the The Forgotten Server version, one of the known bugs is the non-smoothly-walk-system.
  • I disabled many features from OTClient's interface.
  • Client and server compiled with Microsoft Visual Studio, I don't remember which version but I think client was with 2013 and server with 2015.
  • There is a project folder to open the projects on Microsoft Visual Studio.
  • You will have a lot of work to do if you want to change the spells values, in the client you need to change in 2 files and in the server you need to change in 1 I think.
  • In some places its written "resistance" but in the clients interface its "defence". They are the same thing.
Useful Links
Images

wand-intelligence.gif

auto-loot.gif

dual-wield.gif

ezgif.com-crop.gif

1547211729065.png

Interesting Things
  • data/actions/scripts/other/ctf.lua (when click on the flag of capture the flag arena)
  • data/actions/scripts/other/yurez_ship.lua (when click on the wheel of the ship teleports)
  • data/actions/scripts/other/send_cancel.lua (when click, send cancel message)
  • data/actions/scripts/other/fulloutfits.lua (when click, give full outfits)

  • data/creaturescripts/scripts/arena.lua
  • data/creaturescripts/scripts/skillpoints.lua
  • data/creaturescripts/scripts/killtasks.lua
  • data/creaturescripts/scripts/ctf.lua

  • data/globalevents/scripts/ctf.lua
  • data/globalevents/scripts/dailyserversave.lua
  • data/globalevents/scripts/raids.lua

  • data/lib/core/ctf.lua (many lua functions used by ctf system)
  • data/lib/core/skillpoints.lua (many lua functions used by skillpoints systems)
  • data/lib/core/player.lua (many new lua functions)

  • data/movements/scripts/dual_wield.lua (changes players stats when move second weapon to hand)
  • data/movements/scripts/arena.lua (configure enter and exit teleports and set storage for arena)

  • data/spells/spells.xml (intelligence and faith values - changes must be applied on otclient files too)

  • data/talkactions/scripts/skillpoints.lua
  • data/talkactions/scripts/title.lua

  • data/weapons/scripts/bleeding_effect.lua.lua

  • data/npc/scripts/guide.lua
  • data/npc/scripts/bless.lua
  • data/npc/scripts/bank.lua
  • data/npc/scripts/tasks.lua
  • data/npc/scripts/The Oracle.lua
 

Attachments

Last edited:
OP
Togu

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
Like the idea, could have chosen a different name tho.
The name is because it's based on The Forgotten Tibia and because I think many people forgot that Tibia could be this way (with skill advancement by point distribution). I had other ideas like Dark Tibia (stats are based on Dark Souls game) or Fibula or Tibia 2.

There is a funny feature taken from Dark Souls that, when you die, the message is YOU DIED and the screen stays for 5 seconds before you are forced to logout hahahaha.

Also there is a system for titles. If you have x magic level you can use a title of mage. If you have x strenght you can be a knight. I'll put in on the main post.
 
Last edited:

killer990

New Member
Joined
Jun 1, 2012
Messages
8
Reaction score
4
Location
Poland
I like it, but can You explain me how I can edit limit of max skillpoints invested into skill level? Since Fibula client can show up to 9999 skill level, but skillpoint feature won't let me pass 202 points ;/
 

Wirless

7.6 is the best :D
Joined
Nov 3, 2012
Messages
1,024
Reaction score
192
Location
Ireland-Poland
I like it, but can You explain me how I can edit limit of max skillpoints invested into skill level? Since Fibula client can show up to 9999 skill level, but skillpoint feature won't let me pass 202 points ;/
change the datatype/memory of skills in the sources?
 

killer990

New Member
Joined
Jun 1, 2012
Messages
8
Reaction score
4
Location
Poland
Well, after look into whole source I didn't find anything or maybe I was miss something ;/ I'm not expert in those thing's.
 
OP
Togu

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
I like it, but can You explain me how I can edit limit of max skillpoints invested into skill level? Since Fibula client can show up to 9999 skill level, but skillpoint feature won't let me pass 202 points ;/
change the datatype/memory of skills in the sources?
Well, after look into whole source I didn't find anything or maybe I was miss something ;/ I'm not expert in those thing's.
The server was designed to work as an old school server. I was thinking on people playing till level 220 with low experience and around 100 players on the map. That's why the skill limitations.

On /data/lib/core/skillpoints.lua you can change maximum skill and gains per level:
Code:
local pointsStorage = 62490                 -- where the points are stored
local modalId = 4869                        -- id of the modal window
local TextModalId = 4870                     -- so player may return to skill window
local skillPointsAdvanceStorage = 62491     -- storage to avoid giving points twice for same level

local maxMagic = 10            -- maximum magic till level 8
local maxVitality = 20        -- maximum vitality till level 8
local maxStrenght = 20        -- maximum strenght till level 8
local maxIntelligence = 20    -- maximum intelligence till level 8
local maxFaith = 20            -- maximum faith till level 8
local maxDexterity = 20        -- maximum dexterity till level 8
local maxResistance = 20    -- maximum resistance till level 8
local maxEndurance = 20        -- maximum endurance till level 8

-- level 8 = 24 points
-- level 40 = 152 points (315 hp, 205 mana, 755 cap)
-- level 60 = 212 points (415 hp, 305 mana, 955 cap)
-- level 80 = 252 points (515 hp, 405 mana, 1155 cap)
-- level 100 = 272 points (615 hp, 505 mana, 1355 cap)
-- level 110 = 277 points (665 hp, 555 mana, 1455 cap)
-- level 120 = 282 points (715 hp, 605 mana, 1555 cap)
-- level 130 = 287 points (765 hp, 555 mana, 1655 cap)
-- level 140 = 292 points (815 hp, 705 mana, 1755 cap)
-- level 150 = 297 points (865 hp, 755 mana, 1855 cap)

local configPoints = {
    pointsOnAdvanceRook = 2,     -- points per level till end phase rook
    levelPhaseRook = 8,            -- end level of phase rook
    pointsOnAdvance1 = 4,        -- points per level till end phase 1
    levelPhase1 = 40,            -- end level of phase 1
    pointsOnAdvance2 = 3,        -- points per level till end phase 2
    levelPhase2 = 60,            -- end level of phase 2
    pointsOnAdvance3 = 2,        -- points per level till end phase 3
    levelPhase3 = 80,            -- end level of phase 3
    pointsOnAdvance4 = 1,        -- points per level till end phase 4
    levelPhase4 = 100,            -- end level of phase 4
    initialMagicPoints = 0,            -- points when reseting
    initialVitalityPoints = 8,        -- points when reseting
    initialStrenghtPoints = 8,        -- points when reseting
    initialIntelligencePoints = 8,    -- points when reseting
    initialFaithPoints = 8,            -- points when reseting
    initialDexterityPoints = 8,        -- points when reseting
    initialResistancePoints = 8,    -- points when reseting
    initialEndurancePoints = 8        -- points when reseting
}

local titleNoSkillSelected = "No skill selected"
local descNoSkillSelected = "Select a skill to assign."

local titleMaximumValue = "Maximum value reached"
local descMaximumValue = "You need more level to advance"
local descMaximumGlobalValue = "You have reached the maximum skill.\n"

local titleMinimumValue = "Minimum value reached"
local descMinimumValue = "You can not remove anymore.\n"

local titleNotEnoughPoints = "Not enough points"
local descNotEnoughPoints = "Get more level to receive more.\n"

local titleNotInPZ = "Out of protection zone"
local descNotInPZ = "You need to go to a protection zone."

local titleCanNotReset = "Can not reset"
local descCanNotReset = "You already have minimum skills."

local pointsAvailable = "Skill points available"
local pointAvailable = "Skill point available"

local magic = {
    pointsCost = 3,
    manaGain = configManager.getNumber(configKeys.MAGIC_MANAGAIN)}

local vitality = {
    pointsCost = 1,
    healthGain = configManager.getNumber(configKeys.VITALITY_HEALTHGAIN)}

local strenght = {
    pointsCost = 1,
    healthGain = configManager.getNumber(configKeys.STRENGHT_HEALTHGAIN),
    capGain = configManager.getNumber(configKeys.STRENGHT_CAPGAIN) / 100}

local resistance = {
    pointsCost = 1,
    healthGain = configManager.getNumber(configKeys.RESISTANCE_HEALTHGAIN),
    capGain = configManager.getNumber(configKeys.RESISTANCE_CAPGAIN) / 100}

local dexterity = {
    pointsCost = 1,
    walkSpeedGainInterface = 0.25,         -- changeable only through sources
    attackSpeedGainInterface = 0.25}    -- changeable only through sources

local intelligence = {
    pointsCost = 1,
    manaGain = configManager.getNumber(configKeys.INTELLIGENCE_MANAGAIN)}

local faith = {
    pointsCost = 1,
    manaGain = configManager.getNumber(configKeys.FAITH_MANAGAIN)}

local endurance = {
    pointsCost = 1,
    capGain = configManager.getNumber(configKeys.ENDURANCE_CAPGAIN) / 100,
    healthGain = configManager.getNumber(configKeys.ENDURANCE_HEALTHGAIN)}

local skills = { -- skill name, player skill value, cost to raise
    [1] = {'Magic', function(player) return player:getBaseMagicLevel() end, magic.pointsCost},
    [2] = {'Vitality', function(player) return player:getSkillLevel(SKILL_VITALITY) end, vitality.pointsCost},
    [3] = {'Strenght', function(player) return player:getSkillLevel(SKILL_STRENGHT) end, strenght.pointsCost},
    [4] = {'Defence', function(player) return player:getSkillLevel(SKILL_RESISTANCE) end, resistance.pointsCost},
    [5] = {'Dexterity', function(player) return player:getSkillLevel(SKILL_DEXTERITY) end, dexterity.pointsCost},
    [6] = {'Faith',    function(player) return player:getSkillLevel(SKILL_FAITH) end, faith.pointsCost},
    [7] = {'Intelligence', function(player) return player:getSkillLevel(SKILL_INTELLIGENCE) end, intelligence.pointsCost},
    [8] = {'Endurance',    function(player) return player:getSkillLevel(SKILL_ENDURANCE) end, endurance.pointsCost}
}

(...)

function Player:assignSkillPoints(skill)

    if getPlayerLevel(self) >= 8 then
        maxMagic         = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ) * 0.5, getPlayerLevel(self) ) )
        maxVitality     = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
        maxStrenght     = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
        maxIntelligence = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
        maxFaith         = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
        maxDexterity     = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
        maxResistance     = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
        maxEndurance     = math.ceil( math.max( getPlayerLevel(self) * math.max( 2.5 - (0.02 * (getPlayerLevel(self) - 8)), 1 ), getPlayerLevel(self) ) )
    end

    if getPlayerLevel(self) >= 72 then
        maxMagic         = 72
        maxVitality     = 90
        maxStrenght     = 90
        maxIntelligence = 90
        maxFaith         = 90
        maxDexterity     = 90
        maxResistance     = 90
        maxEndurance     = 90
    end

    if getPlayerLevel(self) > 90 then
        maxMagic         = 72 + getPlayerLevel(self) - 90
        maxVitality     = getPlayerLevel(self)
        maxStrenght     = getPlayerLevel(self)
        maxIntelligence = getPlayerLevel(self)
        maxFaith         = getPlayerLevel(self)
        maxDexterity     = getPlayerLevel(self)
        maxResistance     = getPlayerLevel(self)
        maxEndurance     = getPlayerLevel(self)
    end

    if getPlayerLevel(self) > 100 then
        maxMagic         = math.ceil(82 + (getPlayerLevel(self) - 100) / 2)
        maxVitality     = getPlayerLevel(self)
        maxStrenght     = getPlayerLevel(self)
        maxIntelligence = getPlayerLevel(self)
        maxFaith         = getPlayerLevel(self)
        maxDexterity     = getPlayerLevel(self)
        maxResistance     = getPlayerLevel(self)
        maxEndurance     = getPlayerLevel(self)
    end

    if getPlayerLevel(self) > 130 then
        maxVitality     = 130
        maxStrenght     = 130
        maxIntelligence = 130
        maxFaith         = 130
        maxDexterity     = 130
        maxResistance     = 130
        maxEndurance     = 130
    end

    if getPlayerLevel(self) > 135 then
        maxMagic         = math.ceil(100 + (getPlayerLevel(self) - 135) / 2)
        maxVitality     = 130
        maxStrenght     = 130
        maxIntelligence = 130
        maxFaith         = 130
        maxDexterity     = 130
        maxResistance     = 130
        maxEndurance     = 130
    end

    if getPlayerLevel(self) > 153 then
        maxMagic         = 110
        maxVitality     = 130
        maxStrenght     = 130
        maxIntelligence = 130
        maxFaith         = 130
        maxDexterity     = 130
        maxResistance     = 130
        maxEndurance     = 130
    end

(...)

If you make changes in /data/spells/spells.xml, you will have to change in /data/lib/core/skillpoints.lua too:
Code:
function Player:messageOnAdvance(skill)

    local faith = self:getSkillLevel(SKILL_FAITH)
    local intelligence = self:getSkillLevel(SKILL_INTELLIGENCE)

    if skill == SKILL_FAITH then
        if faith == 9 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: utevo lux (Light)")
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exiva (Find Person)")
        elseif faith == 10 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exani tera (Magic Rope)")
        elseif faith == 11 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exura (Light Healing)")
        elseif faith == 12 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exana pox (Cure Poison)")
        elseif faith == 13 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: utevo gran lux (Great Light)")
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exani hur (Levitate)")
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Rod's maximum damage is on 110%")
        elseif faith == 14 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exevo con (Conjure Arrow)")
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exevo pan (Create Food)")
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: utani hur (Haste)")
        elseif faith == 15 then
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: adevo grav pox (Create Cure Poison Rune)")
            self:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "New spell available: exana flam (Cure Burning)")

(...)

The /data/npc/scripts/guide.lua NPC makes as many server saves as you want during the day:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local SAVE_FREQUENCE = 7200 -- seconds
local saveTimer = SAVE_FREQUENCE

local vocation = {}
local town = {}
local destination = {}
local skillPointsResetStorage = 62492

function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()
    saveTimer = saveTimer - 1
    if saveTimer == 0 then
        saveServer()
        broadcastMessage("Server saved.", MESSAGE_EVENT_ADVANCE)
        saveTimer = SAVE_FREQUENCE
    end                
end

(...)

The /data/npc/scripts/guide.lua NPC can reset points and change title too:
Code:
    -- when says 'TESER' (secret word to reset for free)
    elseif npcHandler.topic[cid] == 0 and msgcontains(msg, "TESER") then
        npcHandler:say("Do you want to {reset} for free?", cid)
        npcHandler.topic[cid] = 10

    -- when says 'reset'
    elseif npcHandler.topic[cid] == 0 and msgcontains(msg, "reset") then
        price = player:getLevel() * player:getLevel() * 10
        if player:getStorageValue(skillPointsResetStorage) ~= 0 and player:getLevel() < 60 then
            npcHandler:say("Since it is your first time asking me that, I'll make it for free! Are you sure?", cid)
        else
            npcHandler:say("It will cost you " .. price .. " gold coins. Are you sure?", cid)
        end
        npcHandler.topic[cid] = 1

    -- when says 'yes' after 'TESER'
    elseif npcHandler.topic[cid] == 10 and msgcontains(msg, "yes") then
        player:setTitleDescription(0)
        if not player:resetAllSkills() then
            npcHandler:say("It looks like you don't need it.", cid)
            npcHandler.topic[cid] = 0
        end

    -- when says 'yes' after 'reset'
    elseif npcHandler.topic[cid] == 1 and msgcontains(msg, "yes") then
        if player:getStorageValue(skillPointsResetStorage) == 1 then
            if player:getLevel() < 60 then
                player:setStorageValue(skillPointsResetStorage, 0)
                player:setTitleDescription(0)
                if not player:resetAllSkills() then
                    npcHandler:say("It looks like you don't need it.", cid)
                    player:setStorageValue(skillPointsResetStorage, 1)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Sorry, but you can't reset for free after reaching level 60.", cid)
            end
        else
            if player:getMoney() > price then
                player:removeMoney(price)
                player:setTitleDescription(0)
                if not player:resetAllSkills() then
                    npcHandler:say("It looks like you don't need it.", cid)
                    player:addMoney(price)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Sorry, but you don't have enough money.", cid)
            end
        end

(...)

    -- when says 'title'
    elseif npcHandler.topic[cid] == 0 and msgcontains(msg, "title") then
        npcHandler:say("I can nominate you as a {mage}, a {supporter}, a {ranger} or a {knight}. Also, I can {remove} it.", cid)
        npcHandler.topic[cid] = 9

    -- when says 'remove'
    elseif npcHandler.topic[cid] == 9 and msgcontains(msg, "remove") then
        player:setTitleDescription(0)
        npcHandler:say("Done!", cid)
        npcHandler.topic[cid] = 0
        npcHandler:releaseFocus(cid)

    -- when says 'mage'
    elseif npcHandler.topic[cid] == 9 and msgcontains(msg, "mage") then
        if player:getSkillLevel(SKILL_INTELLIGENCE) >= 60 then
            player:setTitleDescription(1)
            npcHandler:say("I grant you the mage title!", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        else
            npcHandler:say("You don't have enough intelligence. Come back when you have at least 60 intelligence.", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        end

    -- when says 'supporter'
    elseif npcHandler.topic[cid] == 9 and msgcontains(msg, "supporter") then
        if player:getSkillLevel(SKILL_FAITH) >= 40 or player:getSkillLevel(SKILL_DEFENCE) >= 90 then
            player:setTitleDescription(2)
            npcHandler:say("I grant you the supporter title!", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        elseif player:getSkillLevel(SKILL_FAITH) < 40 and player:getSkillLevel(SKILL_DEFENCE) >= 90 then
            npcHandler:say("You don't have enough faith. Come back when you have at least 40 faith.", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        elseif player:getSkillLevel(SKILL_FAITH) >= 40 and player:getSkillLevel(SKILL_DEFENCE) < 90 then
            npcHandler:say("You don't have enough defence. Come back when you have at least 90 defence.", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        elseif player:getSkillLevel(SKILL_FAITH) < 40 and player:getSkillLevel(SKILL_DEFENCE) < 90 then
            npcHandler:say("You don't have enough defence or faith. Come back when you have at least 90 defence or 40 faith.", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        end

    -- when says 'ranger'
    elseif npcHandler.topic[cid] == 9 and msgcontains(msg, "ranger") then
        if player:getSkillLevel(SKILL_DEXTERITY) >= 90 then
            player:setTitleDescription(3)
            npcHandler:say("I grant you the ranger title!", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        else
            npcHandler:say("You don't have enough dexterity. Come back when you have at least 90 dexterity.", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        end

    -- when says 'knight'
    elseif npcHandler.topic[cid] == 9 and msgcontains(msg, "knight") then
        if player:getSkillLevel(SKILL_STRENGHT) >= 90 then
            player:setTitleDescription(4)
            npcHandler:say("I grant you the knight title!", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        else
            npcHandler:say("You don't have enough strenght. Come back when you have at least 90 strenght.", cid)
            npcHandler.topic[cid] = 0
            npcHandler:releaseFocus(cid)
        end

(...)

Interesting things on config.lua:
Code:
(...)

-- Skill Gain
magicManaGain = 15
vitalityHealthGain = 15
strenghtHealthGain = 0
strenghtCapGain = 5 * 100
resistanceHealthGain = 5
resistanceCapGain = 0 * 100
intelligenceManaGain = 10
faithManaGain = 10
enduranceCapGain = 15 * 100
enduranceHealthGain = 5

-- DUAL WIELDING (75 = 75% of single weapon damage)
allowDualWielding = true
dualWieldingDamageRate = 75

-- SHIELDS (default: 100 resistance, 0 dexterity)
-- Shield formula:    defenseSkill = (RESISTANCE * shieldResistanceFactor / 100) + (DEXTERITY * shieldDexterityFactor / 100);
shieldResistanceFactor = 100
shieldDexterityFactor = 0

-- DISTANCE WEAPONS (default: 100 dexterity, 0 strenght)
-- Spear formula:     attackSkill =     (STRENGHT * spearStrenghtFactor / 100)     + (DEXTERITY * spearDexterityFactor / 100);
-- Bow formula:     attackSkill =     (STRENGHT * bowStrenghtFactor   / 100)     + (DEXTERITY * bowDexterityFactor   / 100);
spearDexterityFactor = 100
spearStrenghtFactor = 0
bowDexterityFactor = 75
bowStrenghtFactor = 50

-- WANDS and RODS (default: 0 int, 0 faith, 0 magic)
-- Rod formula:     maxDamage = maxDamage     + (maxDamage *           (FAITH - 8) / 100)     * (rodFaithFactor / 100)     + (MAGIC * magicWandRodFactor / 100);
-- Wand formula:     maxDamage = maxDamage     + (maxDamage * (INTTELIGENCE - 8) / 100)     * (wandIntFactor  / 100)     + (MAGIC * magicWandRodFactor / 100);
rodFaithFactor = 200
wandIntelligenceFactor = 100
magicWandRodFactor = 0

(...)
 
Last edited:

killer990

New Member
Joined
Jun 1, 2012
Messages
8
Reaction score
4
Location
Poland
Its nice, but even after alot of combination that I change to increase max skill limit I'm always get same result. When I hit 202 skill level I can invest skillpoint into any skill, but with no effect (ex. 202 Vitality and when I invest more points into it then I lose points, but skill are still 202 and don't give me more health or anything) But with Equipment using <Addskill> I was reach 65000 skill level and it was working (more dmg) so its not ClientSide issue. Sadly Equipment attribute don't working with health, mana and cap skill after add for example SkillFist ;/
 
OP
Togu

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
Its nice, but even after alot of combination that I change to increase max skill limit I'm always get same result. When I hit 202 skill level I can invest skillpoint into any skill, but with no effect (ex. 202 Vitality and when I invest more points into it then I lose points, but skill are still 202 and don't give me more health or anything) But with Equipment using <Addskill> I was reach 65000 skill level and it was working (more dmg) so its not ClientSide issue. Sadly Equipment attribute don't working with health, mana and cap skill after add for example SkillFist ;/

Look in /data/XML/vocations.xml, change all 1.1 values for 2.0:
Code:
(...)

<vocation id="0" clientid="0" name="None" description="none" gaincap="10" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="1.5" attackspeed="2000" basespeed="200" soulmax="200" gainsoulticks="120" fromvoc="0">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
        <skill id="0" multiplier="1.1" />
        <skill id="1" multiplier="1.1" />
        <skill id="2" multiplier="1.1" />
        <skill id="3" multiplier="1.1" />
        <skill id="4" multiplier="1.1" />
        <skill id="5" multiplier="1.1" />
        <skill id="6" multiplier="1.1" />
    </vocation>

(...)

The equipment attributes I can't remember now why it's not working (I don't even remember of that system on the server lol kkkk).

What I know is that all weapons with bleeding effect has to be added to /data/weapons/weapons.xml, like that:
Code:
<melee id="2377" level="20" unproperly="1" script="bleeding_effect.lua" /> <!-- Two Handed Sword -->

And I think every equipment that you want to change stats immediatly on the moment that it is equipped needs to be added in /data/movements/movements.xml, something like that:
Code:
<movevent event="Equip" itemid="2195" slot="feet" function="onEquipItem" />
<movevent event="DeEquip" itemid="2195" slot="feet" function="onDeEquipItem" />
 
Last edited:

killer990

New Member
Joined
Jun 1, 2012
Messages
8
Reaction score
4
Location
Poland
I tryied values from 0.0 up to 5.0 in Vocations.xml, but after change value to for ex. 2.0 in any skills then my max skill what I can get by points is 36 and after that I can invest points without any change in values or effects.
Also in movements.xml work only items what give attributes to dmg skill, so items what give more Vitality after +1 attribute with write into movements.xml are not give any health ;/
 
OP
Togu

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
I open the project, it closes alone
Can you be more specific?
If you click on an .exe and it suddenly closes, try to open it through Command Prompt to see the messages. It probably didn't connect to your database and closed.
 

Liwx

New Member
Joined
Jul 22, 2018
Messages
2
Reaction score
0
I have the same problem here, it closes after the message "Initializing gamestate" but doesn't display errors in the prompt.
 
OP
Togu

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
I have the same problem here, it closes after the message "Initializing gamestate" but doesn't display errors in the prompt.
I don't know what problem it can be... Check database, DLLs, world map, ip, user, password, if your machine is x86 or x64, try recompiling, try run as administrator.
 

gicu0770

Well-Known Member
Joined
Feb 26, 2011
Messages
72
Reaction score
11
WoW that's insane ! Good job!
 
Last edited:
OP
Togu

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
I open the project, it closes alone
I have the same problem here, it closes after the message "Initializing gamestate" but doesn't display errors in the prompt.
It looks like @nokturno found the solution:
"my processor is not that new so i needed to change this before compiling:"
34469

And remember: after compiling, use the dlls generated with the compilation.
 
Top