• 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!

Solved Knight And Paladin Bug with attack dmg

vvglex

New Member
Joined
Jan 2, 2015
Messages
162
Reaction score
2
Hey i have bug with paladins and knights attack dmg ....

sometime they hit like 200 and then suddely 1000 and the attack is never stable they go from 100-1000 every attack how can i make it stable so they hit like 600-800 everytime?
@Limos
 
Which server do you use? Post your config.lua.
i use tfs 0.4

Code:
accountManager = false
    namelockManager = true
    newPlayerChooseVoc = true
    newPlayerSpawnPosX = 1000
    newPlayerSpawnPosY = 1000
    newPlayerSpawnPosZ = 7
    newPlayerTownId = 1
    newPlayerLevel = 8
    newPlayerMagicLevel = 0
    generateAccountNumber = false


    comboTime = 100
      comboMembers = 2
        comboFriends = 3
        comboFriendsClearTime = 5 * 60 * 1000
        comboFriendsClearInterval = 1 * 60 * 1000
        comboShowAnimation = 1 


    redSkullLength = 30 * 24 * 60 * 60
    blackSkullLength = 45 * 24 * 60 * 60
    dailyFragsToRedSkull = 15
    dailyFragsToBlackSkull = dailyFragsToRedSkull
    dailyFragsToBanishment = dailyFragsToRedSkull
    blackSkulledDeathHealth = 40
    blackSkulledDeathMana = 0
    useBlackSkull = false
    useFragHandler = true
    advancedFragList = false


    notationsToBan = 3
    warningsToFinalBan = 4
    warningsToDeletion = 5
    banLength = 7 * 24 * 60 * 60
    killsBanLength = 7 * 24 * 60 * 60
    finalBanLength = 30 * 24 * 60 * 60
    ipBanishmentLength = 1 * 24 * 60 * 60
    broadcastBanishments = true
    maxViolationCommentSize = 200
    violationNameReportActionType = 2
    autoBanishUnknownBytes = false


    worldType = "open"
    protectionLevel = 100
    pvpTileIgnoreLevelAndVocationProtection = true
    pzLocked = 20 * 1000
    huntingDuration = 60 * 1000
    criticalHitChance = 7
    criticalHitMultiplier = 1
    displayCriticalHitNotify = true
    removeWeaponAmmunition = false
    removeWeaponCharges = false
    removeRuneCharges = false
    whiteSkullTime = 1 * 60 * 1000
    noDamageToSameLookfeet = false
    showHealingDamage = true
    showHealingDamageForMonsters = false
    fieldOwnershipDuration = 5 * 1000
    stopAttackingAtExit = false
    oldConditionAccuracy = false
    loginProtectionPeriod = 10 * 1000
    deathLostPercent = 10
    stairhopDelay = 2 * 1000
    pushCreatureDelay = 2 * 1000
    deathContainerId = 1987
    gainExperienceColor = 215
    addManaSpentInPvPZone = true
    squareColor = 0
    allowFightback = true


    worldId = 0
    ip = "213.66.159.131"
    bindOnlyConfiguredIpAddress = false
    loginPort = 7171
    gamePort = 7172
    adminPort = 7171
    statusPort = 7171
    loginTries = 10
    retryTimeout = 5 * 1000
    loginTimeout = 60 * 1000
    maxPlayers = 1000
    motd = "Welcome to Swevo 8.60!"
    displayOnOrOffAtCharlist = false
    onePlayerOnlinePerAccount = false
    allowClones = false
    serverName = "Swevo"
    loginMessage = "Welcome to Swevo 8.60!"
    statusTimeout = 5 * 60 * 1000
    replaceKickOnLogin = true
    forceSlowConnectionsToDisconnect = false
    loginOnlyWithLoginServer = false
    premiumPlayerSkipWaitList = false


    sqlType = "mysql"
    sqlHost = "127.0.0.1"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = "Ad74THC74"
    sqlDatabase = "otserver"
    sqlFile = "mysql.sql"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "sha1"

    deathListEnabled = true
    deathListRequiredTime = 1 * 60 * 1000
    deathAssistCount = 19
    maxDeathRecords = 5


    ingameGuildManagement = false
    levelToFormGuild = 100
    premiumDaysToFormGuild = 0
    guildNameMinLength = 4
    guildNameMaxLength = 20


    highscoreDisplayPlayers = 15
    updateHighscoresAfterMinutes = 60


    buyableAndSellableHouses = true
    houseNeedPremium = true
    bedsRequirePremium = true
    levelToBuyHouse = 250
    housesPerAccount = 1
    houseRentAsPrice = false
    housePriceAsRent = false
    housePriceEachSquare = 1000
    houseRentPeriod = "never"
    houseCleanOld = 0
    guildHalls = false


    timeBetweenActions = 200
    timeBetweenExActions = 1000
    hotkeyAimbotEnabled = true


    mapName = "map.otbm"
    mapAuthor = "Komic"
    randomizeTiles = true
    storeTrash = true
    cleanProtectedZones = true
    mailboxDisabledTowns = "-1"


    defaultPriority = "high"
    niceLevel = 5
    coresUsed = "-1"


    optimizeDatabaseAtStartup = true
    removePremiumOnInit = true
    confirmOutdatedVersion = false


    formulaLevel = 8.0
    formulaMagic = 3.0
    bufferMutedOnSpellFailure = false
    spellNameInsteadOfWords = false
    emoteSpells = false


    allowChangeOutfit = true
    allowChangeColors = true
    allowChangeAddons = true
    disableOutfitsForPrivilegedPlayers = false
    addonsOnlyPremium = true


    dataDirectory = "data/"
    bankSystem = true
    displaySkillLevelOnAdvance = false
    promptExceptionTracerErrorBox = true
    separateViplistPerCharacter = false
    maximumDoorLevel = 500
    maxMessageBuffer = 4


    saveGlobalStorage = true
    useHouseDataStorage = false
    storePlayerDirection = false

    checkCorpseOwner = true
    monsterLootMessage = 3
    monsterLootMessageType = 25


    ghostModeInvisibleEffect = false
    ghostModeSpellEffects = true


    idleWarningTime = 14 * 60 * 1000
    idleKickTime = 15 * 60 * 1000
    expireReportsAfterReads = 1
    playerQueryDeepness = 2
    maxItemsPerPZTile = 0
    maxItemsPerHouseTile = 0


    freePremium = true
    premiumForPromotion = true


    blessingOnlyPremium = true
    blessingReductionBase = 30
    blessingReductionDecreament = 5
    eachBlessReduction = 8


    experienceStages = true
    rateExperience = 5.0
    rateExperienceFromPlayers = 0.5
    rateSkill = 30.0
    rateMagic = 15.0
    rateLoot = 4.5
    rateSpawn = 3


    rateMonsterHealth = 1.0
    rateMonsterMana = 1.0
    rateMonsterAttack = 1.0
    rateMonsterDefense = 1.0


    minLevelThresholdForKilledPlayer = 0.9
    maxLevelThresholdForKilledPlayer = 1.1


    rateStaminaLoss = 1
    rateStaminaGain = 3
    rateStaminaThresholdGain = 12
    staminaRatingLimitTop = 41 * 60
    staminaRatingLimitBottom = 14 * 60
    rateStaminaAboveNormal = 1.5
    rateStaminaUnderNormal = 0.5
    staminaThresholdOnlyPremium = true


    experienceShareRadiusX = 30
    experienceShareRadiusY = 30
    experienceShareRadiusZ = 1
    experienceShareLevelDifference = 2 / 3
    extraPartyExperienceLimit = 20
    extraPartyExperiencePercent = 5
    experienceShareActivity = 2 * 60 * 1000


    globalSaveEnabled = false
    globalSaveHour = 8
    shutdownAtGlobalSave = true
    cleanMapAtGlobalSave = false


    deSpawnRange = 2
    deSpawnRadius = 50


    maxPlayerSummons = 2
    teleportAllSummons = false
    teleportPlayerSummons = false

    ownerName = ""
    ownerEmail = "@otland.net"
    url = "http://otland.net/"
    location = "Europe"
    displayGamemastersWithOnlineCommand = false

    adminLogsEnabled = false
    displayPlayersLogging = true
    prefixChannelLogs = ""
    runFile = ""
    outLogName = ""
    errorLogName = ""
    truncateLogsOnStartup = false

