Hello all. I'm trying to create a Story Script for our GM campaign that unequips the player's weapon (weapon slot and shield slot) when a certain status is applied, and then equips that weapon back when that status is removed.

I have created the following story script which saves the player+weapon info to a db, and it is fully working in the Editor, but it does not fully work in the game itself on an actual player's character.

In-game, the script does manage to unequip the item, and it does seem to save the info in the db (I unpacked a saved-game file and checked there, and my other Osiris scripts also keep their db data persistent), however, the script does not manage to equip that item back onto the player's character in-game.

Does anyone know what might be the issue? Thank you.

My Script:

Code
IF
    CharacterStatusApplied(_Player,"SZ_P_GHOSTSOULMODE",)
AND
    CharacterGetEquippedWeapon(_Player,_CurrentWeapon)
AND
    NOT DB_SZ_GhostSoul_Weapon(_Player,_CurrentWeapon)
THEN
    CharacterUnequipItem(_Player,(ITEMGUID)_CurrentWeapon);
    DB_SZ_GhostSoul_Weapon(_Player,_CurrentWeapon);

IF
    CharacterStatusApplied(_Player,"SZ_P_GHOSTSOULMODE",)
AND
    CharacterGetEquippedItem(_Player,"Shield",_CurrentOffhand)
AND
    NOT DB_SZ_GhostSoul_Shield(_Player,_CurrentOffhand)
THEN
    CharacterUnequipItem(_Player,(ITEMGUID)_CurrentOffhand);
    DB_SZ_GhostSoul_Shield(_Player,_CurrentOffhand);

IF
    CharacterStatusRemoved(_Player,"SZ_P_GHOSTSOULMODE",)
AND
    DB_SZ_GhostSoul_Weapon(_Player,_WeaponToEq)
THEN
    CharacterEquipItem(_Player,(ITEMGUID)_WeaponToEq);
    NOT DB_SZ_GhostSoul_Weapon(_Player,_WeaponToEq);

IF
    CharacterStatusRemoved(_Player,"SZ_P_GHOSTSOULMODE",)
AND
    DB_SZ_GhostSoul_Shield(_Player,_OffhandToEq)
THEN
    CharacterEquipItem(_Player,(ITEMGUID)_OffhandToEq);
    NOT DB_SZ_GhostSoul_Shield(_Player,_OffhandToEq);

Last edited by sndwav; 2 hours ago.