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

RevScripts Vip Wand -Dmg increase with level and ML TFS1.2 Item.srv

owneddye

New Member
Joined
Feb 9, 2024
Messages
2
Reaction score
0
Hi! looking for a way to implement a vip wand that both sorcerers and druids can use, but not with a fixed dmg like regular wands (min max on items.srv)
But one that its damage increases over time, with level and magic level for example
Level 8-50 (dmg 150-250)
lvl 50-100 (dmg 250-350)
lvl 100-200 (dmg 350-500)
lvl 200-300 (cmg 500-700)

is it possible ? and if so, how?
I run a 8.0 TFS 1.2
Thank you
 
Implement it as distance weapon with script. Similar to viper star (remove break chance):

Then put there script ex.:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_GREENSTAR)
combat:setParameter(COMBAT_PARAM_BLOCKSHIELD, false)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, false)

function onGetFormulaValues(player, level, magicLevel)
	if level < 8 then
		return 0, 0
	elseif level < 50 then
		return -150, -250
	elseif level < 100 then
		return -250, -350
	elseif level < 200 then
		return -350, -500
	elseif level < 300 then
		return -500, -700
	else -- for level over 300
		return -700, -900
	end
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onUseWeapon(player, variant)
	return combat:execute(player, variant)
end

You can also edit onGetFormulaValues to use magic lvl like ex. rage of the skies spell:
Lua:
function onGetFormulaValues(player, level, magicLevel)
	local min = (level / 5) + (magicLevel * 4) + 75
	local max = (level / 5) + (magicLevel * 10) + 150
	return -min, -max
end
 
How can i implement this on a .SRV (my server doesnt use item.xml)
Post automatically merged:

The format for viper star is as it goes
items.srv (NOTXML)

TypeID = 7366
Name = "a viper star"
Flags = {Cumulative,Take,Weapon,MultiUse}
Attributes = {Weight=200,WeaponType=DISTANCE,,Range=7,MissileEffect=20,Attack=28}
 
How can i implement this on a .SRV (my server doesnt use item.xml)
Post automatically merged:

The format for viper star is as it goes
items.srv (NOTXML)

TypeID = 7366
Name = "a viper star"
Flags = {Cumulative,Take,Weapon,MultiUse}
Attributes = {Weight=200,WeaponType=DISTANCE,,Range=7,MissileEffect=20,Attack=28}
items.srv is different, please search in your combat.cpp wand or rod
 
Back
Top