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

Weapon Slayers?

Can you post a small example? i dont want you to make a script for me like you did last time, i bet you have better things to do

Just want to see how it looks like so i can work from there

You can just open the script for poison arrow.lua or other default weapon scripts.

Then you can do something like:
Code:
local extraDamage = 0
if getCreatureName(cid) == "orc" then

end
 
Can you post a small example? i dont want you to make a script for me like you did last time, i bet you have better things to do

Just want to see how it looks like so i can work from there

Welcome to Otland! Glad to see another new user who actually wants some examples to build and learn from, instead of just asking for someone to just make a script for them! I'll love watching you progress in skill. Do me a favor, add an Avatar for yourself, it will help... Also, if ever you have some problems with some scripts and can't find the help you need, private message me and when I get the chance I will try to help you :D
 
Welcome to Otland! Glad to see another new user who actually wants some examples to build and learn from, instead of just asking for someone to just make a script for them! I'll love watching you progress in skill. Do me a favor, add an Avatar for yourself, it will help... Also, if ever you have some problems with some scripts and can't find the help you need, private message me and when I get the chance I will try to help you :D

Hello codinblack thank for the welcome :)))), okey i will add avatar haha.

i find scripting kinda hard for me, but i wont give up


ooo forgot to post the tfs, my bad)

The Forgotten Server - Version 0.3 (Crying Damson).
 
Try this out:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)

local monsters = {"Orc", "Orc Warrior", "Rat"}
function onGetFormulaValues(cid, level, skill, attack, element, factor)
    local target, extraDamage = getCreatureTarget(cid), 0
    if target and isInArray(monsters, getCreatureName(target)) then
        extraDamage = 40
    end

    local levelTotal, formula = level / 5, 0.0408
    local normal, elemental = -(skill * attack * formula + levelTotal + extraDamage), math.ceil((skill * element * formula + levelTotal))
    return normal/2, normal, -math.random(elemental/2, elemental)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end
 
Ya know I don't even copy the code anymore I just save the whole dam page :)
That goes in weapons\scripts
 
Ya know I don't even copy the code anymore I just save the whole dam page

I do that sometimes too, but that's only because I'm not adding the code immediately, and I suffer from complete paranoia, wouldn't want to go back to the page and the author remove the code...

Yasmin, nice avatar :D
 
Back
Top