Hello, I need script axe which will have bonus to STR (or attack etc...) when used by minotaur and negative values when used by any other race. Model used should be Norja axe
could you help pls ?
weapon script help pls
Re: weapon script help pls
Geez, this was from a while ago... have you figured this one out yet??
Im guessing to use a combo of onEquip item hooks and then champ:getRace... with appropriate bonuses
I will likely by scripting something up soon like this, let me know if you still want the code
Im guessing to use a combo of onEquip item hooks and then champ:getRace... with appropriate bonuses
I will likely by scripting something up soon like this, let me know if you still want the code
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: weapon script help pls
hi, yes still missing this script. here is Komag last advice-akroma222 wrote:Geez, this was from a while ago... have you figured this one out yet??
Im guessing to use a combo of onEquip item hooks and then champ:getRace... with appropriate bonuses
I will likely by scripting something up soon like this, let me know if you still want the code
have the onEquipItem and onUnequipItem do scripts/functions in the dungeon, such as axeScript.equipAxe(champ,slot) and axeScript.unequipAxe(champ,slot)
in those functions do a check first that the slot is 7 or 8, then check on the champ race to see if the champion is minotaur or not. Then if it's in slot 7 or 8 and if it's minotaur, do the stat adjust (strength)
Re: weapon script help pls
Yup! That's pretty much the way to go....
I will have a crack at it and get back to ya
I will have a crack at it and get back to ya
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: weapon script help pls
OK, so I believe this will suffice for a weapon that:
-will give a bonus to a (Stat) and or add a (Trait)... IF
-the weapon is being held in hand (slot 7 or 8) AND the champion holding the weapon is of (Race)
This is the weapon definition for items.lua-
And this is for a script entity in dungeon called "specialWeaponScripts" -
Drakkan, I may well create a special weapon scripts thread soon with these kinds of things included,
you don't mind if I include this 'if race > buff' type weapon script??
Let me know if you have any dramas...
EDIT - I have created the weapons script thread.... viewtopic.php?f=14&t=4088
-will give a bonus to a (Stat) and or add a (Trait)... IF
-the weapon is being held in hand (slot 7 or 8) AND the champion holding the weapon is of (Race)
This is the weapon definition for items.lua-
SpoilerShow
cloneObject{
name = "drakkan_minotaur_mace",
baseObject = "knoffer",
uiName = "Drakkan Minotaur Mace",
skill = "maces",
requiredLevel = 0,
attackPower = 30,
weight = 2.2,
onEquipItem = function(champion, slot)
return specialWeaponScripts.drakkanMaceEquip(champion, slot)
end,
onUnequipItem = function(champion, slot)
return specialWeaponScripts.drakkanMaceUnequip(champion, slot)
end,
description = "A mace forged by the greatly feared drakkan minotaurs of old.",
}
name = "drakkan_minotaur_mace",
baseObject = "knoffer",
uiName = "Drakkan Minotaur Mace",
skill = "maces",
requiredLevel = 0,
attackPower = 30,
weight = 2.2,
onEquipItem = function(champion, slot)
return specialWeaponScripts.drakkanMaceEquip(champion, slot)
end,
onUnequipItem = function(champion, slot)
return specialWeaponScripts.drakkanMaceUnequip(champion, slot)
end,
description = "A mace forged by the greatly feared drakkan minotaurs of old.",
}
SpoilerShow
-------------Drakkan Minotaur Mace-------------------------
function drakkanMaceEquip(champion, slot)
if champion:getRace() == "Minotaur" then
if slot == 7 or slot == 8 then
champion:modifyStatCapacity("strength", 5)
champion:modifyStat("strength", 5)
champion:addTrait("aggressive", false)
hudPrint("The mace feels invigorating for you to hold")
end
end
end
function drakkanMaceUnequip(champion, slot)
if champion:getRace() == "Minotaur" then
if slot == 7 or slot == 8 then
champion:modifyStatCapacity("strength", -5)
champion:modifyStat("strength", -5)
champion:removeTrait("aggressive", false)
hudPrint("You put the mace away...")
end
end
end
function drakkanMaceEquip(champion, slot)
if champion:getRace() == "Minotaur" then
if slot == 7 or slot == 8 then
champion:modifyStatCapacity("strength", 5)
champion:modifyStat("strength", 5)
champion:addTrait("aggressive", false)
hudPrint("The mace feels invigorating for you to hold")
end
end
end
function drakkanMaceUnequip(champion, slot)
if champion:getRace() == "Minotaur" then
if slot == 7 or slot == 8 then
champion:modifyStatCapacity("strength", -5)
champion:modifyStat("strength", -5)
champion:removeTrait("aggressive", false)
hudPrint("You put the mace away...")
end
end
end
you don't mind if I include this 'if race > buff' type weapon script??
Let me know if you have any dramas...
EDIT - I have created the weapons script thread.... viewtopic.php?f=14&t=4088
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: weapon script help pls
working perfect thanks a lot man. Will play with it a little.akroma222 wrote:OK, so I believe this will suffice for a weapon that:
-will give a bonus to a (Stat) and or add a (Trait)... IF
-the weapon is being held in hand (slot 7 or 8) AND the champion holding the weapon is of (Race)
This is the weapon definition for items.lua-And this is for a script entity in dungeon called "specialWeaponScripts" -SpoilerShowcloneObject{
name = "drakkan_minotaur_mace",
baseObject = "knoffer",
uiName = "Drakkan Minotaur Mace",
skill = "maces",
requiredLevel = 0,
attackPower = 30,
weight = 2.2,
onEquipItem = function(champion, slot)
return specialWeaponScripts.drakkanMaceEquip(champion, slot)
end,
onUnequipItem = function(champion, slot)
return specialWeaponScripts.drakkanMaceUnequip(champion, slot)
end,
description = "A mace forged by the greatly feared drakkan minotaurs of old.",
}Drakkan, I may well create a special weapon scripts thread soon with these kinds of things included,SpoilerShow-------------Drakkan Minotaur Mace-------------------------
function drakkanMaceEquip(champion, slot)
if champion:getRace() == "Minotaur" then
if slot == 7 or slot == 8 then
champion:modifyStatCapacity("strength", 5)
champion:modifyStat("strength", 5)
champion:addTrait("aggressive", false)
hudPrint("The mace feels invigorating for you to hold")
end
end
end
function drakkanMaceUnequip(champion, slot)
if champion:getRace() == "Minotaur" then
if slot == 7 or slot == 8 then
champion:modifyStatCapacity("strength", -5)
champion:modifyStat("strength", -5)
champion:removeTrait("aggressive", false)
hudPrint("You put the mace away...")
end
end
end
you don't mind if I include this 'if race > buff' type weapon script??
Let me know if you have any dramas...
EDIT - I have created the weapons script thread.... viewtopic.php?f=14&t=4088
you can create any special thread you like of course, np from my side
EDIT - this is more game desigh flaw then yours, but in case character does not have enough skill to use that weapon (for example axes:10), but that weapon is equiped, bonus from script still counts.
Also not tested case if character already have agresive trait, will he get "double" aggresive or just nothing will happens ?