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

Formułka na SD

gameover99097

Banned User
Joined
Nov 19, 2010
Messages
270
Reaction score
4
Witam jest ktoś w posiadaniu jakiejś dobre formułki na SD? tak żeby hity prawnie się nie różniły np. 700-750 <- i tak by było git.
Bo ja mam np. 300-500 ; //
 
Code:
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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -70, -1, -70, 6, 6, 5, 8)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Mam takie coś bawiłem się z tym i nie dało rady możesz mi wyjaśnić które są od czego?
 
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -70, -1, -70, 6, 6, 5, 8)

z tymi liczbami sie pobaw
 
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -70, -1, -70, 6, 6, 5, 8)

z tymi liczbami sie pobaw

no w koncu mnie cos rozbawilo dzisiaj :D

@gameo..
tu masz zmienne:
Code:
setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]])
gdzie type = COMBAT_FORMULA_LEVELMAGIC
mina = -1... itd

a to jest formula:
Code:
				case FORMULA_LEVELMAGIC:
				{
					min = (int32_t)((player->getLevel() / minl + player->getMagicLevel() * minm) * 1. * mina + minb);
					max = (int32_t)((player->getLevel() / maxl + player->getMagicLevel() * maxm) * 1. * maxa + maxb);
					if(minc && std::abs(min) < std::abs(minc))
						min = minc;

					if(maxc && std::abs(max) < std::abs(maxc))
						max = maxc;

					player->increaseCombatValues(min, max, params.useCharges, true);
					return true;
				}
reszte znajdziesz w combat.cpp ~75
 
no w koncu mnie cos rozbawilo dzisiaj :D

@gameo..
tu masz zmienne:
Code:
setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]])
gdzie type = COMBAT_FORMULA_LEVELMAGIC
mina = -1... itd

a to jest formula:
Code:
				case FORMULA_LEVELMAGIC:
				{
					min = (int32_t)((player->getLevel() / minl + player->getMagicLevel() * minm) * 1. * mina + minb);
					max = (int32_t)((player->getLevel() / maxl + player->getMagicLevel() * maxm) * 1. * maxa + maxb);
					if(minc && std::abs(min) < std::abs(minc))
						min = minc;

					if(maxc && std::abs(max) < std::abs(maxc))
						max = maxc;

					player->increaseCombatValues(min, max, params.useCharges, true);
					return true;
				}
reszte znajdziesz w combat.cpp ~75

Po ekspertowsku.
 
Nie lepiej zrobić inną formułę?
Z mojego serva:

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 = level / 4.4 + maglevel * 5.8 + 32
local max = level / 4.4 + maglevel * 8.0 + 48
return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 
@potar
porownaj wzory, ten co wstawiles i ten wyzej.. te same? :P
proste prawda? wystarczy zrozumiec. Gosc zadal pytanie i dostal odp. Sie nauczy i bedzie lepszego otka od Ciebie ;)
 
Ja SD konfigurowałem pod swojego otka, więc gadanieo "lepsze" nie ma co, robiłem to do użytku własnego biorąc pod uwagę lvl / mlvl, po prostu inna formuła.
 
tja.. szkoda. Nawet nie przeczytales dobrze tego co napisalem, nie mowiac o tym ze nie porownales wogole twojego skryptu z formula napisana w c++
 
Back
Top