@Limos you know why?
 
Last edited by a moderator:
You can also use Lua scripts for the weapons (data/weapons), then make a calculation based on skill and attack.
Code:
function onGetFormulaValues(cid, level, skill, attack, factor)
     min = 0.04 * attack * skill + (level/5)
     max = 0.06 * attack * skill + (level/5)
     return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
 
Last edited:
You can also use Lua scripts for the weapons (data/weapons), then make a calculation based on skill and attack.
Code:
function onGetFormulaValues(cid, level, skill, attack, factor)
     min = 0.04 * attack * skill + (level/5)
     max = 0.06 * attack * skill + (level/5)
     return -min, -max
end
oh okay cool where do i place it?
 
No, create a new weapon Lua script like the ones in data/weapons/scripts, then change the setCombatFormula line to what I posted.
Then in weapons.xml, change the lines of the weapons that should work with that script so it uses that Lua script.
 
No, create a new weapon Lua script like the ones in data/weapons/scripts, then change the setCombatFormula line to what I posted.
Then in weapons.xml, change the lines of the weapons that should work with that script so it uses that Lua script.
so i maked a script in /weapons/scripts called attack.lua and pasted in
Code:
function onGetFormulaValues(cid, level, skill, attack, factor)
min = 0.04 * attack * skill + (level/5)
max = 0.06 * attack * skill + (level/5)
return -min, -max
end

