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

Lua Canary, Dodge script like this one

Typeczek

Member
Joined
Feb 7, 2018
Messages
44
Reaction score
10
Hi, can someone help me to create DODGE/REFLECT script base on player stats like this one below?

Lua:
-- Define the item ID for the item that grants Crit
local addCritItem = Action()
local CritItemID = 32703
-- Hook into the item use event
function addCritItem.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local currentskilld = player:getSkillLevel(8)
    -- Check if the used item has the specified ID
    if item:getId() == CritItemID then
            player:setSkillLevel(8, currentskilld + 2)
            item:remove(1)

        -- Print a message to the player
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You gained permament 2% critical damage!")


        -- Save the player's data to persist the Crit change
        player:save()
    end
end

addCritItem:id(32703)
addCritItem:register()
 
local currentskilld = player:getSkillLevel(9)?
SKILL_NONE = -1,
SKILL_FIST = 0,
SKILL_CLUB = 1,
SKILL_SWORD = 2,
SKILL_AXE = 3,
SKILL_DISTANCE = 4,
SKILL_SHIELD = 5,
SKILL_FISHING = 6,
SKILL_CRITICAL_HIT_CHANCE = 7,
SKILL_CRITICAL_HIT_DAMAGE = 8,
SKILL_LIFE_LEECH_CHANCE = 9,
SKILL_LIFE_LEECH_AMOUNT = 10,
SKILL_MANA_LEECH_CHANCE = 11,
SKILL_MANA_LEECH_AMOUNT = 12,
SKILL_MAGLEVEL = 13,
SKILL_LEVEL = 14,
 
-- Hazard system
toogleHazardSystem = true
hazardCriticalInterval = 2000
hazardCriticalChance = 750
hazardCriticalMultiplier = 25
hazardDamageMultiplier = 200
hazardDefenseMultiplier = 0
hazardDodgeMultiplier = 85
hazardPodsDropMultiplier = 87
hazardPodsTimeToDamage = 2000
hazardPodsTimeToSpawn = 4000
hazardExpBonusMultiplier = 2
hazardLootBonusMultiplier = 2
hazardPodsDamage = 5
hazardSpawnPlunderMultiplier = 25

check where in c++ is hazarddodgemultiplier
 
Or maybe how to recreate this scripts to make them work. I've found some dodge script, it adds to storage but the section with dmg doesnt work so i can have 100% but i cant dodge anything
 

Attachments

Or maybe how to recreate this scripts to make them work. I've found some dodge script, it adds to storage but the section with dmg doesnt work so i can have 100% but i cant dodge anything
From what it looks like, it's doing a math.random(1000) So if your dodge storage is 100, which is multiplied by 3, it'd only be a 30% chance of dodge, at best.
 
Back
Top