Jump to content
Sign in to follow this  
Leonardo

Script error in Uvirith's Legacy TR-addon

Recommended Posts

Below is the Uvi_Almossaren script.  The only thing I know about scripting is that lines with a " ; " are known as a remark line sort of a documentary line and these lines can be ignored.

Begin Uvi_Almossaren; NPC Almossaren appears in your lower tower storage room, from Stronghold Maintenance quest; disables NPC according to quests and daily schedulesShort NoLoreShort FlagShort state ;set in dialogue, enables/disables shipmentsShort FiredShort VampCheckShort freeletter ;tracks dialogue for slave freedom questShort Info ;dialogue checkShort Factor ;dialogue checkShort FGSShort mainlandholdShort ULNPCIDLong GoldCountLong ShipmentCostLong TmpSet ULNPCID to 2If ( Fired == -1 )  ReturnEndifIf ( CellChanged )  Set Flag to 1  ReturnElseif ( GetPCSleep )  Set Flag to 1  ReturnElseif ( MenuMode )  ReturnEndifIf ( GetHealth < 1 )  If ( GetItemCount AM_quill > 0 )    RemoveItem AM_quill 1    AddItem Misc_Quill 1  Endif  ReturnEndifIf ( VampCheck == 0 )  If ( GetItemCount emb_memitem_mychilde > 0 ) ;Checks to see if made a vampire by VE. Changes her behavior. Another check is made again in dialogue, just in case.    StartScript Uvi_AlmosVampWait    Set VampCheck to 1    Return  EndifEndifIf ( ScriptRunning Uvi_AlmosVampWait == 1 )  ReturnEndifIf ( GetCurrentAiPackage > 1 )  AiWander 0 5 0 60 20 10  Messagebox "I'm afraid I can't leave my post. The shipments require tending."EndifIf ( FGS == 1 )  If ( GetDisabled )    Set FGS to 0    Return  Endif  ForceGreeting  ReturnEndifIf ( HasItemEquipped AM_quill == 0 )  Equip AM_quillEndifIf ( GetDeadCount almossaren_bed > 0 ) ;syncronize death with almossaren_bed  Disable  Set doOnce to -1  ReturnEndifIf ( state == 0 )  If ( GoldCount != ( uvi_strongbox.goldreserve ) )    Set GoldCount to ( uvi_strongbox.goldreserve )  Endif  If ( ShipmentCost == 999 ) ;resumes halted shipments    If ( GetJournalIndex HT_StrongholdMaintenance < 45 )      Set ShipmentCost to 2000    Elseif ( GetJournalIndex HT_StrongholdMaintenance < 60 )      Set ShipmentCost to 2150    Elseif ( GetJournalIndex HT_StrongholdMaintenance < 70 )      Set ShipmentCost to 5300    Elseif ( GetJournalIndex HT_StrongholdMaintenance < 75 )      Set ShipmentCost to 5500    Elseif ( GetJournalIndex HT_StrongholdMaintenance < 90 )      If ( GetPCRank "East Empire Company" < 9 )        Set ShipmentCost to 6300      Else        Set ShipmentCost to 6000      Endif    Elseif ( mainlandhold == 0 )      If ( GetPCRank "East Empire Company" < 9 )        Set ShipmentCost to 14500      Else        Set ShipmentCost to 14000      Endif    Else      If ( GetPCRank "East Empire Company" < 9 )        Set ShipmentCost to 6300      Else        Set ShipmentCost to 6000      Endif    Endif  Endif  If ( Uvi_Shipment_Global == -1 )    Set state to -1    Return  EndifElseif ( state == -1 ) ;shipments are on hold  If ( GoldCount >= ShipmentCost )    If ( uvi_staff_bonus > 0 )      Set Tmp to ( ShipmentCost + 500 )      If ( GoldCount > Tmp )        uvi_strongbox->RemoveItem Gold_001 500        set uvi_staff_bonus to 0      Else        Set state to 1        Return      Endif    Endif    If ( ShipmentCost == 500 ) ;servants paid only      uvi_strongbox->RemoveItem Gold_001 500      Set Uvi_Shipment_Global to -2      Set state to 0      Return    Elseif ( ShipmentCost == 2000 )      If ( GetJournalIndex HT_StrongholdMaintenance < 45 )        uvi_strongbox->RemoveItem Gold_001 2000        Set state to 2      Else        Set ShipmentCost to 999        Set state to 0        Return      Endif    Elseif ( ShipmentCost == 2150 )      If ( GetJournalIndex HT_StrongholdMaintenance < 60 )        uvi_strongbox->RemoveItem Gold_001 2150        Set state to 2      Else        Set ShipmentCost to 999        Set state to 0        Return      Endif    Elseif ( ShipmentCost == 5300 )      If ( GetJournalIndex HT_StrongholdMaintenance < 70 )        uvi_strongbox->RemoveItem Gold_001 5300        Set state to 2      Else        Set ShipmentCost to 999        Set state to 0        Return      Endif    Elseif ( ShipmentCost == 5500 )      If ( GetJournalIndex HT_StrongholdMaintenance < 75 )        uvi_strongbox->RemoveItem Gold_001 5500        Set state to 2      Else        Set ShipmentCost to 999        Set state to 0        Return      Endif    Elseif ( ShipmentCost == 6300 )      uvi_strongbox->RemoveItem Gold_001 6300      Set state to 2    Elseif ( ShipmentCost == 6000 )      uvi_strongbox->RemoveItem Gold_001 6000      Set state to 2    Elseif ( ShipmentCost == 14000 )      uvi_strongbox->RemoveItem Gold_001 14000      Set state to 2    Elseif ( ShipmentCost == 14500 )      uvi_strongbox->RemoveItem Gold_001 14500      Set state to 2    Endif  Else    Set state to 1  EndifElseif ( state == 2 )  Set Uvi_Shipment_Global to 1  Set Flag to 1  Set state to 0EndifIf ( Flag == 0 )  ReturnEndifIf ( Fired == 1 )  Disable  Set Fired to -1  ReturnEndIfIf ( GetJournalIndex HT_UvirithCookies == 90 )  If ( GetJournalIndex HT_UvirithCookies < 110 )    Disable    Set Flag to 0    Return  EndifEndifIf ( GetJournalIndex HT_StrongholdMaintenance < 30 )  Disable  Set Flag to 0  ReturnElseIf ( GetJournalIndex HT_StrongholdMaintenance == 35 )  Disable  Set Flag to 0  ReturnElse  If ( Uvi_Shipment_Global == 1 )    StartScript Uvi_Shipment_Respawn  Endif  If ( ScriptRunning Uvi_Shipment_Timer_Global == 0 )    StartScript Uvi_Shipment_Timer_Global  Endif  If ( uvi_schedulesOff == 1 ) ;disables schedules for essential NPCs    Enable    Set Flag to 0    Return  Endif  If ( uvi_Almos_vampire == 1 )    If ( GameHour < 6 ) ;working      Enable    Elseif ( Gamehour < 20 ) ;sleeping      Disable    Elseif ( GameHour < 24 ) ;working      Enable    Elseif ( GameHour >= 24 ) ;hunting      Disable    Endif    Set Flag to 0    Return  Endif  If ( GameHour < 8 ) ;sleeping    Disable  Elseif ( Gamehour < 18 ) ;working    Enable  Elseif ( GameHour < 19 ) ;eating    Disable  Elseif ( GameHour < 24 ) ;working    Enable  Elseif ( GameHour >= 24 ) ;sleeping    Disable  EndifEndIfSet Flag to 0End

