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

I need Script When I attack by Sword it make mas san effect

elsaba

Banned User
Joined
Aug 11, 2009
Messages
174
Reaction score
0
Location
egypt
Hello Otlanders

Please Help With Script

I need Script When I attack by Sword it make mas san effect In 8 Area of the player With chance

Help me Please


Thx men



I Will Rep
 
Last edited:
well you can try this go throught the script to fincd the configurations commented
in wepoons->scripts create new test.lua
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)

local area = {  -- play in this to change the area '3' is the player  positon '1' is the effect positions
	{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
	{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
	{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
	{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1},
	{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
	{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
	{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}
}

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)

function onGetFormulaValues(cid, level, skill, attack, factor)  -- play in this to change attack area damadge
	local fact = 1
	local min = ((10 + skill )/ fact) + (level / fact)
	local max = ((20 + skill )/ fact) + (level / fact)
	return -min,-max
end

setCombatCallback(combat2, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local areaa = createCombatArea(area)
setCombatArea(combat2, areaa)

function onUseWeapon(cid, var)
	local min = 500				-- min damadge (you could make formula of this)
	local max = 600				-- max damadge (you could make formula of this)
	local chance = 20			--chance in 
	
	local ret = doCombat(cid, combat, var)
	if(not ret) then
		return false
	end
	
	if math.random(1,100) <= chance then
		doCombat(cid, combat2, var)
	end
	
	return ret
end


in weapons.xml paste
XML:
<melee id="your weapon id"  event="script" value="test.lua"/>
 
Back
Top