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

Enchanting abilitys to weapons

Werewolf

Forbidden Ascension
Joined
Jul 15, 2012
Messages
886
Reaction score
123
Alright, SO basically i'd like a system were you can use a crystal or gem, and it will give the weapon you use it on, a Permanent secondary ability For example

Double hit: 20% chance to attack twice.
Life steal: Drains a % of damage caused
sweep: Causes a small 3 hit aoe.

Im capable of making weapons have these attributes by making the weapons run on scripts in weapons.xml, But i have no idea how to make a Crystal in-game change the script that a weapon in Weapons.xml loads off of.

All i need is an example of a crystal that changes the weapons script in Weapons.xml, and i'd be able to make all the secondary ability's.

Please, would anyone be kind enough to give me an example?



The Forgotten Server v0.3.7 (Crying Damson)
Version 9.6
 
Last edited:
you must add storage/description in your gem and then make weapons or creaturescript check this for possibles effects
i'm not scripter so i cant help much.. and people need to know your tfs version and protocol
 
You could use the enchantment system to make this happen, I'd write it for you but I don't know where to get that distro.
 
Pretty easy honestly, all you've gotta do is when you use the crystal on the item, do something like
Code:
doItemSetAttribute(item, "doublehit", 1)
then in the weapons script use if
Code:
getItemAttribute(item, "doublehit") == 1 then
~~~~Script~~~~

Or if you wanted to make it so that you can build up enchantments/percentages, for each stone and specific stones, you can do
Code:
doItemSetAttribute(item, "doublehit", getItemAttribute(item, "doublehit") + 1)
and then in the weapons script do,
Code:
local doublehitchance = math.random(1,100) if getItemAttribute(item, "doublehit") <= doublehitchance then
~~~~~script~~~~~

Hope I was able to assist you.
 
Back
Top