[Scrit Request] Plz help!
Posted: Sun Nov 21, 2010 12:56 am
Hello!
I m using Toaster Share/Recruit mod which allows me to have access to npcs inventory and give/take items from them.
I have made some companions with custom class which i want to change their skills in any way i want in game. For that reason i want to make skill bonus tokens.
So...
I want to make an generic item (a scull for example) to give +10 to a skill (Acrobatics for example) as long as an NPC has it in his inventory. When i remove the item from his inventory i want the +10 bonus to be removed and the npc goes at starting score.
For example i have an NPC with Acrobatics: 24 and i give him the item with the share/recruit method. As long he has the item in his inventory he will get 24+10=24 Acrobatics. After a period i want to remove the item from him (maybe to give it to an other npc/follower) so i take the item from his inventory. Asfter that time the NPC will have 34-10=24 again (as he started).
<<update>>
I have made it partially but with serious bug. The first time i give the itm to npc the skill not change. For example if he has 5 and i give him the item, the score remains 5. When i remove the item from him, he gets -5 normally. And the second time i add it to his inventory, he normally gets the +5.
BUT... I misst a +5 from the npc because.
At start he has 5. First I give him item and he gets +0 (Bug) so he stays 5 (he has to get 10). Then I remove the item and he gets -5 an dhe drops to o (he had to be 5). And second time i add the item he gets +5 and goes to 5 (he had to get 10). So I lose 5 points from this bug
Im using the following script. But something is wrong.
ScriptName ScullBlade5
ref target
short npc1
Begin GameMode
set target to getcontainer
End
Begin OnAdd target
target.ModActorValue2 Blade 5
Message "Blade +5"
end
Begin OnDrop target
target.ModActorValue2 Blade -5
Message "Blade -5"
end
How can i remove this bug?
I someone can help i will be grateful
I m using Toaster Share/Recruit mod which allows me to have access to npcs inventory and give/take items from them.
I have made some companions with custom class which i want to change their skills in any way i want in game. For that reason i want to make skill bonus tokens.
So...
I want to make an generic item (a scull for example) to give +10 to a skill (Acrobatics for example) as long as an NPC has it in his inventory. When i remove the item from his inventory i want the +10 bonus to be removed and the npc goes at starting score.
For example i have an NPC with Acrobatics: 24 and i give him the item with the share/recruit method. As long he has the item in his inventory he will get 24+10=24 Acrobatics. After a period i want to remove the item from him (maybe to give it to an other npc/follower) so i take the item from his inventory. Asfter that time the NPC will have 34-10=24 again (as he started).
<<update>>
I have made it partially but with serious bug. The first time i give the itm to npc the skill not change. For example if he has 5 and i give him the item, the score remains 5. When i remove the item from him, he gets -5 normally. And the second time i add it to his inventory, he normally gets the +5.
BUT... I misst a +5 from the npc because.
At start he has 5. First I give him item and he gets +0 (Bug) so he stays 5 (he has to get 10). Then I remove the item and he gets -5 an dhe drops to o (he had to be 5). And second time i add the item he gets +5 and goes to 5 (he had to get 10). So I lose 5 points from this bug
Im using the following script. But something is wrong.
ScriptName ScullBlade5
ref target
short npc1
Begin GameMode
set target to getcontainer
End
Begin OnAdd target
target.ModActorValue2 Blade 5
Message "Blade +5"
end
Begin OnDrop target
target.ModActorValue2 Blade -5
Message "Blade -5"
end
How can i remove this bug?
I someone can help i will be grateful