The picture I took show an error in line 2 in the Uvi_Almossaren script.  How do I fix this script error?

 

Morrowind 2014 09 18 21.06.43.384

 

Share this post


Link to post
Share on other sites

The solution is here.  Scratch that...  Gave me more problems than solve the error script issue.

 

EDIT:  Although the fix added the letter from Mithras, but at the same time I got a dialogue loop with the same question over and over again. :shrug:

 

Morrowind 2014 09 19 18.21.17.058

Edited by Leonardo

Share this post


Link to post
Share on other sites

You should post this at TR forum.

My script issue has nothing to do with the TR forum at all, because it's a TR-addon for Uvirith's Legacy.

Share this post


Link to post
Share on other sites

The solution is here.  Scratch that...  Gave me more problems than solve the error script issue.

 

EDIT:  Although the fix added the letter from Mithras, but at the same time I got a dialogue loop with the same question over and over again. :shrug:

 

 

You'd need a condition on the dialogue topic so that it's only spoken once.

Share this post


Link to post
Share on other sites

No I don't need to add anything in the dialogue, but what is needed is to define a book in line 2 in the Uvi_Almossaren script hence the script error I got.  Look at the picture.

Share this post


Link to post
Share on other sites

Isn't Stuporstar helping you fix this over at the official forums?

Edited by Dragon32

Share this post


Link to post
Share on other sites

Yes she is.  It is just that I've my game stalled as long my issue is unfixed, so it's a waste time trying to do something else in-game e.g start the MQ or do other misc quests.

 

Also if I do other quests while waiting for a working fix I'll eventually trigger Almossaren's dialogue for the cost of the shipment and probably get the same errors as I have now which I'm not fond of TBH.

Edited by Leonardo

Share this post


Link to post
Share on other sites

OK, just wanted to check these were the same things. As you've got the person who made the mod helping out that should be a big help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×