Not that I object to inventorying the entire world (if I get more than 7 days...), but then there is no way to account for mods that create new cells...
Begin BOH_Script_Telvanni; updated based on CDCooley's Better Portable Containers.; if the bag can't open the container because of a reload or the 72 hour cleanup, the player will be temporarily teleported back to the tower; if the player activates the back after being teleported back to the tower, the player will return to the original position; the warp script only works in exterior cells or trib fake exteriorsShort OnPCEquipShort controlvarShort buttonfloat portTimerfloat player_xfloat player_yfloat player_zfloat pafloat timershort player_zoneshort playerWarpIf ( OnPCEquip == 1 ) If ( BagOfHoldingC_Telvanni->GetScale > 2 ) ;checks to see if the bag's scale has been set back to 2 on a reload MessageBox "You opened the Bag of Holding" BagOfHoldingC_Telvanni->Activate Player Set OnPCEquip to 0 Else ; the container cannot be detected MessageBox "You need to summon the bag to restore its magical link. Would you like to do this now?" "Yes" "No" Set controlvar to 1 Set OnPCEquip to 2 EndifEndifIf ( MenuMode == 1 ) ReturnEndifIf ( controlvar == 1 ) Set button to GetButtonPressed If ( button == -1 ) Return Elseif ( button == 0 ) Set controlvar to 2 Elseif ( button == 1 ) Set controlvar to 0 EndifElseif ( controlvar == 2 ) ;check for exterior cell or trib fake exteriors If ( GetInterior == 0 ) Set controlvar to 3 Elseif ( GetPCCell "Mournhold, Godsreach" == 1 ) Set controlvar to 3 Elseif ( GetPCCell "Mournhold, Great Bazaar" == 1 ) Set controlvar to 3 Elseif ( GetPCCell "Mournhold, Plaza Brindisi Dorom" == 1 ) Set controlvar to 3 Elseif ( GetPCCell "Mournhold, Temple Courtyard" == 1 ) Set controlvar to 3 Elseif ( GetPCCell "Mournhold, Royal Palace: Courtyard" == 1 ) Set controlvar to 3 Else MessageBox "You need to go outside to restore the connection." Set controlvar to 0 Endif Set OnPCEquip to 0Elseif ( controlvar == 3 ) Set PlayerWarp to 1 Set controlvar to 0EndifIf ( PlayerWarp == 0 ) ReturnEndif; Begin Player Warp ScriptIf ( MenuMode == 0 ) If ( PlayerWarp == 1 ) If ( GetInterior == 0 ) Set player_zone to 1 Elseif ( GetPCCell "Mournhold, Godsreach" == 1 ) Set player_zone to 2 Elseif ( GetPCCell "Mournhold, Great Bazaar" == 1 ) Set player_zone to 3 Elseif ( GetPCCell "Mournhold, Plaza Brindisi Dorom" == 1 ) Set player_zone to 4 Elseif ( GetPCCell "Mournhold, Temple Courtyard" == 1 ) Set player_zone to 5 Elseif ( GetPCCell "Mournhold, Royal Palace: Courtyard" == 1 ) Set player_zone to 6 Else Set PlayerWarp to 0 ; just double-check to make sure the player isn't in an interior cell before teleporting Return Endif Set PlayerWarp to 5 Elseif ( PlayerWarp == 5 ) ;store the player's current position Set pa to ( Player->GetAngle z ) Set player_x to ( Player->GetPos x ) Set player_y to ( Player->GetPos y ) Set player_z to ( Player->GetPos z ) Set PlayerWarp to 10 Elseif ( PlayerWarp == 10 ) FadeOut 2 MessageBox "As you reach into the bottomless bag, you find yourself being pulled inside." Set timer to 0 Set PlayerWarp to 15 Return Elseif ( PlayerWarp == 15 ) Set timer to ( timer + GetSecondsPassed ) If ( timer > 5 ) Player->coc "Tel Uvirith, Tower Upper" Set PlayerWarp to 20 Endif If ( PlayerWarp == 20 ) ;position the player in front of the container Player->PositionCell -645, -230, -950, 270 "Tel Uvirith, Tower Upper" Set PlayerWarp to 25 Endif Elseif ( PlayerWarp == 25 ) FadeIn 2 Set timer to 0 Set PlayerWarp to 30 Elseif ( PlayerWarp == 30 ) MessageBox "You now need to climb back into the bag to get to where you were last." Set PlayerWarp to 35 Return EndifEndifIf ( PlayerWarp == 35 ) ;wait for the player to activate the container before continuing If ( BagOfHoldingC_Telvanni->OnActivate == 1 ) Set PlayerWarp to 40 Else Return EndifEndifIf ( PlayerWarp == 40 ) FadeOut 2 MessageBox "You climb back into the bag to return to your former position." Set PlayerWarp to 45 ReturnElseif ( PlayerWarp == 45 ) ;take the player back to the previous location Set timer to ( timer + GetSecondsPassed ) If ( timer > 5 ) If ( player_zone == 1 ) ;true exteriors ToggleMenus ;temporarily disable menus while warping the player Set PlayerWarp to 55 Elseif ( player_zone == 2 ) ToggleMenus Player->coc "Mournhold, Godsreach" Set PlayerWarp to 50 Elseif ( player_zone == 3 ) ToggleMenus Player->coc "Mournhold, Great Bazaar" Set PlayerWarp to 50 Elseif ( player_zone == 4 ) ToggleMenus Player->coc "Mournhold, Plaza Brindisi Dorom" Set PlayerWarp to 50 Elseif ( player_zone == 5 ) ToggleMenus Player->coc "Mournhold, Temple Courtyard" Set PlayerWarp to 50 Elseif ( player_zone == 3 ) ToggleMenus Player->coc "Mournhold, Temple Courtyard" Set PlayerWarp to 50 Elseif ( player_zone == 3 ) ToggleMenus Player->coc "Mournhold, Royal Palace: Courtyard" Set PlayerWarp to 50 Endif EndifElseif ( PlayerWarp == 50 ) ;trib fake exteriors Player->SetPos x player_x Player->SetPos y player_y Player->SetPos z player_z Player->SetAngle to pa ToggleMenus ;re-enable menus MenuTest MenuTest Set timer to 0 Set PlayerWarp to 70Elseif ( PlayerWarp == 55 ) ;true exteriors Player->coe 0 -17 ;return the player outside Player->SetPos x player_x ;return to original position Player->SetPos y player_y Player->SetPos z player_z FixMe ;get cell to reload properly OR ELSE IT WILL DESTROY WHOLE TOWNS AND STUFF Set PlayerWarp to 60EndifIf ( PlayerWarp == 60 ) ;reset position again Player->SetPos x player_x Player->SetPos y player_y Player->SetPos z player_z Player->SetAngle to pa Set timer to 0 ToggleMenus ;re-enable menus MenuTest MenuTest Set PlayerWarp to 70EndifIf ( PlayerWarp == 70 ) FadeIn 2 Set PlayerWarp to 75Elseif ( PlayerWarp == 75 ) Set PlayerWarp to 0EndifEnd BOH_Script_Telvanni
Begin NDTentflap2Script;**********************************************************;'Neildarkstar's script;**********************************************************; 'script conversion based on Stuporstar's update of CDCooley's Better Portable Containers.;' if the bag can't open the container because of a reload or the 72 hour cleanup, the player will be temporarily teleported back to the tower;' if the player activates the back after being teleported back to the tower, the player will return to the original position;' the warp script only works in exterior cells Short OnPCEquipShort controlvarShort buttonfloat portTimerfloat player_xfloat player_yfloat player_zfloat pafloat timershort player_zoneshort playerWarpIf ( OnPCEquip == 1 ) MessageBox "Would you like to pass through the tent flap?" "Yes" "No" Set controlvar to 1 Set OnPCEquip to 2 EndifEndifIf ( MenuMode == 1 ) ReturnEndifIf ( controlvar == 1 ) Set button to GetButtonPressed If ( button == -1 ) Return Elseif ( button == 0 ) Set controlvar to 2 Elseif ( button == 1 ) Set controlvar to 0 EndifElseif ( controlvar == 2 ) ;'check for exterior cell If ( GetInterior == 0 ) Set controlvar to 3 Else MessageBox "You need to be outside to use the flap." Set controlvar to 0 Endif Set OnPCEquip to 0Elseif ( controlvar == 3 ) Set PlayerWarp to 1 Set controlvar to 0Endif; 'Begin Player Warp ScriptIf ( MenuMode == 0 ) If ( PlayerWarp == 1 ) If ( GetInterior == 0 ) Set player_zone to 1 Else Set PlayerWarp to 0 ;' just double-check to make sure the player isn't in an interior cell before teleporting Return Endif Set PlayerWarp to 5 Elseif ( PlayerWarp == 5 ) ;'store the player's current position Set pa to ( Player->GetAngle z ) Set player_x to ( Player->GetPos x ) Set player_y to ( Player->GetPos y ) Set player_z to ( Player->GetPos z ) Set PlayerWarp to 10 Elseif ( PlayerWarp == 10 ) FadeOut 2 MessageBox "You pass through the tent flap" Set timer to 0 Set PlayerWarp to 15 Return Elseif ( PlayerWarp == 15 ) Set timer to ( timer + GetSecondsPassed ) If ( timer > 5 ) Player->coc "ND_Tent_Int" Set PlayerWarp to 20 Endif If ( PlayerWarp == 20 ) ;'position the player in front of the container Player->PositionCell 4194, 2988, 15673, 0 "ND_Tent_Int" Set PlayerWarp to 25 Endif Elseif ( PlayerWarp == 25 ) FadeIn 2 Set timer to 0 Set PlayerWarp to 30 Elseif ( PlayerWarp == 30 ) MessageBox "You now need to move back through the flap to get to where you were last." Set PlayerWarp to 35 Return EndifEndifIf ( PlayerWarp == 35 ) ;'wait for the player to activate the container before continuing If ( ND_TentFlap->onActivate == 1 ) Set PlayerWarp to 40 Else Return EndifEndifIf ( PlayerWarp == 40 ) FadeOut 2 MessageBox "You pass back through the flap to return to your former position." Set PlayerWarp to 45 Return Elseif ( PlayerWarp == 45 ) ;'take the player back to the previous location Set timer to ( timer + GetSecondsPassed ) If ( timer > 5 ) If ( player_zone == 1 ) ;'true exteriors ToggleMenus ;'temporarily disable menus while warping the player Set PlayerWarp to 55 Endif Endif Elseif ( PlayerWarp == 55 ) ;'true exteriors Player->coe 0 -17 ;'return the player outside Player->SetPos x player_x ;'return to original position Player->SetPos y player_y Player->SetPos z player_z FixMe ;'get cell to reload properly OR ELSE IT WILL DESTROY WHOLE TOWNS AND STUFF Set PlayerWarp to 60EndifIf ( PlayerWarp == 60 ) ;'reset position again Player->SetPos x player_x Player->SetPos y player_y Player->SetPos z player_z Player->SetAngle to pa Set timer to 0 ToggleMenus ;'re-enable menus MenuTest MenuTest Set PlayerWarp to 70EndifIf ( PlayerWarp == 70 ) FadeIn 2 Set PlayerWarp to 75Elseif ( PlayerWarp == 75 ) Set PlayerWarp to 0EndifEnd NDTentflap2Script