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

Please help me know more

Shiko Erye

LUA - Scripter
Joined
Dec 7, 2010
Messages
106
Reaction score
12
I am creating a spell, but when I select the "combat [type] damge"
ah, srr. My server have 13 types damage but i can't 4 types is "poison, bug, dragon & fight", when i use it, my server will down.
Someone can tell me why when i use spell have 1 in 4 types damage my server will down?
And how to fix?

7799d1294485154-what-worng-untitled.png


And can i create new type damage? i need type ghost for finish my server


Srr for my bad english
 
Last edited:
LUA:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, FIGHTINGDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 112)

arr1s = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

local dynpun1 = createCombatArea{
{1, 0, 0}, 
{0, 2, 0}, 
{0, 0, 0}, 
}

local dynpun2 = createCombatArea{
{0, 0, 0}, 
{0, 2, 0}, 
{0, 0, 1}, 
}


local dynpun3 = createCombatArea{
{0, 0, 0}, 
{1, 2, 0}, 
{0, 0, 0}, 
}


local dynpun4 = createCombatArea{
{0, 0, 1}, 
{0, 2, 0}, 
{0, 0, 0}, 
}


local dynpun5 = createCombatArea{
{0, 0, 0}, 
{0, 2, 0}, 
{0, 1, 0}, 
}

local area1 = createCombatArea(arr1s)
setCombatArea(combat1, area1)

local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end

function onCastSpell(cid, var)

	doCreatureSay(cid, "DYNAMIC PUNCH!", TALKTYPE_MONSTER)
	if getPlayerStorageValue(cid, 3) >= 1 then
	doSendAnimatedText(getThingPos(cid), "MISS", 215)
	setPlayerStorageValue(cid, 3, -1)
	return true
	end
	if getPlayerStorageValue(cid, 5) >= 1 then
		if math.random(1,100) <= 33 then
		doSendAnimatedText(getThingPos(cid), "SELF HIT", 180)
			if isPlayer(getCreatureTarget(cid)) then
			huah = getPlayerLevel(getCreatureTarget(cid))
			else
			huah = getPlayerLevel(getCreatureMaster(getCreatureTarget(cid)))
			end
		local levels = huah
		doTargetCombatHealth(getCreatureTarget(cid), cid, COMBAT_PHYSICALDAMAGE, -(math.random((levels*3),(levels*5))), -((math.random((levels*3),(levels*5))+10)), 3)
		return true
		end
	end
	local function punch(params)
	if isCreature(getCreatureTarget(params.cid)) then
	if isMonster(params.cid) then
	doAreaCombatHealth(getCreatureSummons(cid)[1], null, getThingPos(getCreatureTarget(params.cid)), params.ar, 0, 0, 17)
	else
	end
	else
	end
end
local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)
		addEvent(punch, 50, {cid = cid, ar = dynpun1})
		addEvent(punch, 150, {cid = cid, ar = dynpun2})
		addEvent(punch, 450, {cid = cid, ar = dynpun3})
		addEvent(punch, 550, {cid = cid, ar = dynpun4})
		addEvent(punch, 750, {cid = cid, ar = dynpun5})
return TRUE
end
here
 
in original server of xtibia.com fightingdamage, poisondamage, bugdamage, dragondamage can use easy
when i change something i can't use this type:(
 
Back
Top