AgeisCZSK wrote: ↑Wed Jan 03, 2024 6:30 am
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>6812</ID>
<Description>"Add Fire Damage"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
if syntaxcheck then return end
[ENABLE]
AddBoostsToPlayer("CharacterWeaponDamage(1d20,Fire)")
[DISABLE]
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatTable>
Any idea how to solve it, to give that stat only on equiped weapon?
I will be very grateful if someone help.
(
I assume that you are using Zanzer's table)
For a standard weapon boost, you can use the ApplyStatusToWeapon(Status) or AddPassiveToWeapon(PassiveID) functions.
if you want to apply a customized boosts to your equipped weapon then this should work:
Code: Select all
{$lua}
if syntaxcheck then return end
local item = GetEquippedWeapon()
local boosts = "WeaponDamage(1d20,Fire)"
[ENABLE]
-- AddBoosts(Object, Boosts, SourceID, Cause)
AddBoosts(item , boosts, 0, 0)
[DISABLE]
-- RemoveBoosts(Object, Boosts, RemoveOnlyFirstDescMatch, SourceID, Cause)
RemoveBoosts(item , boosts, 0, 0, 0)
And for the Full Monty insane weapon boost:
Code: Select all
{$lua}
if syntaxcheck then return end
local dmgType = {
"Bludgeoning"
,"Piercing"
,"Slashing"
,"Acid"
,"Cold"
,"Fire"
,"Force"
,"Lightning"
,"Necrotic"
,"Poison"
,"Psychic"
,"Radiant"
,"Thunder"
}
local dmgRoll = "12d12"
local dmgBonus = "20"
local wpnEnch = "20"
-- Combine everything to the AddBoosts string.
local boost = "WeaponProperty(Magical);WeaponEnchantment(".. wpnEnch .. ");"
for t = 1, #dmgType do
boost = boost .. "WeaponDamage(" .. dmgRoll .."+" .. dmgBonus .. ", " .. dmgType[t] .. ");"
end
-- Get your weapon uuid:
local item = GetEquippedWeapon()
[ENABLE]
-- AddBoosts(Object, Boosts, SourceID, Cause)
AddBoosts(item , boost, 0, 0)
[DISABLE]
-- RemoveBoosts(Object, Boosts, RemoveOnlyFirstDescMatch, SourceID, Cause)
RemoveBoosts(item , boost, 0, 0, 0)