Question : weapon buffs from scrolls staying on ....
#1
Posté 24 avril 2011 - 11:37
Q: What is the solution?
#2
Posté 24 avril 2011 - 11:45
#3
Posté 25 avril 2011 - 02:00
Some PWs solves this via dispel OnEnter, boosts on weapons/armor including, others doesnt care...
#4
Posté 25 avril 2011 - 11:47
keen, magic weapon, greater magic weapon, darkfire, flame weapon, and one or two bard/paladin weapon buff
I have a script that takes buffs off PC but does not take them off weapon .Is this going to be a script or in the nwnplayer.ini file?
#5
Posté 26 avril 2011 - 12:16
Are they standard boiware scrolls? Casting standard Bioware Spells. Have the Spell Scripts Been modified?
#6
Posté 26 avril 2011 - 12:23
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
// This is the Object to apply the effect to.
// Create the effect to apply
effect eDispelAll = EffectDispelMagicAll(40);
// Create the visual portion of the effect. This is instantly
// applied and not persistant with wether or not we have the
// above effect.
effect eVis = EffectVisualEffect(VFX_IMP_DISPEL);
// Apply the visual effect to the target
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC);
// Apply the effect to the object
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDispelAll, oPC);
}
#7
Posté 27 avril 2011 - 12:25
Flame Weapon - x2_s0_flmeweap
Greater Magic Weapon - x2_s0_grmagweap
Magic Vestment - x2_s0_magvest
Blackstaff - x2_s0_blckstff
These are some of the spells staying on players weapons ...if you guys have a fix to make them temporary or a link please let me know .
#8
Posté 27 avril 2011 - 01:17
#9
Posté 27 avril 2011 - 01:29
#10
Posté 27 avril 2011 - 07:50
You us enwnx too right? Check and see what script is being called too much.
#11
Posté 27 avril 2011 - 08:03
put this above void main
// remove all temporary effect on item
void removeAllTempEffect(object oItem) {
itemproperty vlastnost;
if (GetIsObjectValid(oItem)) {
vlastnost = GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(vlastnost))
{
if (GetItemPropertyDurationType(vlastnost)==DURATION_TYPE_TEMPORARY) RemoveItemProperty(oItem, vlastnost);
vlastnost = GetNextItemProperty(oItem);
}
}
}
void removeEffectFromWeapons(object oPC) {
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC));
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC));
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC));
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC));
// remove effect also from all item in invertory
object oItem = GetFirstItemInInventory(oPC);
while (oItem != OBJECT_INVALID) {
removeAllTempEffect(oItem);
oItem = GetNextItemInInventory(oPC);
}
}
and then add removeEffectFromWeapons(oPC) somewhere below if (!GetIsPC(oPC)) return; line
but it shouldnt happen this way, do you have any of those weapon boost spellscripts in your module? if so post it.
Modifié par ShaDoOoW, 27 avril 2011 - 08:04 .
#12
Posté 27 avril 2011 - 08:57
The only spell as far as spells go is I adjusted the TimeStop so it doesnt effect whole module.
TSMDude I use game version 1.69 with CEP 2.3 running on linux server.No nwnx2.
Yes it is mainly weapon spells that stay.Head DM made a list for me but not sure where I put it .
module hour is set to 2 minutes ...if I remember correctly ,it has been like this since I put server up.
I do have a save character script that fires every 2 minutes.
Also my module clock I have not made persistent.
Modifié par Knight_Shield, 27 avril 2011 - 08:59 .
#13
Posté 27 avril 2011 - 09:36
This is probably the reason why its happening. The itemproperties doesnt use the same way to fade as effects, instead they have set up timeline in which they will be removed. So if the clocks doesnt advance temporary itemproperties will never fade, also if you cast a weapon spell in the day 10 after module start day, the fade day will be set to lets say 11 after module start but if player logout and then log in when server restarts his weapons still be set to fade on day 11. Guess this is not removed after rest by default cos another issue I explained above. So adding that script above into OnPlayerRest event is probably good idea too.Knight_Shield wrote...
Also my module clock I have not made persistent.
#14
Posté 27 avril 2011 - 11:50
Modifié par ffbj, 27 avril 2011 - 11:58 .
#15
Posté 29 avril 2011 - 06:28
object oItem = GetModuleItemAcquired();
IPRemoveAllItemProperties(oItem,DURATION_TYPE_TEMPORARY);When a player relogs, all equipment on their PC is recreated, IE acquired, and this is the best place to catch and correct the issue. The only drawback is that if a player crashes and relogs, their weapon buffs are gone.





Retour en haut







