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

increasePhysicalDamage ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I need an function for spell : increasePhysicalDamage,
if i put example increasePhysicalDamage(cid, 50) - that will increase caster physical damage (melee) by 50%.

Thanks.
 
can you write Cyko for me that script:
If caster release spell, the caster physical damage increase by 50%,
and his mana will burn 10/s, after caster get mana = 0 or write again spell name, the spell go down.
TFS 0.3.5pl1

Please my master, for you its like 5 minutes working...
 
Last edited:
in weapons.cpp search for multiplier formula
and just add to it bonus

in weapon player check you can
before return damageModifier sth like
get that value(can be storage)
damageModifier +=(int32_t) damageModifier*thatvalue;
and set can be done even in lua by function setbonus(cid, value) setplayerstoragevalue(cid, someconstantstoragenumber, value) end
 
Code:
function onStatsChange(cid, attacker, type, combat, value)
	if type == 1 then
		if combat == 1 then
			if getPlayerStorageValue(attacker, 55000) == 1 then
				value = (value/2)
				doTargetCombatHealth(attacker, cid, 1, value, value, 255)
			end
		end	
	end
return true
end
I do not know if it will work but all you have to do is set the player that is attacking storage value to 1 and he will hit 50% of his total damage.
You have to make a spell that can sets the storage value and a timed event to remove it, you may also need to make an onLogin check to see if his value is set to 1 and if so remove the value!
 
if you wont use anything else(and wont allow to recast befor it runs out) just setstorage to that value and addEvent to zore storage(and zero storage onLogin)

but new condition would be nice I guess
 
Last edited:
I didn't test it but it was sure that error will appear.
Since onStatsChange will also be triggered if the damage from "doTargetCombatHealth(attacker, cid, 1, value, value, 255)"
You need to change the damagetype which in this case is 1 (3rd parameter) to something else and make it just return true on that combat type instead of doing another damage
 
Back
Top