is that right?

No, create a new weapon Lua script like the ones in data/weapons/scripts, then change the setCombatFormula line to what I posted.
Then in weapons.xml, change the lines of the weapons that should work with that script so it uses that Lua script.
it does still hit random sometimes it goes to 1000 then sometimes at 70
 
Last edited by a moderator:
so i maked a script in /weapons/scripts called attack.lua and pasted in
Code:
function onGetFormulaValues(cid, level, skill, attack, factor)
min = 0.04 * attack * skill + (level/5)
max = 0.06 * attack * skill + (level/5)
return -min, -max
end

is that right?


it does still hit random sometimes it goes to 1000 then sometimes at 70
That's a callback function, not a weapon script, create a new weapon script (like the ones in data/weapons/scripts) and change the setCombatFormula line to what I posted.
Also don't forget to change it in weapons.xml so the weapons use that Lua script.
 
That's a callback function, not a weapon script, create a new weapon script (like the ones in data/weapons/scripts) and change the setCombatFormula line to what I posted.
Also don't forget to change it in weapons.xml so the weapons use that Lua script.
does you know a good weapon script that can work for all weapons ? becouse i want to change so all weapons hit stable also distance

That's a callback function, not a weapon script, create a new weapon script (like the ones in data/weapons/scripts) and change the setCombatFormula line to what I posted.
Also don't forget to change it in weapons.xml so the weapons use that Lua script.
or can i edit the default thing ? that the weapons uses right now
 
Remove the distance effect.
only the distance effect? or what should it be for a basic meele weapon?
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -1)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end
 
Remove the poison condition, also add this.
Code:
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
thanks should it be like this now?
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
function onGetFormulaValues(cid, level, skill, attack, factor)
     min = 0.04 * attack * skill + (level/5)
     max = 0.06 * attack * skill + (level/5)
     return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -1)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end

should this with posion be there?
Code:
local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -1)
setCombatCondition(combat, condition)
 
For damage
Code:
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
And remove the poison condition.
 
Back
Top