• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Player vs player Damage

were can i get a hold of combat.ccp ? ;)
Post automatically merged:

If you can help me fix this problem am willing to pay!
 
Last edited:
I can’t help atm don’t pay too much for it. If you just want the half damage gone it’s almost no work
 
managed to fix it like this


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

function onGetFormulaValues(cid, level, maglevel)
local min = -(2.8 * level + 50)
local max = -(5.5 * level + 100)
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
local target = variantToNumber(var)

if target > 0 and isPlayer(target) then
local level = getPlayerLevel(cid)
local min = -(2.8 * level + 50) * 2
local max = -(3.5 * level + 100) * 2
doTargetCombatHealth(cid, target, COMBAT_DEATHDAMAGE, min, max, CONST_ME_MORTAREA)
return true
else
-- Normal damage calculation for monsters or invalid target
return doCombat(cid, combat, var)
end
end
Post automatically merged:

just made the spell that you usualy pvp with that kind of script so it works now :)
 
Well the best would be youre suggestion. But since im not capabel to do that this will do for now.
Post automatically merged:

So so if you have time in the near future to help me with this shoot me a msg :) ill pay you for the trubble.
 

Similar threads

Replies
0
Views
271
Back
Top